libvirt: Drop support for Xen

This hasn't been validated upstream and there doesn't appear to be
anyone using it. It's time to drop support for this. This is mostly test
and documentation damage, though there is some other cleanup going on,
like the removal of the essentially noop 'pick_disk_driver_name' helper.

Change-Id: I73305e82da5d8da548961b801a8e75fb0e8c4cf1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2020-07-27 14:20:12 +01:00 committed by Lee Yarwood
parent d02ce3c4f0
commit 3a390c2c82
31 changed files with 140 additions and 1165 deletions

View File

@ -68,7 +68,6 @@ availability zones. Compute supports the following hypervisors:
- `VMware vSphere
<https://www.vmware.com/support/vsphere-hypervisor.html>`__
- `Xen (using libvirt) <https://www.xenproject.org>`__
- `zVM <https://www.ibm.com/it-infrastructure/z/zvm>`__

View File

@ -811,7 +811,7 @@ Tag VMware images
In a mixed hypervisor environment, OpenStack Compute uses the
``hypervisor_type`` tag to match images to the correct hypervisor type. For
VMware images, set the hypervisor type to ``vmware``. Other valid hypervisor
types include: ``hyperv``, ``ironic``, ``lxc``, ``qemu``, and ``xen``.
types include: ``hyperv``, ``ironic``, ``lxc``, and ``qemu``.
Note that ``qemu`` is used for both QEMU and KVM hypervisor types.
.. code-block:: console

View File

