Bug 643373 (QMPNetCard) - RFE: Add ability to control link up/down state of guest NICs via XML & on the fly.
Summary: RFE: Add ability to control link up/down state of guest NICs via XML & on the...
Keywords:
Status: CLOSED ERRATA
Alias: QMPNetCard
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 625681
Blocks: 655920 580953 644849
TreeView+ depends on / blocked
 
Reported: 2010-10-15 12:51 UTC by Luiz Capitulino
Modified: 2013-01-09 23:14 UTC (History)
21 users (show)

Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Enhancement
Doc Text:
Controlling up/down link states libvirt is now capable of controlling the state (up or down) of a link of the guest virtual network interfaces. This allows users to perform testing and simulation as though though plugging and unplugging the network cable from the interface. This feature also lets users isolate guests in case any issues arise.
Clone Of: 625681
Environment:
Last Closed: 2012-06-20 06:25:34 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 19:31:38 UTC

Comment 12 Peter Krempa 2011-09-06 10:21:49 UTC
Feature added with a series of upstream commits:

dc675f3 link-state: virsh: Add wrapper commands for changing link state
e0a07bb link-state: qemu: Add net intf modification to virUpdateDeviceFlags
8277c15 link-state: qemu: Add monitor handling for link state modification
edd1295 link-state: conf: Add element to XML for controling link state
c246b02 link-state: util: Add equality comparison functions for structures

Comment 14 zhpeng 2012-01-10 06:21:55 UTC
Test with:
libvirt-0.9.9-1.el6.x86_64


VIA XML:
# virsh update-device kvm22 iface.xml 
Device updated successfully


<interface type='network'>
<mac address='52:54:00:43:ff:6b'/>
<source network='default'/>
<target dev='vnet1'/>
<model type='virtio'/>
<link state='up'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

the link state 'up' 'down' works well.

On-the-fly:
# virsh domif-setlink kvm22 52:54:00:43:ff:6b up
Device updated successfully
# virsh domif-setlink kvm22 52:54:00:43:ff:6b down
Device updated successfully

The guest interface is under control.

Comment 15 zhpeng 2012-01-10 06:34:08 UTC
When update device to 'down'
guest can't ping to other hosts

When update device to 'up'
guest can ping to other hosts

Comment 16 Peter Krempa 2012-05-02 13:44:26 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Libvirt added a feature to control link state of the guest virtual network interfaces. This allows to perform testing and simulation as though the user would plug and unplug the network cable from the interface. This also allows isolation of the guest in case of problems.

Comment 17 Martin Prpič 2012-05-09 10:53:21 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1,3 @@
-Libvirt added a feature to control link state of the guest virtual network interfaces. This allows to perform testing and simulation as though the user would plug and unplug the network cable from the interface. This also allows isolation of the guest in case of problems.+Controlling up/down link states
+
+libvirt is now capable of controlling the state (up or down) of a link of the guest virtual network interfaces. This allows users to perform testing and simulation as though though plugging and unplugging the network cable from the interface. This feature also lets users isolate guests in case any issues arise.

Comment 19 errata-xmlrpc 2012-06-20 06:25:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0748.html


Note You need to log in before you can comment on or make changes to this bug.