]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Don't format actual network definition in migratable XML
authorLuyao Huang <lhuang@redhat.com>
Thu, 25 Dec 2014 03:38:00 +0000 (11:38 +0800)
committerLaine Stump <laine@laine.org>
Sat, 14 Feb 2015 05:36:39 +0000 (00:36 -0500)
commit8620b7f8df9165cb90871ef05a303fabd7b270e3
treec1770161f9c23ac7b2a6dfb2bc9b467c4cb84aed
parent0df8394945cc99af7d3346d54ef3ec69deab94b5
conf: Don't format actual network definition in migratable XML

https://bugzilla.redhat.com/show_bug.cgi?id=1177194

When migrate a vm, we will generate a xml via qemuDomainDefFormatLive and
pass this xml to target libvirtd. Libvirt will use the current network
state in def->data.network.actual to generate the xml, this will make
migrate failed when we set a network type guest interface use a macvtap
network as a source in a vm then migrate vm to another host(which has the
different macvtap network settings: different interface name, bridge name...)

Add a flag check in virDomainNetDefFormat, if we set a VIR_DOMAIN_XML_MIGRATABLE
flag when call virDomainNetDefFormat, we won't get the current vm interface
state.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/conf/domain_conf.c