@ -1,239 +0,0 @@
===============
Xen via libvirt
===============
OpenStack Compute supports the Xen Project Hypervisor (or Xen). Xen can be
integrated with OpenStack Compute via the `libvirt <http://libvirt.org/>`_
`toolstack <http://wiki.xen.org/wiki/Choice_of_Toolstacks>`_ `toolstack
<http://wiki.xen.org/wiki/Choice_of_Toolstacks>`_.
Installing Xen with libvirt
~~~~~~~~~~~~~~~~~~~~~~~~~~~
At this stage we recommend using the baseline that we use for the `Xen Project
OpenStack CI Loop
<http://wiki.xenproject.org/wiki/OpenStack_CI_Loop_for_Xen-Libvirt>`_, which
contains the most recent stability fixes to both Xen and libvirt.
`Xen 4.5.1
<https://xenproject.org/downloads/xen-project-archives/xen-project-4-5-series/xen-project-4-5-1/>`_
(or newer) and `libvirt 1.2.15 <http://libvirt.org/sources/>`_ (or newer)
contain the minimum required OpenStack improvements for Xen. Although libvirt
1.2.15 works with Xen, libvirt 1.3.2 or newer is recommended. The necessary
Xen changes have also been backported to the Xen 4.4.3 stable branch. Please
check with the Linux and FreeBSD distros you are intending to use as `Dom 0
<http://wiki.xenproject.org/wiki/Category:Host_Install>`_, whether the relevant
version of Xen and libvirt are available as installable packages.
The latest releases of Xen and libvirt packages that fulfil the above minimum
requirements for the various openSUSE distributions can always be found and
installed from the `Open Build Service
<https://build.opensuse.org/project/show/Virtualization>`_ Virtualization
project. To install these latest packages, add the Virtualization repository
to your software management stack and get the newest packages from there. More
information about the latest Xen and libvirt packages are available `here
<https://build.opensuse.org/package/show/Virtualization/xen>`__ and `here
<https://build.opensuse.org/package/show/Virtualization/libvirt>`__.
Alternatively, it is possible to use the Ubuntu LTS 14.04 Xen Package
**4.4.1-0ubuntu0.14.04.4** (Xen 4.4.1) and apply the patches outlined `here
<http://wiki.xenproject.org/wiki/OpenStack_CI_Loop_for_Xen-Libvirt#Baseline>`__.
You can also use the Ubuntu LTS 14.04 libvirt package **1.2.2
libvirt_1.2.2-0ubuntu13.1.7** as baseline and update it to libvirt version
1.2.15, or 1.2.14 with the patches outlined `here
<http://wiki.xenproject.org/wiki/OpenStack_CI_Loop_for_Xen-Libvirt#Baseline>`__
applied. Note that this will require rebuilding these packages partly from
source.
For further information and latest developments, you may want to consult the
Xen Project's `mailing lists for OpenStack related issues and questions
<http://lists.xenproject.org/cgi-bin/mailman/listinfo/wg-openstack>`_.
Configuring Xen with libvirt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To enable Xen via libvirt, ensure the following options are set in
``/etc/nova/nova.conf`` on all hosts running the ``nova-compute`` service.
.. code-block:: ini
compute_driver = libvirt.LibvirtDriver
[libvirt]
virt_type = xen
Additional configuration options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Use the following as a guideline for configuring Xen for use in OpenStack:
#. **Dom0 memory**: Set it between 1GB and 4GB by adding the following
parameter to the Xen Boot Options in the `grub.conf <http://
xenbits.xen.org/docs/unstable/misc/xen-command-line.html>`_ file.
.. code-block:: ini
dom0_mem=1024M
.. note::
The above memory limits are suggestions and should be based on the
available compute host resources. For large hosts that will run many
hundreds of instances, the suggested values may need to be higher.
.. note::
The location of the grub.conf file depends on the host Linux distribution
that you are using. Please refer to the distro documentation for more
details (see `Dom 0 <http://wiki.xenproject.org
/wiki/Category:Host_Install>`_ for more resources).
#. **Dom0 vcpus**: Set the virtual CPUs to 4 and employ CPU pinning by adding
the following parameters to the Xen Boot Options in the `grub.conf
<http://xenbits.xen.org/docs/unstable/misc/xen-command-line.html>`_ file.
.. code-block:: ini
dom0_max_vcpus=4 dom0_vcpus_pin
.. note::
Note that the above virtual CPU limits are suggestions and should be
based on the available compute host resources. For large hosts, that will
run many hundred of instances, the suggested values may need to be
higher.
#. **PV vs HVM guests**: A Xen virtual machine can be paravirtualized (PV) or
hardware virtualized (HVM). The virtualization mode determines the
interaction between Xen, Dom 0, and the guest VM's kernel. PV guests are
aware of the fact that they are virtualized and will co-operate with Xen and
Dom 0. The choice of virtualization mode determines performance
characteristics. For an overview of Xen virtualization modes, see `Xen Guest
Types <http://wiki.xen.org/wiki/Xen_Overview#Guest_Types>`_.
In OpenStack, customer VMs may run in either PV or HVM mode. The mode is a
property of the operating system image used by the VM, and is changed by
adjusting the image metadata stored in the Image service. The image
metadata can be changed using the :command:`openstack` commands.
To choose one of the HVM modes (HVM, HVM with PV Drivers or PVHVM), use
:command:`openstack` to set the ``vm_mode`` property to ``hvm``.
To choose one of the HVM modes (HVM, HVM with PV Drivers or PVHVM), use one
of the following two commands:
.. code-block:: console
$ openstack image set --property vm_mode=hvm IMAGE
To chose PV mode, which is supported by NetBSD, FreeBSD and Linux, use one
of the following two commands
.. code-block:: console
$ openstack image set --property vm_mode=xen IMAGE
.. note::
The default for virtualization mode in nova is PV mode.
#. **Image formats**: Xen supports raw, qcow2 and vhd image formats. For more
information on image formats, refer to the `OpenStack Virtual Image Guide
<https://docs.openstack.org/image-guide/introduction.html>`__ and the
`Storage Options Guide on the Xen Project Wiki
<http://wiki.xenproject.org/wiki/Storage_options>`_.
#. **Image metadata**: In addition to the ``vm_mode`` property discussed above,
the ``hypervisor_type`` property is another important component of the image
metadata, especially if your cloud contains mixed hypervisor compute nodes.
Setting the ``hypervisor_type`` property allows the nova scheduler to select
a compute node running the specified hypervisor when launching instances of
the image. Image metadata such as ``vm_mode``, ``hypervisor_type``,
architecture, and others can be set when importing the image to the Image
service. The metadata can also be changed using the :command:`openstack`
commands:
.. code-block:: console
$ openstack image set --property hypervisor_type=xen vm_mode=hvm IMAGE
For more information on image metadata, refer to the `OpenStack Virtual
Image Guide <https://docs.openstack.org/image-guide/introduction.html#image-metadata>`__.
#. **Libguestfs file injection**: OpenStack compute nodes can use `libguestfs
<http://libguestfs.org/>`_ to inject files into an instance's image prior to
launching the instance. libguestfs uses libvirt's QEMU driver to start a
qemu process, which is then used to inject files into the image. When using
libguestfs for file injection, the compute node must have the libvirt qemu
driver installed, in addition to the Xen driver. In RPM based distributions,
the qemu driver is provided by the ``libvirt-daemon-qemu`` package. In
Debian and Ubuntu, the qemu driver is provided by the ``libvirt-bin``
package.
Troubleshoot Xen with libvirt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**Important log files**: When an instance fails to start, or when you come
across other issues, you should first consult the following log files:
* ``/var/log/nova/nova-compute.log``
* ``/var/log/libvirt/libxl/libxl-driver.log``,
* ``/var/log/xen/qemu-dm-${instancename}.log``,
* ``/var/log/xen/xen-hotplug.log``,
* ``/var/log/xen/console/guest-${instancename}`` (to enable see `Enabling Guest
Console Logs
<http://wiki.xen.org/wiki/Reporting_Bugs_against_Xen#Guest_console_logs>`_)
* Host Console Logs (read `Enabling and Retrieving Host Console Logs
<http://wiki.xen.org/wiki/Reporting_Bugs_against_Xen#Host_console_logs>`_).
If you need further help you can ask questions on the mailing lists `xen-users@
<http://lists.xenproject.org/cgi-bin/mailman/listinfo/ xen-users>`_,
`wg-openstack@ <http://lists.xenproject.org/cgi-bin/mailman/
listinfo/wg-openstack>`_ or `raise a bug <http://wiki.xen.org/wiki/
Reporting_Bugs_against_Xen>`_ against Xen.
Known issues
~~~~~~~~~~~~
* **Live migration**: Live migration is supported in the libvirt libxl driver
since version 1.2.5. However, there were a number of issues when used with
OpenStack, in particular with libvirt migration protocol compatibility. It is
worth mentioning that libvirt 1.3.0 addresses most of these issues. We do
however recommend using libvirt 1.3.2, which is fully supported and tested as
part of the Xen Project CI loop. It addresses live migration monitoring
related issues and adds support for peer-to-peer migration mode, which nova
relies on.
* **Live migration monitoring**: On compute nodes running Kilo or later, live
migration monitoring relies on libvirt APIs that are only implemented from
libvirt version 1.3.1 onwards. When attempting to live migrate, the migration
monitoring thread would crash and leave the instance state as "MIGRATING". If
you experience such an issue and you are running on a version released before
libvirt 1.3.1, make sure you backport libvirt commits ad71665 and b7b4391
from upstream.
Additional information and resources
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following section contains links to other useful resources.
* `wiki.xenproject.org/wiki/OpenStack <http://wiki.xenproject.org/wiki/
OpenStack>`_ - OpenStack Documentation on the Xen Project wiki
* `wiki.xenproject.org/wiki/OpenStack_CI_Loop_for_Xen-Libvirt
<http://wiki.xenproject.org/wiki/OpenStack_CI_Loop_for_Xen-Libvirt>`_ -
Information about the Xen Project OpenStack CI Loop
* `wiki.xenproject.org/wiki/OpenStack_via_DevStack
<http://wiki.xenproject.org/wiki/OpenStack_via_DevStack>`_ - How to set up
OpenStack via DevStack
* `Mailing lists for OpenStack related issues and questions
<http://lists.xenproject.org/cgi-bin/mailman/listinfo/wg-openstack>`_ - This
list is dedicated to coordinating bug fixes and issues across Xen, libvirt
and OpenStack and the CI loop.

