Installing a Guest with Xen

From Zanecorpwiki

(Redirected from Installing a Guest on Xen)
Jump to: navigation, search

TODO: before installing the virtual servers, increase the number of loopback devices on the machine.

The first time we tried to install a guest, through Yast, we kept getting the error message that the ram disk could not be created. My guess is that whatever size you want the install disk to be, that's the size the ram disk needs to be... Anyway, just something to be aware of.

  1. fire up the yast LVM manager and create a volume for each of the virtual machines
  2. start the yast vm/xen manager
    1. add a virtual machine
    2. select 'Run OS installation program'
    3. change the name to something useful
    4. adjust the memory (Yast needs at least 512 to run, can reduce later if machine doesn't need that much)
    5. adjust the disk; remove the default hda disk image and add a new one; select block device and point it to the entry in dev for the the volume (/dev/volume group/volume name, /dev/xengroup/liquid for example)
    6. click on the installation source and select the ISO that was copied in step one
    7. the hda location and install location should be done in that order, otherwise hdb gets ahead of hda in some ordering that causes GRUB to install with warnings (fusionweb, liquidmail, and by extension the other mail, ftp, and fraudmanager servers saw this. There have been successful reboots, though, and everything looks as it should)
    8. run through the installation procedure
      1. install text mode machines, no need for anything fancy(... I think)
      2. adjust the partitions to allow a reasonable swap size and drop everything else on root
      3. select the software according to the purpose and the appropriate standard software
      4. do not include the OSS and non-OSS sources; they take forever to process and I'm not sure what they're good for
  3. install a single mail machine, the svn machine, the fusion/fraudsweep sever, and the liquid server; in other words, install one machine for each size/purpose combo
  4. after the first machine of each type is installed, use dd to mirror the machine for other types
  5. after the mirror, we need to update the ethernet MAC in the VM, change it to something (not sure if it matters... just make it unique on the machine)
  6. boot the machine, the network will fail
  7. change the host name
  8. go into /etc/sysconfig/network on the guest and rename the ifcfg file for the old MAC to the new MAC (actually, may have to reboot and change host name again, not sure if I made an error, or the host gets caught up with the MAC... the former makes more sense)
  9. start the mirrored machines and reconfigure

We played around with a single install and trying to resize the disk afterwards, and still believe this should be possible, but have been unable to figure it out. Also toyed with the idea of using a single base as root and mounting var, etc, and home to unique volumes, but gave up the complication.

As a side note, the formatting of the virtual disks seems to take a very long time, and interferes tortuously with other IO. The IO characteristics of the virtual disks could bear some testing. Copies and writes (even big ones) don't seem terrible. DB performance may be a concern. Followup: These problems may have been (and in fact seem to be) due to the fact that during the initial installation, the RAID6 array was actively syncing.

Personal tools