Creating a fully-virtualised Xen guest

Xen can run any x86-compatible OS. This is facilitated using the Hardware Virtual Machine (HVM) feature. HVM requires VT extensions on Intel processors or Pacifica extensions on AMD processors. All Anchor Xen virtualisation products are delivered using HVM. This procedure covers creating a new HVM-based guest on a Xen host server provided by Anchor.

Create guest

Note: "dom0" below refers to the Xen host machine.

  1. SSH to the dom0.
  2. On the dom0, run:

    create-hvm-guest --fqdn <hostname> --disk-size <disksize> --memory <memory> --vcpus <vcpus> [--vg <volgroup>] --vlan <VLAN> [--vlan <VLAN>]...
    The arguments are:
    • <hostname>: the fully-qualified hostname of the VM.

    • <disksize>: the size of the disk image that will be created, in gigabytes. The dom0's VG must have enough free space to allow the LV to be created. Only one virtual disk can be created with this script.

    • <memory>: the amount of memory, in megabytes, to allocate to the VM. The dom0 must have at least this much memory free.

    • <volgroup>: the LVM volume group upon which the disk image should be created. By default the VG matching the dom0's hostname is used.

    • <vcpus>: the number of VCPUs to allocate to the VM.

    • <VLAN>: the name of a VLAN to attach to a virtual NIC in the guest. You can specify multiple VLAN names to attach to (like "--vlan legacy --vlan backups"), and then eth0 will be attached to the first VLAN given, eth1 to the second VLAN given, and so on. You do not need to explicitly configure the build VLAN; that will be provided automatically by the setup script as eth0 (pushing all of the other NICs down one for the duration of the install).

    Example:
    create-hvm-guest --fqdn lennyvpstest.example.com --disk-size 10G --memory 1024 --vcpus 2 --vlan legacy
    Note: The 'create-hvm-guest' script will perform the necessary tasks to create and start the Virtual Machine/Guest. The script will also print out the VNC port that will be used to connect to the new Virtual Machine/Guest. Record this port number for the next step.

Build guest OS

  1. Connect to the new Virtual Machine via VNC. See our separate guide for instructions.

  2. Wait for the VM to boot into the Anchor customer build system (otherwise known as Trogdor).
  3. The build system will provide the user with the following options:
    • Boot from local disk
    • CentOS 5.3 (x86_64)
    • CentOS 5.3 (x86_64, rescue mode)
    • Windows Server 2008 Web Edition
  4. Select one of the operating systems, and wait for the installation to finish.

Finalise setup

  1. Once the install is complete, the VM will soft-reboot and will start into Trogdor again. To boot into the installed OS instead:
    1. Shutdown the VM at the dom0 console with the following command:
      xm shutdown <vmname>
    2. Boot the VM into the installed OS with the following command:
      xm create <vmname>.cfg