Reputation: 146
When the QEMU-KVM VM contains a vfio device, the "virsh save" command will not be able to save the VM. So, I am curious why the vfio-device does not support the VM save command. One of the reason I know is that, it will conflict with the VM migration. But if I am not going to migrate the VM, is it possible the save the VM with the vfio device, and why?
Upvotes: 2
Views: 376
Reputation: 1858
Because the physical device is stateful, and because there is no way to dump the state from an arbitrary device, this state cannot be saved when the VM state is saved. Because the state cannot be saved, it cannot be restored. Without the state of the device being restored, the in-VM driver's knowledge of the state of the hardware will not match the state of the hardware and in virtually 100% of cases this will result in the driver, VM, and possibly the PCI bus crashing. Usually crashing very hard and taking down the entire host.
Therefore, no saving of VMs with hardware passed through is allowed.
Upvotes: 1