This chapter describes how to setup a base Citrix Hypervisor system, running a DDK Virtual Machine (VM), for examining the examples provided in this document, and for use in the development of supplemental packs.
If you want to construct supplemental packs as part of your own build systems, consult the appropriate section later in this document.
The high-level process of setting up a DDK VM to create a supplemental pack is:
Obtain matching Citrix Hypervisor product and DDK build ISOs.
Install Citrix Hypervisor onto a host server.
Install the XenCenter administrator console onto a Windows-based machine.
Use XenCenter to import the DDK onto the Citrix Hypervisor host as a new virtual machine.
Installing Citrix Hypervisor
Installing Citrix Hypervisor only requires booting from the CD-ROM image, and answering a few basic questions. After setup completes, take note of the host IP address shown, as it is required for connection from XenCenter.
XenCenter, the Citrix Hypervisor administration console, must be installed on a separate Windows-based machine. Inserting the Citrix Hypervisor installation CD will run the XenCenter installer automatically. Once installed, the XenCenter console will be displayed with no servers connected.
Connect XenCenter to the Citrix Hypervisor host
Within XenCenter select the Server > Add menu option and supply the appropriate host name/IP address and password for the Citrix Hypervisor host.
Select the newly connected host in the left-hand tree view.
Importing the DDK VM through XenCenter
You can also import the DDK directly on the host using the xe Command Line Interface (CLI).
Download the Citrix Hypervisor DDK from the Citrix Hypervisor downloads page onto the system where XenCenter is installed.
On the File menu, select the Import option. The Import Wizard is displayed.
Click Browse and select DDK file that you downloaded.
Proceed through the Import Wizard to select the server, storage, and network for your DDK VM.
Select Start the new VM automatically as soon as the import is complete.
Finish the Import Wizard.
The DDK VM starts automatically.
Importing the DDK VM using the CLI
The DDK VM can also be imported directly on the Citrix Hypervisor host using the xe CLI and standard Linux commands to mount the DDK ISO.
Mount the DDK ISO and import the DDK VM:
mkdir -p /mnt/tmp mount <path_to_DDK_ISO>/ddk.iso /mnt/tmp –o loop,ro xe vm-import filename=/mnt/tmp/ddk/ova.xml <!--NeedCopy-->
The universally unique identifier (UUID) of the DDK VM is returned when the import completes.
Add a virtual network interface to the DDK VM:
xe network-list <!--NeedCopy-->
Note the UUID of the appropriate network to use with the DDK VM, typically this will be the network with a
Pool-wide network associated with eth0.
xe vif-create network-uuid=<network_uuid> vm-uuid=<ddk_vm_uuid> device=0 <!--NeedCopy-->
Use tab completion to avoid entering more than the first couple of characters of the UUIDs.
Start the DDK VM:
xe vm-start uuid=<ddk_vm_uuid> <!--NeedCopy-->
Using the DDK VM
Select the DDK VM in the left pane and then select the Console tab in the right pane to display the console of the DDK VM to provide a terminal window in which you can work.
The DDK VM is Linux-based so you are free to use other methods such as ssh to access the DDK VM. You can also access the DDK VM console directly from the host console.
Adding Extra Packages to the DDK VM
The DDK is built to be as close as possible to the Citrix Hypervisor control domain (Dom0). This means that only a small number of extra packages are present in the DDK (to enable the compilation of kernel modules) as compared to Dom0. In some cases, partners who want to use the DDK as a build environment might want to add extra packages (e.g. NIS authentication) to the DDK.
Because the DDK (and Dom0) are based on CentOS, any package that is available for that distribution can be installed into the DDK, using the Yum package manager. However, it is necessary to explicitly enable the CentOS repositories to allow such installation. Package installation must therefore be carried out using the command:
yum install <packageName>
Accessing the DDK VM console from the host console
The DDK VM text console can be accessed directly from the Citrix Hypervisor host console instead of using XenCenter. Note that using this method disables access to the DDK console from XenCenter.
While the DDK VM is shut down, disable VNC access on the VM record:
xe vm-param-set uuid=<ddk_vm_uuid> other-config:disable_pv_vnc=1
Start the VM
xe vm-start uuid=<ddk_vm_uuid>
Retrieve the underlying domain ID of the VM:
xe vm-list params=dom-id uuid=<ddk_vm_uuid> --minimal
Connect to the VM text console:
When complete, exit the xenconsole session using CTRL-]
For more information about using the xe CLI, see the command line interface documentation.