Jump to: navigation, search


Revision as of 22:34, 1 May 2013 by Maru (talk | contribs) (Prepare dom0 devstack)

Install XCP

Installation has been tested with XCP 1.6, which can be downloaded here (http://www.xen.org/download/xcp/index_1.6.0.html).

Presuming installation in a virtual machine:

  • ensure that nested virtualization is configured
  • ensure that 2 hard disks of type scsi are available
    • 1 for xcp installation (10gb dynamic allocation suggested)
    • 1 for vm storage (40gb dynamic allocation suggested)

NOTE - OpenStack requires that virtual machine storage be ext. To specify this, select "Enable thin provisioning (Optimised storage for XenDesktop)".

Configure a Storage Repository

To configure a storage repository, login as root to the dom0 host and execute the following:

## List the machine’s UUID
$ xe host-list

## Create an EXT storage repository (SR) with thin provisioning support and direct access to the VHD files.  
# This example uses /dev/sdb, but this may differ for your host.
$ xe sr-create host-uuid=<hit TAB should match UUID above> content-type=user name-label=”Local EXT3 SR” shared=false device-config:device=/dev/sdb type=ext

## Set the SR to use thin provisioning. Otherwise, nova won’t be able to find the SR when it needs to write to disk.
# Look for 'Local EXT3 SR', making note of the associated UUID.
$ xe sr-list
$ xe sr-param-set uuid=<SR uuid> other-config:i18n-key=local-storage

## Set the configured SR as the default.
$ xe pool-list
$ xe pool-param-set uuid=<hit TAB> default-SR=<SR uuid>

Install git in dom0 (optional)

Installing software in dom0 is generally frowned upon, but will make it easier to ensure a devstack working tree in dom0. Copying the devstack tree from another host is also an option.

To install git, execute the following commands in dom0:

## Configure epel repo 
$ rpm --upgrade --replacepkgs http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

## Disable the epel repos, just to be safe
$ sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/epel.repo

## Install git
$ yum --enablerepo=epel -y install git

Prepare dom0 devstack

Whether on dom0 or a local workstation, execute the following commands to prepare a devstack tree that supports OVS+XCP:

$ git clone https://github.com/openstack-dev/devstack.git
$ cd devstack
$ git fetch https://review.openstack.org/openstack-dev/devstack refs/changes/82/27982/1 && git checkout FETCH_HEAD

A suggested localrc for OVS+XCP is as follows:

# The OVS+XCP-supporting quantum branch, currently in review

# 12.04 is only supported with XCP 1.6                   
UBUNTU_INST_TEMPLATE_NAME="Ubuntu 12.04 (64-bit) for DevStack"

# Devstack's XCP support requires this setting for 12.04   

# Configure Q_PLUGIN with openvswitch when running in XS/XCP.  This is
# the default in stack.sh, but not in the xen installer, so it needs
# to be set explicitly in localrc

## Configure the vm network to support the Quantum OVS DHCP agent
# Trunk all VLANS                                          
# Avoid associating the VM network with a device            

# This is the password for your guest (for both stack and root users)
# IMPORTANT: The following must be set to your dom0 root password!
# Explicitly set virt driver here                         
# Explicitly set multi-host                                     
# Give extra time for boot                                
# Interface on which you would like to access services        

# Service overrides                                            
# Add quantum, remove nova network                           
# Enable tempest                                             

# Disable rate limit to support tempest                      

Execute devstack

To invoke devstack on XCP, execute the following in dom0:

$ cd devstack/tools/xen
$ ./install_os_domU.sh

The initial run of devstack may take a long time (depending on the available internet connection), since devstack has to create a new VM (domU) and install ubuntu on it before installing OpenStack. Devstack saves the domU VM as a template after the first install, so subsequent runs will be much faster. If issues occur during installation (an unfortunately common occurrence when XCP is running in a VM), the XenCenter tool (unfortunately Windows-only) will aid in troubleshooting the problem.

Devstack should provide instructions once installation has completed as to how to log in to the domU instance, which will be the equivalent of a regular devstack'd host.

Verify with tempest

After a successful devstack run using the provided localrc, tempest can be used to verify that Quantum+OVS+XCP can correctly provision networking to OpenStack VM's. To run the quantum smoke tests, execute the following in domU:

$ cd /opt/stack/tempest 
$ nosetests tempest/tests/network/test_network_basic_ops.py