Features/XenPvopsDom0

From FedoraProject

< Features(Difference between revisions)
Jump to: navigation, search
(Update current status)
m (Documentation: -- www.xen.org became www.xenproject.org. Fixing this)
 
(22 intermediate revisions by 4 users not shown)
Line 14: Line 14:
  
 
* Targeted release: [[Releases/16 | Fedora 16 ]]
 
* Targeted release: [[Releases/16 | Fedora 16 ]]
* Last updated: 2010-06-01
+
* Last updated: 2011-09-15
* Percentage of completion: 50%
+
* 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. It is expected that Linux 3.0 will contain the block backend driver.
+
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).
 
+
In order to support development until Xen is fully integrated into the upstream kernel, Michael Young has been building third-party [http://fedorapeople.org/~myoung/dom0/ Dom0 kernels]. He creates a diff between upstream and the xen/stable-2.6.32.x branch and uses it to patch the Fedora 12 kernel package. The reason that he based his work on the Fedora 12 kernel is that newer Fedora versions ship newer kernels, while Xen had continued to target 2.6.32. As mentioned above, Xen now targets newer kernels, but all of the backend drivers are not yet ported to them.
+
  
 
Open bugs:
 
Open bugs:
  
* Dom0 backend drivers, [https://bugzilla.redhat.com/show_bug.cgi?id=692203 Bugzilla #692203]
 
* graphics hardware, [https://bugzilla.redhat.com/show_bug.cgi?id=692178 Bugzilla #692178]
 
 
* power management, [https://bugzilla.redhat.com/show_bug.cgi?id=692179 Bugzilla #692179]
 
* power management, [https://bugzilla.redhat.com/show_bug.cgi?id=692179 Bugzilla #692179]
* grubby support for syntax required by Xen, [https://bugzilla.redhat.com/show_bug.cgi?id=668063 Bugzilla #668063]
 
* new-kernel-pkg and HYPERVISOR option in /etc/sysconfig/kernel, [https://bugzilla.redhat.com/show_bug.cgi?id=658387 Bugzilla #658387]
 
 
* bridging in NetworkManager, [https://bugzilla.redhat.com/show_bug.cgi?id=199246 Bugzilla #199246]
 
* bridging in NetworkManager, [https://bugzilla.redhat.com/show_bug.cgi?id=199246 Bugzilla #199246]
* support in OProfile, [https://bugzilla.redhat.com/show_bug.cgi?id=693596 Bugzilla #693596]
+
* GRUB 2 has extraneous menu entries after installing Xen, [https://bugzilla.redhat.com/show_bug.cgi?id=739134 Bugzilla #739134]
  
 
== Detailed Description ==
 
== Detailed Description ==
Line 42: Line 36:
  
 
* Implement Dom0 support in upstream kernel (Complete)
 
* Implement Dom0 support in upstream kernel (Complete)
* Implement Dom0 backend drivers support in upstream kernel; fix remaining issues (Xen developers)
+
* Implement Dom0 backend drivers support in upstream kernel; fix remaining issues (Complete)
* Modify 'grubby' to support GRUB syntax required by Xen
+
* 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
+
* Make 'new-kernel-pkg' aware of Xen using the HYPERVISOR option in /etc/sysconfig/kernel (Complete)
 
* Ensure Fedora's virtualization tools support Xen
 
* Ensure Fedora's virtualization tools support Xen
 
* Possibly implement support for bridging in NetworkManager
 
* Possibly implement support for bridging in NetworkManager
Line 51: Line 45:
 
== How To Test ==
 
== How To Test ==
  
* Install a Fedora Dom0 kernel and {{package|xen}}
+
* Install a Fedora Dom0 kernel and {{package|xen}} (kernel-PAE is required for i686)
* Confirm grub.conf does not boot the new kernel using Xen
+
* Reboot and confirm the Dom0 kernel can boot on bare metal (no Xen) by selecting the appropriate GRUB menu option
* Reboot
+
* Reboot and confirm grub.conf boots the new kernel using Xen by selecting the appropriate GRUB menu option
* Confirm the Dom0 kernel can boot on bare metal (no Xen)
+
* Turn on Xen Userspace by running 'chkconfig xend on'
+
* Turn on Xen Hypervisor by setting 'HYPERVISOR=/boot/xen-X.Y.gz' in /etc/sysconfig/kernel
+
* Remove and reinstall the Dom0 kernel
+
* Confirm grub.conf boots the new kernel using Xen
+
* 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 paravirtualized 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 fully virtualized guest
 
* Use 'virt-install' to deploy a Fedora fully virtualized guest
 
* Use 'virsh' to save & restore guests
 
* Use 'virsh' to save & restore guests
Line 84: Line 72:
 
== Contingency Plan ==
 
== 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 2.6.37/38 series and therefore Fedora 15 or it may not. Regardless, we will have to touch a lot of subsystems, so it makes sense to start early.
+
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 will 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.
+
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 the Xen drivers don't make Fedora 15, then little is lost. We can continue to test the Dom0 kernel (without support for DomU guests) and work on the supporting infrastructure. It would be useful for our effort to have a working Dom0, grubby, etc in Fedora 15 even if other features (most notably DomU guests) do not make it. In the worst case, we may delay the announcement of the Dom0 feature to Fedora 16, but can include all progress completed in Fedora 15.
+
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 ==
Line 94: Line 82:
 
See also:
 
See also:
  
* Xen, http://www.xen.org/
+
* Xen, http://www.xenproject.org/
  
 
* The Xen mailing lists, hosted at xen.org
 
* The Xen mailing lists, hosted at xen.org
Line 100: Line 88:
 
* The fedora-xen mailing list, hosted by Fedora
 
* 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
+
* "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/
+
* 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/
 
* 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 a system to boot Michael Young's kernel in Dom0 on a present Fedora system:
+
In order to configure Rawhide to boot in Dom0:
  
 
1. yum install xen.
 
1. yum install xen.
  
2. Install a Dom0 kernel package.
+
2. Edit /etc/default/grub to set "GRUB_DEFAULT="Xen 4.1.1". Update your GRUB 2 configuration using:
  
3. Use grubby to create a grub.conf entry in a manner such as the following:
+
<pre>grub2-mkconfig -o /boot/grub2/grub.cfg</pre>.
 
+
<pre>
+
KERNEL_VERSION=2.6.32.23-170.1.xendom0.fc12.x86_64
+
ROOT_UUID=`blkid /dev/sda3 -s UUID | awk -F = '{ print $2 }' | tr -d '"'`
+
 
+
grubby \
+
      --add-multiboot=/boot/xen.gz \
+
      --add-kernel=/boot/vmlinuz-${KERNEL_VERSION} \
+
      --args="ro root=UUID=${ROOT_UUID} [...]" \
+
      --initrd=/boot/initramfs-${KERNEL_VERSION}.img \
+
      --title="Fedora (${KERNEL_VERSION})"
+
</pre>
+
  
4. Configure a bridge device by setting /etc/sysconfig/network-scripts/ifcfg-virbr0:
+
3. Configure a bridge device by setting /etc/sysconfig/network-scripts/ifcfg-virbr0:
  
 
<pre>
 
<pre>
Line 137: Line 113:
 
</pre>
 
</pre>
  
5. Configure eth0 to be a member of the bridge:
+
4. Configure eth0 to be a member of the bridge:
  
 
<pre>
 
<pre>
Line 150: Line 126:
 
</pre>
 
</pre>
  
6. Reboot and select your Xen kernel in the GRUB boot menu
+
5. Reboot and select your Xen kernel in the GRUB 2 boot menu
  
 
== Release Notes ==
 
== Release Notes ==
Line 163: Line 139:
  
 
[[Category:Virtualization|XenPvopsDom0]]
 
[[Category:Virtualization|XenPvopsDom0]]
[[Category:FeaturePageIncomplete]]
+
[[Category:FeatureAcceptedF16]]
 
<!-- See https://fedorahosted.org/fesco/ticket/523 -->
 
<!-- See https://fedorahosted.org/fesco/ticket/523 -->

Latest revision as of 13:12, 28 June 2013

Contents

[edit] Xen Pvops Dom0

[edit] Summary

pvops-based Package-x-generic-16.pngkernel 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.

[edit] 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.

[edit] 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:

[edit] 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.

[edit] 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.

[edit] 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

[edit] How To Test

  • Install a Fedora Dom0 kernel and Package-x-generic-16.pngxen (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'

[edit] 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

[edit] Dependencies

[edit] 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.

[edit] 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

[edit] 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.

[edit] Comments and Discussion