A SERVICE OF

logo

17
xe vm-cd-add vm=<vm_name> cd-name="<host_cd_drive_name_label>" device=3
6. Get the UUID of the VBD corresponding to the new virtual CD drive:
xe vbd-list vm-uuid=<vm_uuid> type=CD params=uuid --minimal
7. Make the VBD of the virtual CD bootable:
xe vbd-param-set uuid=<cd_drive_uuid> bootable=true
8. Set the install repository of the VM to be the CD drive:
xe vm-param-set uuid=<vm_uuid> other-config:install-repository=cdrom
9. Insert the Debian Squeeze installation CD into the CD drive on the XenServer host.
10. Open a console to the VM with XenCenter or an SSH terminal and follow the steps to perform the OS
installation.
11. Start the VM; it boots straight into the Debian installer:
xe vm-start uuid=<UUID>
12. See the sections that follow for instructions on how to install the guest utilities and how to configure
graphical display.
5.3. Creating a Linux VM by Installing From an ISO Image
This section shows the CLI procedure for creating a Linux VM, by installing the OS from network-accessible ISO.
Example: Installing a Linux VM from a Network-Accessible ISO Image
1. Run the command
xe vm-install template=<template> new-name-label=<name_for_vm> \
sr-uuid=<storage_repository_uuid>
This command returns the UUID of the new VM.
2. 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
3. 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
4. Set the install-repository key of the other-config parameter to the path of your network
repository. For example, to use http://mirror.centos.org/centos/6/os/x86_64 as the URL
of the vendor media:
xe vm-param-set uuid=<vm_uuid> \
other-config:install-repository=http://mirror.centos.org/centos/6/os/x86_64
5. Start the VM
xe vm-start uuid=<vm_uuid>
6. Connect to the VM console using XenCenter or VNC and perform the OS installation.
5.3.1. Network Installation Notes
The XenServer guest installer allows you to install an operating system from a network-accessible ISO image onto
a VM. To prepare for installing from an ISO, make an exploded network repository of your vendor media (not ISO
images) and export it over NFS, HTTP or FTP so that it is accessible to the XenServer host administration interface.
See Appendix E, Setting Up a Red Hat Installation Server for information on how to copy a set of installation CDs
to a network drive.