Should setup a net failover device.
The xml like this,
<interface type='network'>
  <mac address='52:54:00:00:12:53'/>
  <source network=’virbr0’ />
  <model type='virtio'/>
  <driver name='vhost' queues='4'/>
  <link state='down'/>
  <teaming type='persistent'/>
  <alias name='ua-backup0'/>
</interface>
<interface type='hostdev' managed='yes'>
  <mac address='52:54:00:00:12:53'/>
  <source>
    <address type='pci' domain='0x0000' bus='0x42' slot='0x02' function='0x5'/>
  </source>
  <teaming type='transient' persistent='ua-backup0'/>
</interface>

After the VM booted, detach the VF and attach the VF.
The vf.xml like this,
<interface type='hostdev' managed='yes'>
  <mac address='52:54:00:00:12:53'/>
  <source>
    <address type='pci' domain='0x0000' bus='0x42' slot='0x02' function='0x5'/>
  </source>
  <teaming type='transient' persistent='ua-backup0'/>
</interface>

Command like this, virsh detach-device $domain vf.xml ; , virsh attach-device 
$domain vf.xml
The VM hangs.

--
Best Regards,
Faicker

Reply via email to