]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: add net device prefix to capabilities
authorJoao Martins <joao.m.martins@oracle.com>
Wed, 3 Feb 2016 21:40:33 +0000 (21:40 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 4 Feb 2016 11:15:51 +0000 (11:15 +0000)
commit819d1d9438870bd6bc4a712e4004e30192795b61
tree68b0f974920e4b1bba6b22a35eaf957947057200
parent6221b8944e04c5cb02d3882833c11ce2319d88f7
conf: add net device prefix to capabilities

In the reverted commit d2e5538b1, the libxl driver was changed to copy
interface names autogenerated by libxl to the corresponding network def
in the domain's virDomainDef object. The copied name is freed when the
domain transitions to the shutoff state. But when migrating a domain,
the autogenerated name is included in the XML sent to the destination
host.  It is possible an interface with the same name already exists on
the destination host, causing migration to fail.

This patch defines a new capability for setting the network device
prefix that will be used in the driver. Valid prefixes are
VIR_NET_GENERATED_PREFIX or the one announced by the driver.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
src/conf/capabilities.c
src/conf/capabilities.h
src/libvirt_private.syms