Features/KVM NIC Hotplug

From FedoraProject

< Features(Difference between revisions)
Jump to: navigation, search
(libvirt unix monitor patches committed)
(update status)
 
(3 intermediate revisions by 2 users not shown)
Line 12: Line 12:
  
 
* Targeted release: [[Releases/12|Fedora 12]]
 
* Targeted release: [[Releases/12|Fedora 12]]
* Last updated: 2009-07-09
+
* Last updated: 2009-08-05
* Percentage of completion: 40%
+
* Percentage of completion: 100%
  
=== TODO ===
+
=== Completed ===
  
 +
* SCM_RIGHTS patches [http://lists.gnu.org/archive/html/qemu-devel/2009-07/threads.html#00413 posted] for qemu (in 0.11.0)
 +
* unix socket monitor patches [http://libvirt.org/git/?p=libvirt.git;a=commit;h=62455ed872 committed] to libvirt (in 0.7.0)
 
* Make sure selinux-policy is update to allow libvirtd/qemu to use the unix sockets
 
* Make sure selinux-policy is update to allow libvirtd/qemu to use the unix sockets
 
* Implement NIC hotplug in the libvirt QEMU driver by passing the tap file descriptor to QEMU over the monitor socket
 
* Implement NIC hotplug in the libvirt QEMU driver by passing the tap file descriptor to QEMU over the monitor socket
 
* Check that it works well in virt-manager
 
* Check that it works well in virt-manager
 
=== Completed ===
 
 
* SCM_RIGHTS patches [http://lists.gnu.org/archive/html/qemu-devel/2009-07/threads.html#00413 posted] for qemu
 
* unix socket monitor patches [http://libvirt.org/git/?p=libvirt.git;a=commit;h=62455ed872 committed] to libvirt (will be in 0.6.6)
 
  
 
== Detailed Description ==
 
== Detailed Description ==
Line 74: Line 71:
 
== Release Notes ==
 
== Release Notes ==
  
Fedora 11 adds the ability to add a network interface to a running KVM guest using libvirt/virt-manager.
+
Fedora 12 adds the ability to add a network interface to a running KVM guest using libvirt/virt-manager.
  
 
== Comments and Discussion ==
 
== Comments and Discussion ==
Line 80: Line 77:
 
* See [[Talk:Features/KVM NIC Hotplug]]
 
* See [[Talk:Features/KVM NIC Hotplug]]
  
[[Category:Virtualization|KVM NIC Hotplug]]
+
[[Category:FeatureAcceptedF12]]
  
[[Category:FeatureReadyForWrangler]]
+
[[Category:Virtualization|KVM NIC Hotplug]]
  
 
[[Category:F12_Virt_Features|KVM NIC Hotplug]]
 
[[Category:F12_Virt_Features|KVM NIC Hotplug]]

Latest revision as of 16:54, 5 August 2009

Contents

[edit] KVM NIC Hotplug

[edit] Summary

Allow the addition of a guest network interface (NIC) a guest virtual machine without needing to restart the guest.

[edit] Owner

[edit] Current status

  • Targeted release: Fedora 12
  • Last updated: 2009-08-05
  • Percentage of completion: 100%

[edit] Completed

  • SCM_RIGHTS patches posted for qemu (in 0.11.0)
  • unix socket monitor patches committed to libvirt (in 0.7.0)
  • Make sure selinux-policy is update to allow libvirtd/qemu to use the unix sockets
  • Implement NIC hotplug in the libvirt QEMU driver by passing the tap file descriptor to QEMU over the monitor socket
  • Check that it works well in virt-manager

[edit] Detailed Description

NIC hotplug is a relatively common virtualization feature. The idea is that one should be able to add and remove NICs from a guest while it is running. For example, you might want to connect the guest to an additional network, without having to restart the guest.

This is currently supported by QEMU, but only if you allow QEMU to create and configure the tap device itself.

libvirt prefers to create the tap device and pass the file descriptor to QEMU via the command line. In order to support hotplug, we need QEMU to allow us to pass a file descriptor over the QEMU monitor socket.

The only way this could conceivably be supported is to have QEMU support file descriptor passing via SCM_RIGHTS on a unix socket.

The alternative is to use persistent tap devices, but this makes error/cleanup handling far more difficult and also requires that the QEMU process has permissions to /dev/net/tun.

[edit] Benefit to Fedora

NIC hotplug is a commonly requested virtualization feature.

[edit] Scope

As described above, changes to QEMU and libvirt are required.

[edit] How To Test

  1. Run virt-manager and start a guest
  2. Go to Details, click "Add Hardware", Network, add to Virtual Network, Forward, Finish
  3. virt-manager should not display a "The device could not be attached to the running machine" warning
  4. Log into the guest and use "ifconfig" to confirm that the NIC is visible in the guest
  5. Bring the interface up and test that it's working correctly

[edit] User Experience

See the previous section.

[edit] Dependencies

None, outside of what's describe above.

[edit] Contingency Plan

We may consider persistent tap devices if upstream QEMU does not accept the need for SCM_RIGHTS support.

If neither gets implemented on time, the status quo will remain - virt-manager warns users that they have to restart the guest in order for the NIC to be visible in the guest.

[edit] Documentation

None.

[edit] Release Notes

Fedora 12 adds the ability to add a network interface to a running KVM guest using libvirt/virt-manager.

[edit] Comments and Discussion