[libvirt-users] Canging bridge names on live migration
Laine Stump
laine at laine.org
Wed Jun 3 14:59:25 UTC 2015
On 06/03/2015 07:22 AM, seitan wrote:
> Hello,
> i wonder, if there's a possibility to change a name of a shared interface in
> virtual machine config, while doing migration.
> The problem is:
> hypervisor1 (source) uses shared interface name "br0".
> hypervisor2 (target) uses shared interface name "br500".
> Live migration fails, because target hypervisor does not have "br0" interface.
The simplest method of doing what you need:
Instead of using "<interface type='bridge'>",
1) create an "unmanaged virtual network" with the same name on both hosts
On source host:
<network>
<name>bridge-net</name>
<forward mode='bridge'/>
<bridge name='br0'/>
</network>
On destination host:
<network>
<name>bridge-net</name>
<forward mode='bridge'/>
<bridge name='br500'/>
</network>
(put the above into files, then use "virsh net-define $file && virsh
net-autostart bridge-net && virsh net-start bridge-net" to activate the
new networks)
2) Change the interface definition in your guests to:
<interface type='network'>
<source network='bridge-net'/>
....
[whatever else was already there]
</interface>
The guest XML now doesn't need to change during migration, so you can
avoid the need to modify it with a migration hook (as suggested in the
other response to your question)
More information about the libvirt-users
mailing list