View File

@ -8,7 +8,6 @@ Hypervisors
hypervisor-basics
hypervisor-kvm
hypervisor-qemu
hypervisor-xen-libvirt
hypervisor-lxc
hypervisor-vmware
hypervisor-hyper-v
@ -39,10 +38,6 @@ The following hypervisors are supported:
* `VMware vSphere`_ 5.1.0 and newer - Runs VMware-based Linux and Windows
images through a connection with a vCenter server.
* `Xen (using libvirt)`_ - Xen Project Hypervisor using libvirt as
management interface into ``nova-compute`` to run Linux, Windows, FreeBSD and
NetBSD virtual machines.
* `Hyper-V`_ - Server virtualization with Microsoft Hyper-V, use to run
Windows, Linux, and FreeBSD virtual machines. Runs ``nova-compute`` natively
on the Windows virtualization platform.
@ -90,7 +85,6 @@ virt drivers:
.. _LXC: https://linuxcontainers.org
.. _QEMU: https://wiki.qemu.org/Manual
.. _VMware vSphere: https://www.vmware.com/support/vsphere-hypervisor.html
.. _Xen (using libvirt): https://www.xenproject.org
.. _Hyper-V: https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/hyper-v-technology-overview
.. _Virtuozzo: https://www.virtuozzo.com/products/vz7.html
.. _PowerVM: https://www.ibm.com/us-en/marketplace/ibm-powervm

View File

