Install the XenAPI plug-ins When you use Xen as the hypervisor for OpenStack Compute, you can install a Python script (or any executable) on the host side, and call that through the XenAPI. These scripts are called plug-ins. The XenAPI plug-ins live in the nova code repository. These plug-ins have to be copied to the Dom0 for the hypervisor, to the appropriate directory, where xapi can find them. There are several options for the installation. The important thing is to ensure that the version of the plug-ins are in line with the nova installation by only installing plug-ins from a matching nova repository.
Manually install the plug-in Create temporary files/directories: $ NOVA_ZIPBALL=$(mktemp) $ NOVA_SOURCES=$(mktemp -d) Get the source from github. The example assumes the master branch is used. Amend the URL to match the version being used: $ wget -qO "$NOVA_ZIPBALL" https://github.com/openstack/nova/archive/master.zip $ unzip "$NOVA_ZIPBALL" -d "$NOVA_SOURCES" (Alternatively) To use the official Ubuntu packages, use the following commands to get the nova code base: $ ( cd $NOVA_SOURCES && apt-get source python-nova --download-only ) $ ( cd $NOVA_SOURCES && for ARCHIVE in *.tar.gz; do tar -xzf $ARCHIVE; done ) Copy the plug-ins to the hypervisor: $ PLUGINPATH=$(find $NOVA_SOURCES -path '*/xapi.d/plugins' -type d -print) $ tar -czf - -C "$PLUGINPATH" ./ | ssh root@xenserver tar -xozf - -C /etc/xapi.d/plugins/ Remove the temporary files/directories: $ rm "$NOVA_ZIPBALL" $ rm -rf "$NOVA_SOURCES"
Package a XenServer supplemental pack Follow these steps to produce a supplemental pack from the nova sources, and package it as a XenServer supplemental pack. Create RPM packages. Given you have the nova sources. Use one of the methods in : $ cd nova/plugins/xenserver/xenapi/contrib $ ./build-rpm.sh These commands leave an .rpm file in the rpmbuild/RPMS/noarch/ directory. Pack the RPM packages to a Supplemental Pack, using the XenServer DDK (the following command should be issued on the XenServer DDK virtual appliance, after the produced rpm file has been copied over): $ /usr/bin/build-supplemental-pack.sh \ > --output=output_directory \ > --vendor-code=novaplugin \ > --vendor-name=openstack \ > --label=novaplugins \ > --text="nova plugins" \ > --version=0 \ > full_path_to_rpmfile This command produces an .iso file in the output directory specified. Copy that file to the hypervisor. Install the Supplemental Pack. Log in to the hypervisor, and issue: # xe-install-supplemental-pack path_to_isofile