OpenStack: Difference between revisions

From Xen
Jump to navigationJump to search
 
(35 intermediate revisions by 3 users not shown)
Line 7: Line 7:
[http://docs.openstack.org/trunk/config-reference/content/introduction-to-xen.html#section_compute-configure-xen The OpenStack documentation] reads:
[http://docs.openstack.org/trunk/config-reference/content/introduction-to-xen.html#section_compute-configure-xen The OpenStack documentation] reads:


''"The recommended way to use Xen with OpenStack is through the XenAPI driver. To enable the XenAPI driver, add the following configuration options /etc/nova/nova.conf and restart the nova-compute service:"''
''"The recommended way to use XAPI with OpenStack is through the XenAPI driver. To enable the XenAPI driver, add the following configuration options to /etc/nova/nova.conf and restart OpenStack Compute: "''
<pre>
<pre>
compute_driver = xenapi.XenAPIDriver
compute_driver = xenapi.XenAPIDriver
Line 16: Line 16:
''"These connection details are used by the OpenStack Compute service to contact your hypervisor and are the same details you use to connect XenCenter, the XenServer management console, to your XenServer or XCP box."''
''"These connection details are used by the OpenStack Compute service to contact your hypervisor and are the same details you use to connect XenCenter, the XenServer management console, to your XenServer or XCP box."''


The OpenStack documentation does not reflect the current reality. While XAPI is the clear mechanism for supporting XenServer at this time, most existing Xen Project integration into OpenStack is done through libvirt below.
While XAPI is the preferred mechanism for supporting XenServer (and its deprecated sibling XCP), most existing Xen Project integration with OpenStack is done through libvirt below.


== USING LIBVIRT ==
== USING LIBVIRT ==
[http://docs.openstack.org/trunk/config-reference/content/introduction-to-xen.html#section_compute-configure-xen The OpenStack documentation] reads:
As late as 2014, [http://docs.openstack.org/trunk/config-reference/content/introduction-to-xen.html#section_compute-configure-xen The OpenStack documentation] used to read:


''"It is possible to manage Xen using libvirt, though this is not well-tested or supported. To experiment using Xen through libvirt add the following configuration options /etc/nova/nova.conf:"''
''"It is possible to manage Xen using libvirt, though this is not well-tested or supported. To experiment using Xen through libvirt add the following configuration options /etc/nova/nova.conf:"''
Line 28: Line 28:
</pre>
</pre>


Beyond what the documentation says, however, there are now high-quality instances of libvirt being used to control the Xen Project hypervisor under OpenStack. SUSE and Oracle are both using that technique in commercial OpenStack implementations.
If your documentation says something like that, it is out of date. Currently, the majority of OpenStack integrations in the market use libvirt to employ the Xen Project hypervisor. SUSE, Ubuntu, and Oracle are all using libvirt in their OpenStack implementations.

As of February of 2015, the recommendation is to install software from the latest trees of both OpenStack and libvirt to make sure that your installation has all the patches needed to make Xen Project run correctly. With current levels of software, your Xen Project-based OpenStack cloud will simply work as expected.

The minimum level of libvirt you should use is 1.2.9; earlier versions will have stability problems.

The project also tests the current development trees against OpenStack Nova and runs a [[OpenStack_CI_Loop_for_Xen-Libvirt|CI loop]] against OpenStack Nova commits. These tests have uncovered some race conditions, which have been fixed in the Xen mainline and libvirt mainlines and have been released in Xen 4.5.1 and libvirt 1.2.15.

== TUNING ==
Use the following as a guideline for configuring Xen Project software for use in OpenStack:

=== Dom0 Memory ===
Set it between 1GB and 4GB by adding the following parameter to the '''grub''' command line:
dom0_mem=1024M
=== Dom0 vcpus ===
Set the virtual CPUs to 4 and employ CPU pinning by adding the following parameters to the '''grub''' command line:
dom0_max_vcpus=4 dom0_vcpus_pin

=== Use LVM for local storage ===
Set the volume group name in the '''devstack''' parameters:
VOLUME_GROUP=volume_group_name
=== PV vs HVM guests ===
Use the following OpenStack '''nova''' commands to select the virtualization mode:
nova image-meta <image> set vm_mode=HVM
nova image-meta <image> set vm_mode=XEN
nova image-meta <image> delete vm_mode


== HOWTOs ==
== HOWTOs ==
* Learn about using [[Xen via libvirt for OpenStack juno|Xen Project via libvirt for OpenStack "juno"]]
* Learn about using [[Xen via libvirt for OpenStack juno|Xen Project via libvirt for OpenStack "juno"]]
* Learn how to do [[OpenStack via DevStack]] to quickly install OpenStack on Xen Project on a single machine; and here's our [http://xenproject.org/component/allvideoshare/video/latest/xen-project-4-4-installed-in-openstack-devstack-in-under-15-minutes.html Hands-On Video] which demonstrates how to do this in under 15 minutes
* Getting Started document for [http://www.oracle.com/technetwork/server-storage/vm/ovm-linux-openstack-2202503.pdf OpenStack using Oracle VM] (which uses the Xen Project Hypervisor)
* Using [https://wiki.linaro.org/OpenStack/DevstackOnXenARM OpenStack with Xen Project on ARM64] on the Linaro Wiki
* [http://empt1e.blogspot.co.uk/2015/06/openstack-on-freebsdxen-proof-of-concept.html OpenStack on FreeBSD/Xen Project Proof of Concept] on Roma's blog


== DOCUMENTATION ==
== DOCUMENTATION ==
Line 39: Line 68:
* The OpenStack Wiki documentation for using [https://wiki.openstack.org/wiki/XenServer/XenAndXenServer Xen Project and XenServer]
* The OpenStack Wiki documentation for using [https://wiki.openstack.org/wiki/XenServer/XenAndXenServer Xen Project and XenServer]
* The OpenStack Wiki documentation for using [https://wiki.openstack.org/wiki/Xen/Libvirt Xen Project via libvirt]
* The OpenStack Wiki documentation for using [https://wiki.openstack.org/wiki/Xen/Libvirt Xen Project via libvirt]
* The OpenStack Wiki documentation of the [https://wiki.openstack.org/wiki/HypervisorSupportMatrix Hypervisor Support Matrix] with pointers to current OpenStack bugs when using the Xen Project Hypervisor
* The OpenStack Wiki documentation for using [https://wiki.openstack.org/wiki/XenServer XenServer]
* The OpenStack Wiki documentation for using [https://wiki.openstack.org/wiki/XenServer XenServer]
* Oracle's Getting Started document for [http://www.oracle.com/technetwork/server-storage/vm/ovm-linux-openstack-2202503.pdf OpenStack using Oracle VM] (which uses the Xen Project hypervisor)
* Oracle's Getting Started document for [http://www.oracle.com/technetwork/server-storage/vm/ovm-linux-openstack-2202503.pdf OpenStack using Oracle VM] (which uses the Xen Project Hypervisor)
* The NetIQ Cloud Manager 2.2 documentation for using the [https://www.netiq.com/documentation/cloudmanager22/ncm22_reference/data/b14g94xu.html SUSE Xen Provisioning Adapter]
* The Linaro Wiki entry for using [https://wiki.linaro.org/OpenStack/DevstackOnXenARM OpenStack with Xen Project on ARM64]
* The NetIQ Cloud Manager 2.2 documentation for using the [https://www.netiq.com/documentation/cloudmanager22/ncm22_reference/data/b14g94xu.html SUSE Xen Project Provisioning Adapter]
* Thoughts on configuring XenServer (not Xen Project) for [http://documentation.atomia.com/SkyManager/12.7.0.0/html/nova_xen.html OpenStack Nova]
* Thoughts on configuring XenServer (not Xen Project) for [http://documentation.atomia.com/SkyManager/12.7.0.0/html/nova_xen.html OpenStack Nova]
* [[wikipedia:OpenStack|OpenStack]] Wikipedia entry
* [[wikipedia:OpenStack|OpenStack]] Wikipedia entry
Line 47: Line 78:
== PRESENTATIONS ==
== PRESENTATIONS ==


* Slides from the openSUSE Mini-Summit [http://xenproject.org/component/allvideoshare/video/latest/opensuse-mini-summit-using-xen-project-in-suse-openstack-cloud.html Deploying OpenStack Using the Xen Project Hypervisor on SUSE OpenStack Cloud] held at SCALE 13x in February 2015
* Slides from the highly informative presentation [http://xenproject.org/component/allvideoshare/video/latest/configuring-openstack-to-use-the-xen-project-hypervisor.html Configuring OpenStack to Use the Xen Project Hypervisor] from FOSDEM 2015
* Video presentation on [http://xenproject.org/component/allvideoshare/video/latest/xpus14-xen-in-openstack-an-overview-with-suse-cloud-by-alejandro-bonilla-of-suse.html Xen Project in OpenStack: An Overview with SUSE Cloud] from Xen Project User Summit 2014
* Video presentation on [http://xenproject.org/component/allvideoshare/video/latest/xpus14-xen-in-openstack-an-overview-with-suse-cloud-by-alejandro-bonilla-of-suse.html Xen Project in OpenStack: An Overview with SUSE Cloud] from Xen Project User Summit 2014
* Video presentation on [http://www.xenproject.org/help/presentations-and-videos/video/xpus13-rackspace.html Building the Rackspace Open Cloud with Xen Project and OpenStack] from Xen Project User Summit 2013
* Video presentation on [http://www.xenproject.org/help/presentations-and-videos/video/xpus13-rackspace.html Building the Rackspace Open Cloud with Xen Project and OpenStack] from Xen Project User Summit 2013

== PATCHES ==

The following patches must be included in OpenStack to ensure that everything works correctly:

* https://review.openstack.org/146621
* https://review.openstack.org/146622

These patches were accepted into Nova in February 2015, so later versions of Nova should be fine.

And, as noted earlier, libvirt should have a minimum version of 1.2.9.


[[Category:OpenStack]]
[[Category:OpenStack]]

Latest revision as of 01:55, 27 August 2015

From the OpenStack Documentation:

"The OpenStack Open Source Cloud Mission: to produce the ubiquitous Open Source Cloud Computing platform that will meet the needs of public and private clouds regardless of size, by being simple to implement and massively scalable."

USING XAPI

The OpenStack documentation reads:

"The recommended way to use XAPI with OpenStack is through the XenAPI driver. To enable the XenAPI driver, add the following configuration options to /etc/nova/nova.conf and restart OpenStack Compute: "

compute_driver = xenapi.XenAPIDriver
xenapi_connection_url = http://your_xenapi_management_ip_address
xenapi_connection_username = root
xenapi_connection_password = your_password

"These connection details are used by the OpenStack Compute service to contact your hypervisor and are the same details you use to connect XenCenter, the XenServer management console, to your XenServer or XCP box."

While XAPI is the preferred mechanism for supporting XenServer (and its deprecated sibling XCP), most existing Xen Project integration with OpenStack is done through libvirt below.

USING LIBVIRT

As late as 2014, The OpenStack documentation used to read:

"It is possible to manage Xen using libvirt, though this is not well-tested or supported. To experiment using Xen through libvirt add the following configuration options /etc/nova/nova.conf:"

compute_driver = libvirt.LibvirtDriver
[libvirt]
virt_type = xen

If your documentation says something like that, it is out of date. Currently, the majority of OpenStack integrations in the market use libvirt to employ the Xen Project hypervisor. SUSE, Ubuntu, and Oracle are all using libvirt in their OpenStack implementations.

As of February of 2015, the recommendation is to install software from the latest trees of both OpenStack and libvirt to make sure that your installation has all the patches needed to make Xen Project run correctly. With current levels of software, your Xen Project-based OpenStack cloud will simply work as expected.

The minimum level of libvirt you should use is 1.2.9; earlier versions will have stability problems.

The project also tests the current development trees against OpenStack Nova and runs a CI loop against OpenStack Nova commits. These tests have uncovered some race conditions, which have been fixed in the Xen mainline and libvirt mainlines and have been released in Xen 4.5.1 and libvirt 1.2.15.

TUNING

Use the following as a guideline for configuring Xen Project software for use in OpenStack:

Dom0 Memory

Set it between 1GB and 4GB by adding the following parameter to the grub command line:

 dom0_mem=1024M

Dom0 vcpus

Set the virtual CPUs to 4 and employ CPU pinning by adding the following parameters to the grub command line:

dom0_max_vcpus=4 dom0_vcpus_pin

Use LVM for local storage

Set the volume group name in the devstack parameters:

 VOLUME_GROUP=volume_group_name

PV vs HVM guests

Use the following OpenStack nova commands to select the virtualization mode:

 nova image-meta <image> set vm_mode=HVM
 nova image-meta <image> set vm_mode=XEN
 nova image-meta <image> delete vm_mode

HOWTOs

DOCUMENTATION

PRESENTATIONS

PATCHES

The following patches must be included in OpenStack to ensure that everything works correctly:

These patches were accepted into Nova in February 2015, so later versions of Nova should be fine.

And, as noted earlier, libvirt should have a minimum version of 1.2.9.