@ -18,10 +18,6 @@ link=https://wiki.openstack.org/wiki/ThirdPartySystems/Virtuozzo_CI
title=libvirt+virtuozzo VM
link=https://wiki.openstack.org/wiki/ThirdPartySystems/Virtuozzo_Storage_CI
[target.libvirt-xen]
title=libvirt+xen
link=https://wiki.openstack.org/wiki/ThirdPartySystems/XenProject_CI
[target.vmware]
title=VMware CI
link=https://wiki.openstack.org/wiki/NovaVMware/Minesweeper
@ -71,7 +67,6 @@ libvirt-virtuozzo-ct=partial
driver-notes-libvirt-virtuozzo-ct=This is not tested in a CI system, but it is implemented.
libvirt-virtuozzo-vm=partial
driver-notes-libvirt-virtuozzo-vm=This is not tested in a CI system, but it is implemented.
libvirt-xen=complete
vmware=complete
hyperv=complete
ironic=unknown
@ -92,7 +87,6 @@ libvirt-virtuozzo-ct=partial
driver-notes-libvirt-virtuozzo-ct=This is not tested in a CI system, but it is implemented.
libvirt-virtuozzo-vm=partial
driver-notes-libvirt-virtuozzo-vm=This is not tested in a CI system, but it is implemented.
libvirt-xen=complete
vmware=unknown
hyperv=unknown
ironic=unknown
@ -112,7 +106,6 @@ libvirt-virtuozzo-ct=partial
driver-notes-libvirt-virtuozzo-ct=This is not tested in a CI system, but it is implemented.
libvirt-virtuozzo-vm=partial
driver-notes-libvirt-virtuozzo-vm=This is not tested in a CI system, but it is implemented.
libvirt-xen=complete
vmware=complete
hyperv=complete
ironic=unknown
@ -132,7 +125,6 @@ libvirt-virtuozzo-ct=partial
driver-notes-libvirt-virtuozzo-ct=This is not tested in a CI system, but it is implemented.
libvirt-virtuozzo-vm=partial
driver-notes-libvirt-virtuozzo-vm=This is not tested in a CI system, but it is implemented.
libvirt-xen=complete
vmware=complete
hyperv=complete
ironic=unknown
@ -152,7 +144,6 @@ libvirt-kvm-s390=unknown
libvirt-virtuozzo-ct=complete
libvirt-virtuozzo-vm=partial
driver-notes-libvirt-virtuozzo-vm=This is not tested in a CI system, but it is implemented.
libvirt-xen=complete
vmware=complete
hyperv=complete
ironic=unknown
@ -171,7 +162,6 @@ libvirt-kvm=complete
libvirt-kvm-s390=unknown
libvirt-virtuozzo-ct=complete
libvirt-virtuozzo-vm=complete
libvirt-xen=complete
vmware=complete
hyperv=complete
ironic=missing
@ -195,7 +185,6 @@ libvirt-kvm=complete
libvirt-kvm-s390=unknown
libvirt-virtuozzo-ct=missing
libvirt-virtuozzo-vm=complete
libvirt-xen=complete
vmware=partial
driver-notes-vmware=This is not tested in a CI system, but it is implemented.
hyperv=complete:n
@ -217,8 +206,6 @@ libvirt-kvm=complete
libvirt-kvm-s390=unknown
libvirt-virtuozzo-ct=unknown
libvirt-virtuozzo-vm=unknown
libvirt-xen=partial
driver-notes-libvirt-xen=This is not tested in a CI system, but it is implemented.
vmware=partial
driver-notes-vmware=This is not tested in a CI system, but it is implemented.
hyperv=partial
@ -241,7 +228,6 @@ libvirt-kvm-s390=unknown
libvirt-virtuozzo-ct=missing
libvirt-virtuozzo-vm=partial
driver-notes-libvirt-virtuozzo-vm=This is not tested in a CI system, but it is implemented.
libvirt-xen=complete
vmware=partial
driver-notes-vmware=This is not tested in a CI system, but it is implemented.
hyperv=complete
@ -263,7 +249,6 @@ libvirt-virtuozzo-ct=partial
driver-notes-libvirt-virtuozzo-ct=This is not tested in a CI system, but it is implemented.
libvirt-virtuozzo-vm=partial
driver-notes-libvirt-virtuozzo-vm=This is not tested in a CI system, but it is implemented.
libvirt-xen=complete
vmware=complete
hyperv=complete
ironic=missing
@ -282,7 +267,6 @@ libvirt-kvm=complete
libvirt-kvm-s390=unknown
libvirt-virtuozzo-ct=unknown
libvirt-virtuozzo-vm=unknown
libvirt-xen=complete
vmware=partial
driver-notes-vmware=This is not tested in a CI system, but it is implemented.
hyperv=partial
@ -305,7 +289,6 @@ libvirt-kvm-s390=unknown
libvirt-virtuozzo-ct=partial
driver-notes-libvirt-virtuozzo-ct=This is not tested in a CI system, but it is implemented.
libvirt-virtuozzo-vm=complete
libvirt-xen=complete
vmware=complete
hyperv=partial
driver-notes-hyperv=This is not tested in a CI system, but it is implemented.
@ -327,7 +310,6 @@ libvirt-kvm-s390=unknown
libvirt-virtuozzo-ct=missing
libvirt-virtuozzo-vm=partial
driver-notes-libvirt-virtuozzo-vm=This is not tested in a CI system, but it is implemented.
libvirt-xen=complete
vmware=complete
hyperv=complete
ironic=partial
@ -348,7 +330,6 @@ driver-notes-libvirt-kvm=This is not tested in a CI system, but it is implemente
libvirt-kvm-s390=unknown
libvirt-virtuozzo-ct=missing
libvirt-virtuozzo-vm=missing
libvirt-xen=missing
vmware=missing
hyperv=partial
driver-notes-hyperv=This is not tested in a CI system, but it is implemented.
@ -370,7 +351,6 @@ libvirt-kvm=complete
libvirt-kvm-s390=unknown
libvirt-virtuozzo-ct=missing
libvirt-virtuozzo-vm=complete
libvirt-xen=complete
vmware=missing
hyperv=complete
ironic=missing

View File

