XenServer - ImportError: No module named os_xenapi.client
I'm trying to set up OpenStack Ocata on 2 XenServer hosts and ran into some problems regarding the XenAPI plugins. Following the official documentation for https://docs.openstack.org/ocata/config-reference/compute/hypervisor-xen-api.html (OpenStack/XenServer integration), there seemed to be big disrepancies in the installation guide, particularly in steps 2 and 3 of manually installing OpenStack XAPI plugins onto the host:
Step 2 - Get the source from the http://openstack.org archives. The example assumes the master branch is used, and the XenServer host is accessible as xenserver. Match those parameters to your setup.
$ NOVA_URL=https://tarballs.openstack.org/nova/nova-master.tar.gz
$ wget -qO "$NOVA_TARBALL" "$NOVA_URL"
$ tar xvf "$NOVA_TARBALL" -d "$NOVA_SOURCES"
Step 3 - 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
The first problem was that the nova-master.tar.gz
tarball actually did not contain any paths to the XAPI plugins, making the PLUGINPATH
in step 3 return empty.
Nonetheless, searching through the https://tarballs.openstack.org/
manually, I found another tarball os-xenapi-master.tar.gz
which actually had the plugins, and followed the rest of the steps described in the documentation (with minor corrections).
After changing all the required configs in nova.conf
and taking care of other required steps for XenServer listed on the docs, I tried starting Nova on the compute node, however, it failed with the following results in the /var/log/nova/nova-compute.log
:
2017-08-04 17:54:05.657 2957 INFO nova.virt.driver [req-9a05d390-d7ce-43a4----] Loading compute driver 'xenapi.XenAPIDriver'
2017-08-04 17:54:05.657 2957 INFO nova.virt.driver [req-9a05d390-d7ce-43a4----] Unable to load the virtualization driver
.
.
.
2017-08-04 17:55:05.720 2957 ERROR nova.virt.driver from os_xenapi.client import session
2017-08-04 17:54:05.720 2957 ERROR nova.virt.driver ImportError: No module named os_xenapi.client
Checking if Nova works at all, I reverted to using basic QEMU, which was successful since running openstack hypervisor list
on the controller node then listed the compute node being up with QEMU as hypervisor, meaning, the problem lies somewhere with XAPI plugins. Both controller and compute node are located on the same host, and both running CentOS 7.
Does anyone know any possible solutions to get OpenStack working with XenServer, or is there something I am doing wrong? All help is greatly appreciated!