Bug 784878

Summary: Feature Request: change network of an interface while host is running
Product: [Community] Virtualization Tools Reporter: Hendrik Schwartke <hendrik>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: casmith, crobinso, ralf, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-23 23:27:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Hendrik Schwartke 2012-01-26 14:53:12 UTC
Description of problem:

Currently it's not possible to change the network of an interface while the host is running. To change the network it's required to restart the host.

Comment 1 Hendrik Schwartke 2012-01-26 15:02:52 UTC
Apparently the current state of an interface which is connected to a network is not stored in the struct data.network.actual of virDomainNetDef. So this has to be done first to make the change possible.

Comment 2 Ralf Spenneberg 2012-01-26 16:06:08 UTC
To clarify this a little bit more. What Hendrik would like to do is to change the virtual network assigned to a virtual nic. 
We already proposed a patch to do this if the vNIC is assigned to externally configured bridge (see: https://bugzilla.redhat.com/show_bug.cgi?id=784767). 
This currently does not work with virtual networks created through libvirt because of comment 1.

Comment 3 Cole Robinson 2016-04-23 23:27:10 UTC
Sorry this never received a timely response, but this seems to be implemented in libvirt nowadays. I can't find the exact commit though. Doing 'sudo virsh update-device xmlfile' pointing to an XML config with a different network setup is accepted and reflected correctly in the XML