@ -14,10 +14,6 @@ link=https://wiki.openstack.org/wiki/ThirdPartySystems/Virtuozzo_CI
title=libvirt+virtuozzo VM
link=https://wiki.openstack.org/wiki/ThirdPartySystems/Virtuozzo_Storage_CI
[target.libvirt-xen]
title=libvirt+xen
link=https://wiki.openstack.org/wiki/ThirdPartySystems/XenProject_CI
[target.vmware]
title=VMware CI
link=https://wiki.openstack.org/wiki/NovaVMware/Minesweeper
@ -52,7 +48,6 @@ libvirt-virtuozzo-ct=partial
driver-notes-libvirt-virtuozzo-ct=This is not tested in a CI system, but it is implemented.
libvirt-virtuozzo-vm=partial
driver-notes-libvirt-virtuozzo-vm=This is not tested in a CI system, but it is implemented.
libvirt-xen=missing
vmware=missing
hyperv=missing
ironic=unknown
@ -69,7 +64,6 @@ libvirt-kvm=partial:queens
libvirt-kvm-s390=unknown
libvirt-virtuozzo-ct=unknown
libvirt-virtuozzo-vm=unknown
libvirt-xen=unknown
vmware=missing
hyperv=missing
ironic=missing

View File

@ -10,10 +10,6 @@ link=http://docs.openstack.org/infra/manual/developers.html#project-gating
title=libvirt+kvm (s390x)
link=http://docs.openstack.org/infra/manual/developers.html#project-gating
[target.libvirt-xen]
title=libvirt+xen
link=https://wiki.openstack.org/wiki/ThirdPartySystems/XenProject_CI
#
# Lists all features
#
@ -33,7 +29,6 @@ admin_doc_link=https://docs.openstack.org/nova/latest/admin/cpu-topologies.html#
tempest_test_uuids=9a438d88-10c6-4bcd-8b5b-5b6e25e1346f;585e934c-448e-43c4-acbf-d06a9b899997
libvirt-kvm=partial
libvirt-kvm-s390=unknown
libvirt-xen=missing
[operation.cpu-pinning-policy]
title=CPU Pinning Policy
@ -43,7 +38,6 @@ api_doc_link=https://docs.openstack.org/api-ref/compute/#create-server
admin_doc_link=https://docs.openstack.org/nova/latest/admin/cpu-topologies.html#customizing-instance-cpu-pinning-policies
libvirt-kvm=partial
libvirt-kvm-s390=unknown
libvirt-xen=missing
[operation.cpu-pinning-thread-policy]
title=CPU Pinning Thread Policy
@ -53,4 +47,3 @@ api_doc_link=https://docs.openstack.org/api-ref/compute/#create-server
admin_doc_link=https://docs.openstack.org/nova/latest/admin/cpu-topologies.html#customizing-instance-cpu-pinning-policies
libvirt-kvm=partial
libvirt-kvm-s390=unknown
libvirt-xen=missing

View File

@ -42,7 +42,7 @@ hosts.
This mode is only supported when using the Libvirt virt driver.
This mode is not supported when using LXC or Xen hypervisors as enabled by
This mode is not supported when using the LXC hypervisor as enabled by
the :oslo.config:option:`libvirt.virt_type` configurable on the computes.
Usage

View File

