Bug 1661043

Summary: RFE: network/interface: Virtual interface NIC link state toggle
Product: [Community] Virtualization Tools Reporter: Jonathan Rubenstein <jrubcop>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED DUPLICATE QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: berrange, crobinso, gscrivan, tburke
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Feature: UI interface to toggle the link state of a virtual network interface. Reason: Currently no UI interface exists for this, you must use virsh domif-setlink
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-12-20 02:02:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jonathan Rubenstein 2018-12-19 22:42:11 UTC
virt-manager 1.5.1-1 (Debian Buster [Testing])

Neither the Connection Details > Network Interfaces window, nor the Virtual Network Interface device configuration in the domain configuration panel in virt-manager allow you to set the virtual link state of a virtual interface, you must use virsh's 'domif-setlink' command to do so.

Libvirt manages interface link states using the <link> element in the domain XML, and the state attribute of that link element. [1] This is how 'virsh domif-setlink' works. [2][3]

This would be a useful feature to include in the UI, so you can pull a VM off of the network easily if you need to without affecting the host, or other VMs, since this directly affects the virtual NIC rather than a bridge. (Without needing to use virsh)

My concept for implementation is to add a "Link state:" label with a toggle button next to it, to the Virtual Network Interface device page in domain info. Activating the button will toggle the link state up or down, similar to domif-setlink. [1][3] I'm not very attached to this implementation concept if you have a better one.

[1] (https://libvirt.org/formatdomain.html#elementLink)
[2] (https://libvirt.org/git/?p=libvirt.git;a=blob;f=tools/virsh-domain.c;h=24f78520dee1cee8c79e8a80e1c1e5173346977c;hb=e05d8e570b24bc48c083b2c36428f7fca8ff864b#l3060)
[3] (https://libvirt.org/git/?p=libvirt.git;a=blob;f=tools/virsh-domain.c;h=24f78520dee1cee8c79e8a80e1c1e5173346977c;hb=e05d8e570b24bc48c083b2c36428f7fca8ff864b#l3180)

Comment 1 Jonathan Rubenstein 2018-12-20 02:02:32 UTC
I swear, I did do extensive searching of this tracker for any duplicate reports, but alas, I missed bug 1614532. I discovered this after a little bit of research on the github, and finding out my RFE is already complete, just not in Debian Buster yet. 

Sorry!

https://github.com/virt-manager/virt-manager/commit/ef4e0dbc4f29a9439b6941e90e199ef6b19b8ae2

*** This bug has been marked as a duplicate of bug 1614532 ***