A SERVICE OF

logo

16
5.1. Creating a Linux VM by Installing from an Internet Repository
This section shows the xe CLI procedure for creating a Linux VM, using a Debian Squeeze example, by installing
the OS from an internet repository.
Example: Installing a Debian Squeeze VM from a network repository
1. Create a VM from the Debian Squeeze template. The UUID of the VM is returned:
xe vm-install template=<template-name> new-name-label=<squeeze-vm>
2. Specify the installation repository — this should be a Debian mirror with at least the packages required to
install the base system and the additional packages you plan to select during the Debian installer:
xe vm-param-set uuid=<UUID> other-config:install-repository=<path_to_repository>
An example of a valid repository path is http://ftp.<xx>.debian.org/debian where <xx> is your
country code (see the Debian mirror list for a list of these). For multiple installations Citrix recommends using
a local mirror or apt proxy to avoid generating excessive network traffic or load on the central repositories.
Note:
The Debian installer supports only HTTP and FTP apt repos, NFS is NOT supported.
3. Find the UUID of the network that you want to connect to. For example, if it is the one attached to xenbr0:
xe network-list bridge=xenbr0 --minimal
4. Create a VIF to connect the new VM to this network:
xe vif-create vm-uuid=<vm_uuid> network-uuid=<network_uuid> mac=random device=0
5. Start the VM; it boots straight into the Debian installer:
xe vm-start uuid=<UUID>
6. Follow the Debian Installer procedure to install the VM in the configuration you require.
7. See below for instructions on how to install the guest utilities and how to configure graphical display.
5.2. Creating a Linux VM by Installing from a Physical CD/DVD
This section shows the CLI procedure for creating a Linux VM, using a Debian Squeeze example, by installing the
OS from a physical CD/DVD.
Example: Installing a Debian Squeeze VM from CD/DVD (using the CLI)
1. Create a VM from the Debian Squeeze template. The UUID of the VM is returned:
xe vm-install template=<template-name> new-name-label=<vm-name>
2. Get the UUID of the root disk of the new VM:
xe vbd-list vm-uuid=<vm_uuid> userdevice=0 params=uuid --minimal
3. Using the UUID returned, set the root disk to not be bootable:
xe vbd-param-set uuid=<root_disk_uuid> bootable=false
4. Get the name of the physical CD drive on the XenServer host:
xe cd-list
The result of this command should give you something like SCSI 0:0:0:0 for the name-label field.
5. Add a virtual CD-ROM to the new VM using the XenServer host CD drive name-label parameter as the
cd-name parameter: