Citrix Systems 5.6 Server User Manual


 
21
Note:
When installing a new Linux-based VM, it is important to fully finish the installation and reboot it before
performing any other operations on it. This is analogous to not interrupting a Windows installation — which
would leave you with a non-functional VM.
To install a Linux VM from a network-accessible copy of vendor media using the CLI
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://server/RedHat/5.0 as the URL of the vendor media:
xe vm-param-set uuid=<vm_uuid> \
other-config:install-repository=<http://server/redhat/5.0>
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.
Installing RHEL using a kickstart file
When you are installing RHEL through XenCenter's New VM Wizard, you can automate the installation
by using a Red Hat Kickstart file. A Red Hat Kickstart file is an automated installation method, similar to
an answer file, you can use to provide responses to RHEL's installation prompts. To create this file, install
RHEL manually. The kickstart file is located in /root/anaconda-ks.cfg.
To install RHEL Linux using a custom kickstart file (from XenCenter)
1. In XenCenter, choose the appropriate RHEL template
2. Specify the kickstart file to use as a kernel command-line argument in the XenCenter New VM Wizard,
exactly as it would be specified in the PXE config file, for example:
ks=http://server/fileksdevice=eth0
3. On the command line, use vm-param-set to set the PV-args parameter to make use of a Kickstart file
xe vm-param-set uuid=<vm_uuid> PV-args=<"ks=http://server/path ksdevice=eth0">
4. Set the repository location so XenServer knows where to get the kernel and initrd from for the
installer boot:
xe vm-param-set uuid=<vm_uuid> other-config:install-repository=<http://server/path>
Note: