From Fedora Project Wiki
(added note about 32/64-bit kernels in myoung tree)
m (→‎Documentation: -- www.xen.org became www.xenproject.org. Fixing this)
 
(65 intermediate revisions by 6 users not shown)
Line 1: Line 1:
= Feature Name =
= Xen Pvops Dom0 =


== Summary ==
== Summary ==


Dom0 support for [[Features/XenPvops | pvops-based]] {{package|kernel}} to support hosting of Xen guests which has been lacking since Fedora 8.
[[Features/XenPvops | pvops-based]] {{package|kernel}} to serve as Dom0 for a Xen-based system. Currently Fedora releases greater than 8 contain the Xen hypervisor and tools, but not a Xen Dom0-capable kernel.


== Owner ==
== Owner ==


* Name: None
* Name: W. Michael Petullo
* Email: mike@flyn.org
* People Involved: Michael Young, Eduardo Habkost, Mark McLoughlin, Stephen Tweedie, Chris Wright, Juan Quintela, Markus Armbruster, Glauber Costa, Daniel Berrange et al.


Previously involved: EduardoHabkost, MarkMcLoughlin, Stephen Tweedie, Chris Wright, Juan Quintela, Markus Armbruster, Glauber Costa, DanielBerrange, ...
== Current status ==
 
* Targeted release: [[Releases/16 | Fedora 16 ]]
* Last updated: 2011-09-15
* Percentage of completion: 90%
 
In order to implement this feature, it is necessary to get full Xen Dom0 support upstream and in Fedora. The core Dom0 support has been accepted upstream and was released in Linux 2.6.37. Linux 2.6.39 brought support for the Xen network backend driver. Linux 3.0 brought the block backend driver. Linux 3.1 will bring the pci backend driver (for pci passthru).
 
Open bugs:
 
* power management, [https://bugzilla.redhat.com/show_bug.cgi?id=692179 Bugzilla #692179]
* bridging in NetworkManager, [https://bugzilla.redhat.com/show_bug.cgi?id=199246 Bugzilla #199246]
* GRUB 2 has extraneous menu entries after installing Xen, [https://bugzilla.redhat.com/show_bug.cgi?id=739134 Bugzilla #739134]


== Current status ==
* Last updated: 2009-07-15
* Percentage of completion: 0%
* Targeted release: F13
* Dom0 status: awaiting upstream kernel support
* Background:
: [http://wiki.xensource.com/xenwiki/XenParavirtOps  Upstream status, XenParavirtOps on xenwiki],
: Upstream patches:
:* [http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=shortlog;h=xen-tip/master xen-tip/master] - known-working branch, with only tested changes
:* [http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=shortlog;h=xen-tip/next xen-tip/next] - current bleeding edge; should at least compile
* News: [[FWN/Issue169#Success_with_Experimental_Fedora_10_pv_ops_dom0|FWN #169]], [[FWN/Issue152#Status_of_dom0_Support_in_Upstream_Kernel|FWN #152]], [[FWN/Issue137#State_of_Xen_in_Upstream_Linux|FWN #137]]
: [http://lists.xensource.com/archives/html/xen-devel/2008-02/msg00047.html old status #1], [http://lists.xensource.com/archives/html/xen-devel/2008-02/msg00242.html old status #2], [http://lists.xensource.com/archives/html/xen-devel/2009-06/msg01193.html pv_ops dom0 status report, June 2009]
* M A Young has built unofficial pv_ops dom0 kernel RPMs for testing, available from [http://fedorapeople.org/~myoung/dom0/ his directory]. For feedback or questions about these kernels you should email to fedora-xen or fedora-virt mailinglists. Note that these kernels are not meant for production use, they're only for beta testing, and as of 2009-08-11, only the 64-bit kernels are working (32-bit crashes, being worked on).
* If you want to build your own custom dom0 kernel, see the upstream [http://wiki.xensource.com/xenwiki/XenDom0Kernels XenDom0Kernels wiki page]
== Detailed Description ==
== Detailed Description ==


See [[Features/XenPvops]]  for a rationale. This feature just continues the paravirt_ops Xen effort to bring it back to feature parity with Fedora 8 Xen.
Xen is a hypervisor-based type-1 virtualization solution. The Xen hypervisor requires a standard operating system that runs in a privileged domain, Dom0. The Dom0 operating system provides driver and guest management support to Xen and other guest operating systems running in the DomU domain. Fedora 8 provided a kernel that could serve as a Dom0 guest. However, newer Fedora releases dropped support for Dom0 (although they can run in DomU). The Xen project is presently pushing the features required for a Dom0 Linux kernel upstream. Once these features are available in the mainline kernel, it follows that Fedora could support Xen Dom0.
 
== Benefit to Fedora ==
 
Fedora will benefit from a Xen Dom0-capable kernel. Xen has proven to be a competitive virtualization solution in real-world installations. Xen is different enough from KVM that the two technologies could complement each other within the Fedora Project. There are ongoing benchmarks that intend to define the relative performance of the two technologies.


== Scope ==
== Scope ==


Work items:
* Implement Dom0 support in upstream kernel (Complete)
 
* Implement Dom0 backend drivers support in upstream kernel; fix remaining issues (Complete)
* Implement Dom0 support in upstream kernel (JeremyFitzhardinge)
* Modify 'grubby' to support GRUB syntax required by Xen (Complete)
* Allow the hypervisor to boot bzImage kernels (see this [http://lists.xensource.com/archives/html/xen-devel/2009-01/msg00699.html patch] included since [http://koji.fedoraproject.org/koji/buildinfo?buildID=81339 xen-3.3.1-3.fc11])
* Make 'new-kernel-pkg' aware of Xen using the HYPERVISOR option in /etc/sysconfig/kernel (Complete)
* Make 'new-kernel-pkg' aware of HYPERVISOR setting in /etc/sysconfig/xen
* Ensure Fedora's virtualization tools support Xen
* Wait for that upstream kernel version to be pulled into Fedora
* Possibly implement support for bridging in NetworkManager
* Possibly implement support in Anaconda


== How To Test ==
== How To Test ==


* Install a Fedora host/Dom0 system
* Install a Fedora Dom0 kernel and {{package|xen}} (kernel-PAE is required for i686)
* Turn on Xen Hypervisor by setting 'HYPERVISOR=/boot/xen-3.3.gz' in /etc/sysconfig/kernel and running some tool (TBD)
* Reboot and confirm the Dom0 kernel can boot on bare metal (no Xen) by selecting the appropriate GRUB menu option
* Turn on Xen Userspace by running 'chkconfig xend on'
* Reboot and confirm grub.conf boots the new kernel using Xen by selecting the appropriate GRUB menu option
* Reboot
* Observe presence of Xen via /sys/hypervisor/
* Observe presence of Xen via /sys/hypervisor/
* Run 'xm list' and observe Domain-0
* Run 'xm list' and observe Domain-0
* Use virt-install to deploy a Fedora 9/10 paravirt guest
* Use 'virt-install -l http://download.fedoraproject.org/pub/fedora/linux/releases/15/Fedora/x86_64 --ram 1024 --disk /var/lib/libvirt/images/f15.img --name F15' to deploy a Fedora paravirtualized guest
* Use virt-install to deploy a Fedora 8 paravirt guest
* Use 'virt-install' to deploy a Fedora fully virtualized guest
* Use virt-install to deploy a Fedora 8/9/10 fullyvirt guest
* Use 'virsh' to save & restore guests
* Use 'virsh' to save & restore a PV guest and HVM guest
* Balloon down memory of a guest with 'virsh'
* Balloon down memory of a guest with virsh.


== User Experience ==
== User Experience ==


* Stock Fedora kernel supports Xen
* Stock Fedora kernel supports both Xen dom0 and bare metal
* The Xen kernel does not lag behind the Fedora kernel
* All features and hardware supported on bare metal also work on Xen Dom0
* All features and hardware supported on baremetal also works on Xen Dom0
* Can enable and disable the use of the Xen hypervisor via an /etc/sysconfig/kernel setting
* Can enable/disable use of HV via a /etc/sysconfig setting
* Can manage Xen guests using Fedora virtualization tools


== Dependencies ==
== Dependencies ==


* Update to 'new-kernel-pkg' to know how to install HV
* {{package|kernel}}
* {{package|grubby}}
* Fedora virtualization tools
* (possibly) {{package|anaconda}}
* (possibly) {{package|NetworkManager}}


== Contingency Plan ==
== Contingency Plan ==


If Dom0 support is not ready, continue the status quo of only shipping with DomU support.
There is presently some uncertainty as to when the backend driver support that the Dom0 guest provides DomU guests will be upstream. This may make the upstream kernel that is chosen by Fedora 16 or it may not. Regardless, we will have to touch a lot of subsystems, so it makes sense to start early.
 
Until all of the requisite Xen components are upstream, we can continue to develop this feature using third party kernels. These third party kernels will be configured to be as close as possible to the forthcoming upstream kernel. In addition, Linux 2.6.39 does contain many of the backend drivers. It may be used with configurations that do not require the block backend driver.
 
If all of the Xen backend drivers don't make Fedora 16, then little is lost. We can continue to test the Dom0 kernel (with a subset of its eventual features) and work on the supporting infrastructure. It would be useful for our effort to have a working Dom0, grubby, etc in Fedora 16 even if other features (most notably the block backend driver) do not make it. In the worst case, we may delay the announcement of the Dom0 feature to Fedora 17, but can include all progress completed in Fedora 16.


== Documentation ==
== Documentation ==
<!-- Is there upstream documentation on this feature, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
 
See also:
 
* Xen, http://www.xenproject.org/
 
* The Xen mailing lists, hosted at xen.org
 
* The fedora-xen mailing list, hosted by Fedora
 
* "Dom0 xen support in Fedora 15?" on fedora-xen mailing list, http://lists.fedoraproject.org/pipermail/xen/2010-November/005205.html (note the latest kernel updates for Fedora 15 can be used as a dom0)
 
* Michael Young's third-party Dom0 kernels, http://fedorapeople.org/~myoung/dom0/, provided a Dom0-capable kernel for Fedora before Linus accepted key Xen features (not compatible with Fedora 15+)
 
* Stefano Stabellini's announcement that Xen Dom0 support has been included in Linux 2.6.27, http://blog.xen.org/index.php/2011/01/14/linux-2-6-37-first-upstream-linux-kernel-to-work-as-dom0/
 
In order to configure Rawhide to boot in Dom0:
 
1. yum install xen.
 
2. Edit /etc/default/grub to set "GRUB_DEFAULT="Xen 4.1.1". Update your GRUB 2 configuration using:
 
<pre>grub2-mkconfig -o /boot/grub2/grub.cfg</pre>.
 
3. Configure a bridge device by setting /etc/sysconfig/network-scripts/ifcfg-virbr0:
 
<pre>
DEVICE=virbr0
TYPE=Bridge
ONBOOT=yes
USERCTL=no
BOOTPROTO=dhcp
NM_CONTROLLED=no
</pre>
 
4. Configure eth0 to be a member of the bridge:
 
<pre>
DEVICE=eth0
HWADDR=[XX:XX:XX:XX:XX:XX]
TYPE=Ethernet
ONBOOT=yes
USERCTL=no
BOOTPROTO=none
BRIDGE=virbr0
NM_CONTROLLED=no
</pre>
 
5. Reboot and select your Xen kernel in the GRUB 2 boot menu


== Release Notes ==
== Release Notes ==


The Fedora Linux kernel may now provide the basis for a Xen-based virtualization solution. Xen is a hypervisor-based type-1 virtualization platform. The kernel now has the ability to boot in Xen's Dom0, a privileged domain that allows Fedora to provide driver and guest management support to Xen and other non-privileged, guest operating systems.
<!-- The Fedora Release Notes inform end-users about what is new in the release.  Examples of past release notes are here: http://docs.fedoraproject.org/release-notes/ -->
<!-- The Fedora Release Notes inform end-users about what is new in the release.  Examples of past release notes are here: http://docs.fedoraproject.org/release-notes/ -->
<!-- The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the documentation team and shipped with the release. -->
<!-- The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the documentation team and shipped with the release. -->
Line 77: Line 136:
== Comments and Discussion ==
== Comments and Discussion ==


* See [[Talk:Features/YourFeatureName]]  <!-- This adds a link to the "discussion" tab associated with your page.  This provides the ability to have ongoing comments or conversation without bogging down the main feature page -->
* See [[Talk:Features/XenPvopsDom0]]  <!-- This adds a link to the "discussion" tab associated with your page.  This provides the ability to have ongoing comments or conversation without bogging down the main feature page -->


[[Category:Virtualization|XenPvopsDom0]]
[[Category:Virtualization|XenPvopsDom0]]
[[Category:F13_Virt_Features|XenPvopsDom0]]
[[Category:FeatureAcceptedF16]]
[[Category:FeaturePageIncomplete]]
<!-- See https://fedorahosted.org/fesco/ticket/523 -->
<!-- When your feature page is completed and ready for review -->
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
<!-- After review, the feature wrangler will move your page to Category:FeatureReadyForFesco... if it still needs more work it will move back to Category:FeaturePageIncomplete-->
<!-- A pretty picture of the page category usage is at: https://fedoraproject.org/wiki/Features/Policy/Process -->

Latest revision as of 13:12, 28 June 2013

Xen Pvops Dom0

Summary

pvops-based kernel to serve as Dom0 for a Xen-based system. Currently Fedora releases greater than 8 contain the Xen hypervisor and tools, but not a Xen Dom0-capable kernel.

Owner

  • Name: W. Michael Petullo
  • Email: mike@flyn.org
  • People Involved: Michael Young, Eduardo Habkost, Mark McLoughlin, Stephen Tweedie, Chris Wright, Juan Quintela, Markus Armbruster, Glauber Costa, Daniel Berrange et al.

Current status

  • Targeted release: Fedora 16
  • Last updated: 2011-09-15
  • Percentage of completion: 90%

In order to implement this feature, it is necessary to get full Xen Dom0 support upstream and in Fedora. The core Dom0 support has been accepted upstream and was released in Linux 2.6.37. Linux 2.6.39 brought support for the Xen network backend driver. Linux 3.0 brought the block backend driver. Linux 3.1 will bring the pci backend driver (for pci passthru).

Open bugs:

Detailed Description

Xen is a hypervisor-based type-1 virtualization solution. The Xen hypervisor requires a standard operating system that runs in a privileged domain, Dom0. The Dom0 operating system provides driver and guest management support to Xen and other guest operating systems running in the DomU domain. Fedora 8 provided a kernel that could serve as a Dom0 guest. However, newer Fedora releases dropped support for Dom0 (although they can run in DomU). The Xen project is presently pushing the features required for a Dom0 Linux kernel upstream. Once these features are available in the mainline kernel, it follows that Fedora could support Xen Dom0.

Benefit to Fedora

Fedora will benefit from a Xen Dom0-capable kernel. Xen has proven to be a competitive virtualization solution in real-world installations. Xen is different enough from KVM that the two technologies could complement each other within the Fedora Project. There are ongoing benchmarks that intend to define the relative performance of the two technologies.

Scope

  • Implement Dom0 support in upstream kernel (Complete)
  • Implement Dom0 backend drivers support in upstream kernel; fix remaining issues (Complete)
  • Modify 'grubby' to support GRUB syntax required by Xen (Complete)
  • Make 'new-kernel-pkg' aware of Xen using the HYPERVISOR option in /etc/sysconfig/kernel (Complete)
  • Ensure Fedora's virtualization tools support Xen
  • Possibly implement support for bridging in NetworkManager
  • Possibly implement support in Anaconda

How To Test

  • Install a Fedora Dom0 kernel and xen (kernel-PAE is required for i686)
  • Reboot and confirm the Dom0 kernel can boot on bare metal (no Xen) by selecting the appropriate GRUB menu option
  • Reboot and confirm grub.conf boots the new kernel using Xen by selecting the appropriate GRUB menu option
  • Observe presence of Xen via /sys/hypervisor/
  • Run 'xm list' and observe Domain-0
  • Use 'virt-install -l http://download.fedoraproject.org/pub/fedora/linux/releases/15/Fedora/x86_64 --ram 1024 --disk /var/lib/libvirt/images/f15.img --name F15' to deploy a Fedora paravirtualized guest
  • Use 'virt-install' to deploy a Fedora fully virtualized guest
  • Use 'virsh' to save & restore guests
  • Balloon down memory of a guest with 'virsh'

User Experience

  • Stock Fedora kernel supports both Xen dom0 and bare metal
  • All features and hardware supported on bare metal also work on Xen Dom0
  • Can enable and disable the use of the Xen hypervisor via an /etc/sysconfig/kernel setting
  • Can manage Xen guests using Fedora virtualization tools

Dependencies

Contingency Plan

There is presently some uncertainty as to when the backend driver support that the Dom0 guest provides DomU guests will be upstream. This may make the upstream kernel that is chosen by Fedora 16 or it may not. Regardless, we will have to touch a lot of subsystems, so it makes sense to start early.

Until all of the requisite Xen components are upstream, we can continue to develop this feature using third party kernels. These third party kernels will be configured to be as close as possible to the forthcoming upstream kernel. In addition, Linux 2.6.39 does contain many of the backend drivers. It may be used with configurations that do not require the block backend driver.

If all of the Xen backend drivers don't make Fedora 16, then little is lost. We can continue to test the Dom0 kernel (with a subset of its eventual features) and work on the supporting infrastructure. It would be useful for our effort to have a working Dom0, grubby, etc in Fedora 16 even if other features (most notably the block backend driver) do not make it. In the worst case, we may delay the announcement of the Dom0 feature to Fedora 17, but can include all progress completed in Fedora 16.

Documentation

See also:

  • The Xen mailing lists, hosted at xen.org
  • The fedora-xen mailing list, hosted by Fedora
  • Michael Young's third-party Dom0 kernels, http://fedorapeople.org/~myoung/dom0/, provided a Dom0-capable kernel for Fedora before Linus accepted key Xen features (not compatible with Fedora 15+)

In order to configure Rawhide to boot in Dom0:

1. yum install xen.

2. Edit /etc/default/grub to set "GRUB_DEFAULT="Xen 4.1.1". Update your GRUB 2 configuration using:

grub2-mkconfig -o /boot/grub2/grub.cfg

.

3. Configure a bridge device by setting /etc/sysconfig/network-scripts/ifcfg-virbr0:

DEVICE=virbr0
TYPE=Bridge
ONBOOT=yes
USERCTL=no
BOOTPROTO=dhcp
NM_CONTROLLED=no

4. Configure eth0 to be a member of the bridge:

DEVICE=eth0
HWADDR=[XX:XX:XX:XX:XX:XX]
TYPE=Ethernet
ONBOOT=yes
USERCTL=no
BOOTPROTO=none
BRIDGE=virbr0
NM_CONTROLLED=no

5. Reboot and select your Xen kernel in the GRUB 2 boot menu

Release Notes

The Fedora Linux kernel may now provide the basis for a Xen-based virtualization solution. Xen is a hypervisor-based type-1 virtualization platform. The kernel now has the ability to boot in Xen's Dom0, a privileged domain that allows Fedora to provide driver and guest management support to Xen and other non-privileged, guest operating systems.

Comments and Discussion