← Back to team overview

openstack team mailing list archive

Re: [OpenStack] Xen Hypervisor

 

It looks like you're hitting a recently introduced bug (maybe).  I haven't run the code, but from reading through, it looks like the xenhost.host_data plugin command is going to barf if it is not passed a host_uuid parameter.  It used to gracefully handle that case, but since 37a392dc it's not doing so any more.  The plugin is being called with no arguments from nova.virt.xenapi.host.

Cc'd John Garbutt, who wrote that bit of code.

Ewan.

From: openstack-bounces+ewan.mellor=citrix.com@xxxxxxxxxxxxxxxxxxx [mailto:openstack-bounces+ewan.mellor=citrix.com@xxxxxxxxxxxxxxxxxxx] On Behalf Of Alexandre Leites
Sent: 23 March 2012 10:46
To: openstack@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Openstack] [OpenStack] Xen Hypervisor

Hi folks,

Sorry for late reply, i was trying to install this without following any ready-to-use scripts ( but i used one :( ) to understand how things are made. So i installed XCP 1.4.90 from DVD and configured it from installation screen.

Execute the following commands on dom0
------- Dom 0 Extra Config --------
cd /etc/xapi.d/plugins/
wget -q https://raw.github.com/openstack/nova/master/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenhost
wget -q https://raw.github.com/openstack/nova/master/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py
wget -q https://raw.github.com/openstack/nova/master/plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py
wget -q https://raw.github.com/openstack/nova/master/plugins/xenserver/xenapi/etc/xapi.d/plugins/migration
wget -q https://raw.github.com/openstack/nova/master/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
wget -q https://raw.github.com/openstack/nova/master/plugins/xenserver/xenapi/etc/xapi.d/plugins/agent
chmod 777 *
service xapi restart
-----------------------------------

After that i downloaded XenCenter and created a VM from Ubuntu Server 11.10 CD... (all from below is on guest)

After this, i did updated all the system with command apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y and rebooted the machine. When you do this, you'll boot on newer kernel (3.0.0-16-server, check with uname -a command)... and unsinstall the old kernel (apt-get purge linux-image-3.0.0-12-server).

After this, i did installed the virtual kernel (3.0.0-16-virtual) and rebooted the machine. Check if you rebooted in this kernel via uname -a and unsinstall the old kernel.

After this, execute on dom0 again:
------- Dom 0 Extra Config --------
cd ~
wget http://94.212.78.134/res/xenserver/makepv.sh
chmod +x makepv.sh
./makepv.sh YOUR-XEN-GUEST-NAME
-----------------------------------

After this, you can do
apt-get install -y cracklib-runtime curl wget ssh openssh-server tcpdump ethtool python-pip git vim-nox sudo
and
pip install xenapi
wget http://images.ansolabs.com/xen/xe-guest-utilities_5.6.100-651_amd64.deb -O xe-guest-utilities_5.6.100-651_amd64.deb
dpkg -i xe-guest-utilities_5.6.100-651_amd64.deb
update-rc.d -f xe-linux-distribution remove
update-rc.d xe-linux-distribution defaults

mkdir -p /usr/share/cracklib
echo a | cracklib-packer
pwconv

echo root:password | chpasswd

rm -f /etc/localtime
groupadd libvirtd
useradd stack -s /bin/bash -d /opt/stack -G libvirtd
echo stack:password | chpasswd
echo "stack ALL=(ALL) NOPASSWD: ALL" >> etc/sudoers
mkdir -p /opt/stack
chown -R stack /opt/stack

After all this, you can install nova-compute , copy nova.conf from your controller and configure the following vars:
--connection_type=xenapi
--xenapi_connection_username=root
--xenapi_connection_password=password
--xenapi_connection_url=http://<<XENDOM0IP>>

and restart your nova-compute service.

You can test your XenAPI configuration using sudo nova-manage shell python and after pasting this
import XenAPI
import nova.virt.xenapi_conn
nova.virt.xenapi_conn.XenAPI = XenAPI
x = nova.virt.xenapi_conn.XenAPIConnection("http://<<XENDOM0IP>>","root","password")
x.list_instances()

------

After all this things, i got Xen working, but i have a error with bridge now, as trace below:

2012-03-23 16:30:00,116 DEBUG nova.virt.xenapi [-] Updating host stats from (pid=23556) update_status /usr/lib/python2.7/dist-packages/nova/virt/xenapi_conn.py:488
2012-03-23 16:30:00,988 WARNING nova.virt.xenapi [-] Task [Async.host.call_plugin] OpaqueRef:d7a9f0df-0c7c-a760-6b76-3e985c747b1d status: failure    ['XENAPI_PLUGIN_FAILURE', 'host_data', 'KeyError', "'host_uuid'"]
2012-03-23 16:30:00,992 WARNING nova.compute.manager [-] Error during report_driver_status(): ['XENAPI_PLUGIN_FAILURE', 'host_data', 'KeyError', "'host_uuid'"]
2

And yes, my permissions are 777 to all plugins.
> From: todd.deshane@xxxxxxx
> Date: Wed, 21 Mar 2012 11:04:19 -0400
> To: openstack@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Openstack] [OpenStack] Xen Hypervisor
>
> Just realized my reply was accidentally not sent to the list.
>
> On Tue, Mar 20, 2012 at 2:03 PM, Todd Deshane <todd.deshane@xxxxxxx> wrote:
> > Please post specific error messages.
> >
> > Some general suggestions inline.
> >
> > On Tue, Mar 20, 2012 at 12:56 PM, Alexandre Leites <alex_tkd@xxxxxxxx> wrote:
> >> Hi folks,
> >>
> >> First let me say that i'm trying to install xen hypervisor and integrate it
> >> with OpenStack for more than one week. I'm studying OpenStack for a company
> >> and this company doesn't allow us to use ready scripts (Why? they want to be
> >> different from the whole world).
> >>
> >> I have used some links for references:
> >> https://github.com/openstack-dev/devstack/blob/master/tools/xen/README.md
> >> http://wiki.openstack.org/XenAPI
> >> http://wiki.openstack.org/XenServer/DevStack
> >> http://wiki.openstack.org/XenServer/Install
> >> http://wiki.openstack.org/XenServerDevelopment
> >> http://wiki.openstack.org/XenXCPAndXenServer
> >> http://wiki.xen.org/wiki/XAPI_on_Ubuntu
> >> http://wiki.xen.org/xenwiki/XAPI_on_debian
> >> https://github.com/openstack/openstack-chef/tree/master/cookbooks/xenserver
> >> https://review.openstack.org/#change,5419
> >>
> >> Me and my coworker are trying to install this and integrate on a running and
> >> tested OpenStack infrastructure, so this machines will have just
> >> nova-compute service. He is trying with XCP and I with XenServer, so let me
> >> introduces our tries:
> >>
> >> 1. XCP On Ubuntu (Kronos)
> >> * Install fine
> >> * Doesn't work
> >>
> >
> > There are devstack scripts that create the VMs for you on this
> > xcp-toolstack branch.
> > https://github.com/mcclurmc/devstack/tree/xcp-toolstack
> >
> > Kronos hasn't officially been released to anything stable yet, but
> > Ubuntu 12.04 and Debian Wheezy should have decently stable support.
> >
> >> 2. XCP On CentOS
> >> * Install fine
> >> * We can run a instance of Ubuntu using XenCenter
> >> * Installed nova-compute and configured it.
> >> * No Errors, but when we try to run a instance on it, appears on an error
> >> about XAPI.
> >> * We read something about privileged guest, how to set it?
> >>
> >
> > It sounds like you need to convert your VM to a PV guest and not a HVM guest.
> >
> > see:
> > https://lists.launchpad.net/openstack/msg06522.html
> >
> >> 3. DevStack (We can't use this, but also tried to)
> >> * Install XenServer (or XCP, we tested on both)
> >> * Following
> >> https://github.com/openstack-dev/devstack/blob/master/tools/xen/README.md
> >> guide
> >> * On Step 4, it wont create ALLINONE.xva and give some errors about
> >> directories on console (running script with root user on XenServer)
> >>
> > post the specific errors and we can help you work through it.
> >
> >> I hope that someone can help me solve this problems, and maybe help someone
> >> else to install Xen and integrate with OpenStack.
> >>
> >> @OffTopic
> >> Why this is so difficult?
> >
> > We are working on making everything work together smoothly. Sorry that
> > you have ran into so much trouble so far.
> >
> > Cheers,
> > Todd
> >
> > --
> > Todd Deshane
> > http://www.linkedin.com/in/deshantm
> > http://blog.xen.org/
> > http://wiki.xen.org/
>
>
>
> --
> Todd Deshane
> http://www.linkedin.com/in/deshantm
> http://blog.xen.org/
> http://wiki.xen.org/
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp

Follow ups

References