@ -95,9 +95,6 @@ title=Libvirt Virtuozzo VM
[driver.libvirt-vz-ct]
title=Libvirt Virtuozzo CT
[driver.libvirt-xen]
title=Libvirt Xen
[driver.vmware]
title=VMware vCenter
@ -131,7 +128,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=missing
@ -154,7 +150,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -174,7 +169,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=missing
@ -203,7 +197,6 @@ driver.libvirt-kvm-ppc64=unknown
driver.libvirt-kvm-s390x=unknown
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=unknown
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -231,7 +224,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=partial
driver-notes.hyperv=Works without issue if instance is off. When
@ -255,7 +247,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=missing
driver.hyperv=complete
driver.ironic=missing
@ -275,7 +266,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver-notes.hyperv=Works without issue if instance is off. When
@ -304,7 +294,6 @@ driver.libvirt-kvm-ppc64=missing
driver.libvirt-kvm-s390x=missing
driver.libvirt-qemu-x86=missing
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -331,7 +320,6 @@ driver.libvirt-kvm-ppc64=unknown
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=unknown
driver.libvirt-lxc=unknown
driver.libvirt-xen=unknown
driver.vmware=unknown
driver.hyperv=unknown
driver.ironic=unknown
@ -355,7 +343,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=complete
@ -378,7 +365,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=complete
@ -399,7 +385,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=missing
driver.hyperv=complete
driver.ironic=missing
@ -420,7 +405,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=missing
@ -450,7 +434,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=missing
@ -483,7 +466,6 @@ driver-notes.libvirt-kvm-s390x=Requires libvirt>=1.3.3, qemu>=2.5.0
driver.libvirt-qemu-x86=complete
driver-notes.libvirt-qemu-x86=Requires libvirt>=1.3.3, qemu>=2.5.0
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -513,7 +495,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -535,7 +516,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=complete
@ -563,7 +543,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=missing
driver.hyperv=complete
driver.ironic=missing
@ -587,7 +566,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=complete
@ -614,7 +592,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=complete
@ -641,7 +618,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=missing
@ -663,7 +639,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=missing
@ -695,7 +670,6 @@ driver.libvirt-kvm-s390x=missing
driver.libvirt-qemu-x86=complete
driver-notes.libvirt-qemu-x86=Requires libvirt>=1.2.16 and hw_qemu_guest_agent.
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -726,8 +700,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=partial
driver-notes.libvirt-xen=Only cold snapshots (pause + snapshot) supported
driver.vmware=complete
driver.hyperv=complete
driver.ironic=missing
@ -765,7 +737,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=missing
@ -792,7 +763,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -819,7 +789,6 @@ driver-notes.libvirt-lxc=Fails in latest Ubuntu Trusty kernel
from security repository (3.13.0-76-generic), but works in upstream
3.13.x kernels as well as default Ubuntu Trusty latest kernel
(3.13.0-58-generic).
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=complete
@ -843,7 +812,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=complete
@ -863,7 +831,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=missing
driver.hyperv=complete
driver.ironic=missing
@ -885,7 +852,6 @@ driver.libvirt-kvm-ppc64=missing
driver.libvirt-kvm-s390x=missing
driver.libvirt-qemu-x86=missing
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -910,7 +876,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -939,7 +904,6 @@ driver.libvirt-kvm-ppc64=missing
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=complete
@ -967,7 +931,6 @@ driver.libvirt-kvm-ppc64=missing
driver.libvirt-kvm-s390x=missing
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -998,7 +961,6 @@ driver.libvirt-kvm-s390x=missing
driver.libvirt-qemu-x86=partial
driver-notes.libvirt-qemu-x86=Only for Debian derived guests
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=partial
driver-notes.vmware=requires vmware tools installed
driver.hyperv=missing
@ -1026,7 +988,6 @@ driver.libvirt-kvm-ppc64=missing
driver.libvirt-kvm-s390x=missing
driver.libvirt-qemu-x86=missing
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=complete
driver.ironic=missing
@ -1054,7 +1015,6 @@ driver.libvirt-kvm-ppc64=missing
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=missing
@ -1083,7 +1043,6 @@ driver.libvirt-kvm-ppc64=unknown
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=unknown
driver.libvirt-lxc=unknown
driver.libvirt-xen=unknown
driver.vmware=missing
driver.hyperv=complete
driver.ironic=complete
@ -1110,7 +1069,6 @@ driver.libvirt-kvm-ppc64=missing
driver.libvirt-kvm-s390x=missing
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -1137,7 +1095,6 @@ driver.libvirt-kvm-ppc64=missing
driver.libvirt-kvm-s390x=missing
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=missing
driver.ironic=missing
@ -1166,7 +1123,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=complete
@ -1191,7 +1147,6 @@ driver.libvirt-kvm-ppc64=missing
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=missing
driver.hyperv=complete
driver.ironic=missing
@ -1219,7 +1174,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=complete
@ -1242,7 +1196,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=missing
driver.hyperv=complete
driver.ironic=complete
@ -1267,7 +1220,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=complete
driver.hyperv=complete
driver.ironic=complete
@ -1287,7 +1239,6 @@ driver.libvirt-kvm-ppc64=missing
driver.libvirt-kvm-s390x=missing
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=complete
driver.hyperv=complete
driver-notes.hyperv=In order to use uefi, a second generation Hyper-V vm must
@ -1321,7 +1272,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=unknown
driver.libvirt-xen=complete
driver.vmware=missing
driver.hyperv=complete
driver.ironic=missing
@ -1343,7 +1293,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -1363,7 +1312,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -1388,7 +1336,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=complete
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -1419,7 +1366,6 @@ driver.libvirt-kvm-s390x=unknown
driver.libvirt-qemu-x86=complete
driver-notes.libvirt-qemu-x86=The same restrictions apply as KVM x86.
driver.libvirt-lxc=missing
driver.libvirt-xen=unknown
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -1443,7 +1389,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=complete
driver.libvirt-xen=complete
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -1467,7 +1412,6 @@ driver.libvirt-kvm-ppc64=unknown
driver.libvirt-kvm-s390x=unknown
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -1489,7 +1433,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=missing
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -1513,7 +1456,6 @@ driver.libvirt-kvm-ppc64=missing
driver.libvirt-kvm-s390x=missing
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -1540,7 +1482,6 @@ driver.libvirt-kvm-ppc64=missing
driver.libvirt-kvm-s390x=missing
driver.libvirt-qemu-x86=missing
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing
@ -1564,7 +1505,6 @@ driver.libvirt-kvm-ppc64=complete
driver.libvirt-kvm-s390x=complete
driver.libvirt-qemu-x86=complete
driver.libvirt-lxc=unknown
driver.libvirt-xen=complete
driver.vmware=partial
driver.hyperv=partial
driver.ironic=missing
@ -1592,7 +1532,6 @@ driver.libvirt-kvm-s390x=missing
driver.libvirt-qemu-x86=partial
driver-notes.libvirt-qemu-x86=Move operations are not yet supported.
driver.libvirt-lxc=missing
driver.libvirt-xen=missing
driver.vmware=missing
driver.hyperv=missing
driver.ironic=missing

View File

@ -104,7 +104,7 @@ Related options:
"""),
cfg.StrOpt('virt_type',
default='kvm',
choices=('kvm', 'lxc', 'qemu', 'xen', 'parallels'),
choices=('kvm', 'lxc', 'qemu', 'parallels'),
help="""
Describes the virtualization type (or so called domain type) libvirt should
use.
@ -128,7 +128,8 @@ If set, Nova will use this URI to connect to libvirt.
Possible values:
* An URI like ``qemu:///system`` or ``xen+ssh://oirase/`` for example.
* An URI like ``qemu:///system``.
This is only necessary if the URI differs to the commonly known URIs
for the chosen virtualization type.
@ -273,7 +274,6 @@ in following list:
* 'kvm': 'qemu+tcp://%s/system'
* 'qemu': 'qemu+tcp://%s/system'
* 'xen': 'xenmigr://%s/system'
* 'parallels': 'parallels+tcp://%s/system'
Related options:
@ -627,9 +627,6 @@ Related options:
default='$instances_path/snapshots',
help='Location where libvirt driver will store snapshots '
'before uploading them to image service'),
cfg.StrOpt('xen_hvmloader_path',
default='/usr/lib/xen/boot/hvmloader',
help='Location where the Xen hvmloader is kept'),
cfg.ListOpt('disk_cachemodes',
default=[],
help="""

View File

@ -1535,11 +1535,6 @@ class InternalError(NovaException):
msg_fmt = "%(err)s"
class PciDevicePrepareFailed(NovaException):
msg_fmt = _("Failed to prepare PCI device %(id)s for instance "
"%(instance_uuid)s: %(reason)s")
class PciDeviceDetachFailed(NovaException):
msg_fmt = _("Failed to detach PCI device %(dev)s: %(reason)s")

View File

@ -191,11 +191,6 @@ def readpty(path):
return ''
@nova.privsep.sys_admin_pctxt.entrypoint
def xend_probe():
processutils.execute('xend', 'status', check_exit_code=True)
@nova.privsep.sys_admin_pctxt.entrypoint
def create_mdev(physical_device, mdev_type, uuid=None):
"""Instantiate a mediated device."""

View File

@ -147,12 +147,6 @@ class LibvirtTestCase(test.NoDBTestCase):
mock_fcntl.F_SETFL, 32769 | os.O_NONBLOCK)])
self.assertIn(mock.call('/fake/path', 'r'), mock_open.mock_calls)
@mock.patch('oslo_concurrency.processutils.execute')
def test_xend_probe(self, mock_execute):
nova.privsep.libvirt.xend_probe()
mock_execute.assert_called_with('xend', 'status',
check_exit_code=True)
def test_create_nmdev(self):
mock_open = mock.mock_open()
with mock.patch('builtins.open', new=mock_open) as mock_open:

View File

@ -79,7 +79,6 @@ def fake_kvm_guest():
obj.features = [
config.LibvirtConfigGuestFeatureACPI(),
config.LibvirtConfigGuestFeatureAPIC(),
config.LibvirtConfigGuestFeaturePAE(),
config.LibvirtConfigGuestFeatureKvmHidden()
]
@ -202,7 +201,6 @@ FAKE_KVM_GUEST = """
<features>
<acpi/>
<apic/>
<pae/>
<kvm>
<hidden state='on'/>
</kvm>

View File

@ -1439,12 +1439,13 @@ class Connection(object):
raise ValueError("URI was None, but fake libvirt is "
"configured to not accept this.")
uri_whitelist = ['qemu:///system',
'qemu:///session',
'lxc:///', # from LibvirtDriver._uri()
'xen:///', # from LibvirtDriver._uri()
'test:///default',
'parallels:///system']
uri_whitelist = [
'qemu:///system',
'qemu:///session',
'lxc:///', # from LibvirtDriver._uri()
'test:///default',
'parallels:///system',
]
if uri not in uri_whitelist:
raise make_libvirtError(

View File

@ -1000,12 +1000,10 @@ class LibvirtBlockInfoTest(test.NoDBTestCase):
def test_success_get_disk_bus_for_disk_dev(self):
expected = (
('ide', ("kvm", "hda")),
('scsi', ("kvm", "sdf")),
('virtio', ("kvm", "vds")),
('fdc', ("kvm", "fdc")),
('xen', ("xen", "sdf")),
('xen', ("xen", "xvdb")),
('ide', ("kvm", "hda")),
('scsi', ("kvm", "sdf")),
('virtio', ("kvm", "vds")),
('fdc', ("kvm", "fdc")),
)
for res, args in expected:
self.assertEqual(res, blockinfo.get_disk_bus_for_disk_dev(*args))
@ -1219,15 +1217,6 @@ class LibvirtBlockInfoTest(test.NoDBTestCase):
'device_type': 'disk'},
{}, 'virtio')
mock_get_info.reset_mock()
# xen with incompatible root_device_name/disk_bus combination
root_bdm['disk_bus'] = 'xen'
blockinfo.get_root_info(instance, 'xen', image_meta, root_bdm,
'xen', 'ide', root_device_name='sda')
mock_get_info.assert_called_once_with(instance, 'xen', image_meta,
{'device_name': 'xvda',
'disk_bus': 'xen',
'device_type': 'disk'},
{}, 'xen')
def test_get_boot_order_simple(self):
disk_info = {
@ -1305,7 +1294,7 @@ class LibvirtBlockInfoTest(test.NoDBTestCase):
def test_get_rescue_bus(self):
# Assert that all supported device bus types are returned. Stable
# device rescue is not supported by xen or lxc so ignore these.
# device rescue is not supported by lxc so ignore this.
for virt_type in ['qemu', 'kvm', 'parallels']:
for bus in blockinfo.SUPPORTED_DEVICE_BUSES[virt_type]:
meta = self._get_rescue_image_meta({'hw_rescue_bus': bus})

View File

@ -2059,27 +2059,6 @@ class LibvirtConfigGuestInterfaceTest(LibvirtConfigBaseTest):
obj2.parse_str(xml)
self.assertXmlEqual(xml, obj2.to_xml())
def test_config_bridge_xen(self):
obj = config.LibvirtConfigGuestInterface()
obj.net_type = "bridge"
obj.source_dev = "br0"
obj.mac_addr = "CA:FE:BE:EF:CA:FE"
obj.script = "/path/to/test-vif-openstack"
xml = obj.to_xml()
self.assertXmlEqual(xml, """
<interface type="bridge">
<mac address="CA:FE:BE:EF:CA:FE"/>
<source bridge="br0"/>
<script path="/path/to/test-vif-openstack"/>
</interface>""")
# parse the xml from the first object into a new object and make sure
# they are the same
obj2 = config.LibvirtConfigGuestInterface()
obj2.parse_str(xml)
self.assertXmlEqual(xml, obj2.to_xml())
def test_config_8021Qbh(self):
obj = config.LibvirtConfigGuestInterface()
obj.net_type = "direct"
@ -2460,100 +2439,6 @@ class LibvirtConfigGuestTest(LibvirtConfigBaseTest):
</idmap>
</domain>""", xml)
def test_config_xen_pv(self):
obj = config.LibvirtConfigGuest()
obj.virt_type = "xen"
obj.memory = 100 * units.Mi
obj.vcpus = 2
obj.cpuset = set([0, 1, 3, 4, 5])
obj.name = "demo"
obj.uuid = "b38a3f43-4be2-4046-897f-b67c2f5e0147"
obj.os_type = "linux"
obj.os_kernel = "/tmp/vmlinuz"
obj.os_initrd = "/tmp/ramdisk"
obj.os_cmdline = "console=xvc0"
disk = config.LibvirtConfigGuestDisk()
disk.source_type = "file"
disk.source_path = "/tmp/img"
disk.target_dev = "/dev/xvda"
disk.target_bus = "xen"
obj.add_device(disk)
xml = obj.to_xml()
self.assertXmlEqual(xml, """
<domain type="xen">
<uuid>b38a3f43-4be2-4046-897f-b67c2f5e0147</uuid>
<name>demo</name>
<memory>104857600</memory>
<vcpu cpuset="0-1,3-5">2</vcpu>
<os>
<type>linux</type>
<kernel>/tmp/vmlinuz</kernel>
<initrd>/tmp/ramdisk</initrd>
<cmdline>console=xvc0</cmdline>
</os>
<devices>
<disk type="file" device="disk">
<source file="/tmp/img"/>
<target bus="xen" dev="/dev/xvda"/>
</disk>
</devices>
</domain>""")
def test_config_xen_hvm(self):
obj = config.LibvirtConfigGuest()
obj.virt_type = "xen"
obj.memory = 100 * units.Mi
obj.vcpus = 2
obj.cpuset = set([0, 1, 3, 4, 5])
obj.name = "demo"
obj.uuid = "b38a3f43-4be2-4046-897f-b67c2f5e0147"
obj.os_type = "hvm"
obj.os_loader = '/usr/lib/xen/boot/hvmloader'
obj.os_root = "root=xvda"
obj.os_cmdline = "console=xvc0"
obj.features = [
config.LibvirtConfigGuestFeatureACPI(),
config.LibvirtConfigGuestFeatureAPIC(),
config.LibvirtConfigGuestFeaturePAE(),
]
disk = config.LibvirtConfigGuestDisk()
disk.source_type = "file"
disk.source_path = "/tmp/img"
disk.target_dev = "/dev/xvda"
disk.target_bus = "xen"
obj.add_device(disk)
xml = obj.to_xml()
self.assertXmlEqual(xml, """
<domain type="xen">
<uuid>b38a3f43-4be2-4046-897f-b67c2f5e0147</uuid>
<name>demo</name>
<memory>104857600</memory>
<vcpu cpuset="0-1,3-5">2</vcpu>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<cmdline>console=xvc0</cmdline>
<root>root=xvda</root>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<devices>
<disk type="file" device="disk">
<source file="/tmp/img"/>
<target bus="xen" dev="/dev/xvda"/>
</disk>
</devices>
</domain>""")
def test_config_kvm(self):
obj = fake_libvirt_data.fake_kvm_guest()

291
<