Is it possible to do a live migrate of a guest, having on the from host a source_device=eth2 and to host a source_dev=eth1?
Laine Stump
2019-Oct-21 15:48 UTC
Re: [libvirt-users] Live migrate + change interface name
On 10/17/19 4:26 PM, Marc Roos wrote:> > Is it possible to do a live migrate of a guest, having on the from host > a source_device=eth2 and to host a source_dev=eth1?What management tool are you using that the syntax is "source_device=eth2"? Are you maybe just paraphrasing your config, and what you actually have is something like this?: <interface type='direct'> <source dev='eth2'/> ... </interface> ? If so, the way to make this easily migratable is to create a network on both hosts that points to the desired physical device, e.g. on host 1: <network> <name>direct-net</name> <forward mode='bridge'> <interface dev='eth2'/> </forward> </network> and on host2: (same thing, but use 'eth1') After net-define-ing the networks, you'll need to net-autostart and net-start them. Then in your guest's interface config, you would use this: <interface type='network> <source network='direct-net'/> ... You will then be able to migrate from one host to the other without needing to modify your XML during the migration.
Hmm indeed, I will have to look at using this network. Currently I am using virsh, and scripting the adding and removing of an interface at runtime with detach-interface/attach-interface. -----Original Message----- To: libvirt-users Subject: Re: [libvirt-users] Live migrate + change interface name On 10/17/19 4:26 PM, Marc Roos wrote:> > Is it possible to do a live migrate of a guest, having on the from > host a source_device=eth2 and to host a source_dev=eth1?What management tool are you using that the syntax is "source_device=eth2"? Are you maybe just paraphrasing your config, and what you actually have is something like this?: <interface type='direct'> <source dev='eth2'/> ... </interface> ? If so, the way to make this easily migratable is to create a network on both hosts that points to the desired physical device, e.g. on host 1: <network> <name>direct-net</name> <forward mode='bridge'> <interface dev='eth2'/> </forward> </network> and on host2: (same thing, but use 'eth1') After net-define-ing the networks, you'll need to net-autostart and net-start them. Then in your guest's interface config, you would use this: <interface type='network> <source network='direct-net'/> ... You will then be able to migrate from one host to the other without needing to modify your XML during the migration.
I was trying to see if it is possible to automatically set the mtu size
for the guest. I am using a tunnel with smaller mtu so when I switch
over vm's, it would be nice if they get this tunnel mtu automatically.
This config:
<interface type='direct'>
<source dev='tun1' mode='bridge'/>
<model type='virtio'/>
<mtu size='1462'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x07'
function='0x0'/>
</interface>
Generates this error:
error: unsupported configuration: setting MTU on interface type direct
is not supported yet
Is there another way to set this, like with this host_mtu as mentioned
in[1], or can I forget about trying? this?
qemu-system-x86-2.0.0-1.el7.6.x86_64
qemu-kvm-1.5.3-173.el7_8.3.x86_64
libvirt-4.5.0-33.el7_8.1.x86_64
[1]
https://www.mail-archive.com/libvirt-users@redhat.com/msg10746.html