Saturday, 21 April 2018

Installing Avaya Appliance Virtualization Platform (AVP) using E2B

When installing the Avaya Appliance Virtualization Platform v7 to a server, you usually need a DVD which contains an OS that installs onto the internal hard disk and a USB flash drive that contains a configuration file.

If you have an E2B (Removable-type) of Flash drive, you can install AVP without needing a DVD.

1. Download the AVP ISO
2. Drag-and-drop it onto the MPI_FAT32 Desktop shortcut
3. Run \MAKE_THIS_DRIVE_CONTIGUOUS.cmd
4. Run \_ISO\SWITCH_E2B.exe and switch in the new image file
5. Open Windows Explorer and copy your AVP .cfg configuration file to the root of the USB drive (there should be \EFI and \clover and \e2b folders present if you have the correct partition).

You should now find that you can boot to the E2B drive's CSM menu and select option 1 to MBR-boot to start the formatting of the internal drive and the unattended installation of AVP.

I have not tested this process using an E2B USB HDD, but it has been tested using an E2B USB Flash drive. As I think the script searches only Removable USB drives for the .cfg file, this does not work under a VM like VBox if the E2B USB drive appears as a IDE\SATA\SCSI fixed disk and not a true USB drive. You could connect a 2nd USB flash drive containing the .cfg file instead of placing the file on the E2B drive.

Headless Server

If your appliance has no keyboard or monitor, we need to make some changes to the \menu.lst file so that it runs automatically (which is dangerous because it will format the internal HDD!):


Just after the 'set VER=0.xx' line  (about line 30) in \menu.lst, add these lines:

clear
echo -e $[0x0e]DANGER! THIS WILL AUTOMATICALLY FORMAT YOUR DRIVE IN 25 SECONDS...
ls / > nul ;; pause --wait=5
ls / > nul ;; pause --wait=5
ls / > nul ;; pause --wait=5
ls / > nul ;; pause --wait=5
ls / > nul ;; pause --wait=5
timeout 20

These lines will cause the LED of the USB drive to flash 5 times at 5 second intervals.
This indicates that it is about to run the AVP installer and is about to format yout internal hard disk

There will be a delay of 20 seconds before the default menu selection is run.

Now when the installation reboots and the USB LED starts to flash at 5 seconds intervals, you can remove the USB drive and reboot the system so that it boots from the internal hard disk and not the USB drive again.

Automating the reboot

You may also want to prevent accidental formatting of the internal hard disk by checking for files on the internal hard disk first.

and add this line just before the
# ---------------- MENU ENTRIES ------------------
section so that it selects the  'Boot from internal Hard Disk [F7]' menu entry instead, if there are files present on the internal hard disks first partition. 

Note: the number 8 may need to be changed, depending on how many items  are in the CSM menu.

ls (hd1,0)/ > (md)0x9F00+1 && checkrange 1:-1 read 0x13E0000 > nul && default
8

This means that the internal hard disk must be blank if you want the installation to proceed automatically. When it reboots, the hard disk will no longer be blank and it will boot to the internal hard disk to complete the installation.

You can turn off the timeout as well like this:

ls (hd1,0)/ > (md)0x9F00+1 && checkrange 1:-1 read 0x13E0000 > nul && default 8 && timeout 0

Note: These example lines of code may need altering and have not been tested!


Alternate Scenario (v.6)

Avaya Virtualization System Platform (VSP) based on Xen

If you are using an ISO which expects a configuration file to be on the DVD, then we need to modify the procedure:

1. Drag-and-drop the ISO onto the MPI_FAT32 Desktop shortcut and make a .imgPTN file in the usual way.

2. Edit the ks.cfg file (or whatever name it has) so that is expects the source to be on a USB drive and not a DVD. The instructions are usually in the .cfg file.

After alteration, the lines should be like this:

# Use this line instead of cdrom for a jump drive install for 8300Ds
harddrive --partition=sdb1 --dir=
#cdrom

Now when you boot from the .imgPTN file, specify the location of the config file like this:

hd:sd​b​1:/ks.cfg

where sdb is the USB drive (this will vary from system to system).

Automation
If you want to automate the process, we must modify the syslinux.cfg file and the ks.cfg file by placing some lines of code just below the comment lines at the top of the \menu.lst file:

set ldisk=sdb
geometry (hd1) || pause ERROR: No INTERNAL HDD?
geometry (hd2) && set ldisk=sdc
geometry (hd3) && set ldisk=sdd
geometry (hd4) && set ldisk=sde
geometry (hd5) && set ldisk=sdf
geometry (hd6) && set ldisk=sdg
geometry (hd7) && set ldisk=sdh
geometry (hd8) && set ldisk=sdi
echo USB disk should be %ldisk%1
cat --locate=:sd --replace=:%ldisk%1 /syslinux/syslinux.cfg && echo syslinux.cfg was modified
cat --locate=--partition= --replace=--partition=%ldisk%1 /ks.cfg && echo ks.cfg was modified
#remove next line if you don't want it to pause
pause

The above code assumes that at least one internal SATA\SCSI hard disk is present in the system.

Edit the \syslinux\sysliux.cfg file so it uses hd:sd instead of cdrom: - e.g. (don't just copy this!)...

default vsp
ontimeout telnet
prompt 1
timeout 300
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label telnet 
  kernel vmlinuz
  append initrd=initrd.img text headless telnet ksdevice=arp:198.11.13.5 ip=198.11.13.6 netmask=255.255.255.252 ks=hd:sdb1:/ks.cfg mediacheck
label any
  kernel vmlinuz
  append initrd=initrd.img text headless telnet ksdevice=any ip=198.11.13.6 netmask=255.255.255.252 ks=hd:sdb1:/ks.cfg mediacheck
label telnetserial
  kernel vmlinuz
  append initrd=initrd.img text console=ttyS0,115200n8 headless telnet ksdevice=any ip=198.11.13.6 netmask=255.255.255.252 ks=hd:sdb1:/ks.cfg
label vsp
  kernel vmlinuz
  append initrd=initrd.img ks=hd:sdb1:/ks.cfg
label vspmediacheck
  kernel vmlinuz
  append initrd=initrd.img ks=hd:sdb1:/ks.cfg mediacheck
label vspserial
  kernel vmlinuz
  append initrd=initrd.img console=ttyS0,115200n8 ks=hd:sdb1:/ks.cfg

make sure all ks= strings are changed!

It would have been nice to use the volume label or UUID, but neither of these seemed to work:
e.g. these did not work.
ks=hd:LABEL=EASY2BOOT:/ks.cfg
ks=hd:UUID=0421-78CA:/ks.cfg

If you manage to use LABEL or UUID, please let me know how you did it!

No comments:

Post a Comment