[libvirt-users] Live migrate + change interface name

Laine Stump laine at redhat.com
Mon Oct 21 15:48:31 UTC 2019


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.




More information about the libvirt-users mailing list