[libvirt-users] Canging bridge names on live migration

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. Thank you

You can use an edited xml-file to use for the destenation host. Look at the option --xml in the command 'virsh migrate' -----Oorspronkelijk bericht----- Van: seitan [mailto:tadas@ring.lt] Verzonden: woensdag 3 juni 2015 13:22 Aan: libvirt-users@redhat.com Onderwerp: [libvirt-users] Canging bridge names on live migration 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. Thank you _______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

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)
participants (3)
-
Dominique Ramaekers
-
Laine Stump
-
seitan