Best way to migrate a VM with PCIe device passes-through to another host
-
Knowledgeable people, please advise what should be the best sequence for migrating a VM with running pFsense to another host while a NIC is passed through to it:
a) Just try to migrate straight ahead
b) Stop the VM => Remove the PCIe device from the VM => Migrate => Pass the NIC through to the Migrate VM on the Target Host
c) Make a clone of the VM => Migrate the Clone to the Target Host => Pass the NIC to the new VM on the Target Host
Thanks in advance to everyone
-
@Ascar B) is your way to go. VMs with PCI passthrough will fail migration (A) as the passthrough device itself cannot be migrated.
-
Yeah B is definitely the way to go, but this could still be a bit of a pain if you're having to do it frequently.
There isn't really a good way to do this automatically though, in fact I don't think it'd be possible even if hosts were identical hardware including the passed through devices.
-
In theory it might be possible if the device is also sync (ie if it's an NVMe drive, obviously you need the data to be sync between them before jumping).
However, depending on the device, we could provide some level of automation in XO (detach device on source and attach on destination) "alone" (ie without caring about device sync itself). I wonder if there's a use case for that
-
@dredknight Thank you. I did not try A but I was feeling that it would not succeed.
-
@planedrop Yes, doing thing like this frequently would not be fun at all. This is a one-off event. So, B is the way to go.
-
@olivierlambert In all honesty, despite how cool this would be, I don't think there is a very big use case for it. Definitely would still be awesome to see but I can't really find myself using it even in an odd homelab setup with dedicated GPUs passed through or something like that.
Maybe would be useful for something like a virtual firewall? But I personally don't think firewalls should be virtualized in any sort of prod setting.