Answer the question
In order to leave comments, you need to log in
Forwarding a video card to a virtual machine and snapshots of the state?
Recently I managed to transfer a video card (AMD RX 560) to a virtual machine (Ubuntu 20.04 host, QEMU KVM, Win 8.1 guest) Then I found out that it is impossible to take snapshots with this configuration, although hibernation is possible in the Win 8.1 guest Are there other virtual machines in which Can I take pictures with a forwarded vidyakha? Is it even possible to take snapshots of the state of a virtual machine into which a video card is thrown? Or is there some fundamental limitation?
Answer the question
In order to leave comments, you need to log in
This is fundamentally impossible outside the VM, because it is not clear how to restore the context of the video card when the VM wakes up.
Hibernation is what hibernation is for, that it can "ask" the card driver to put the device to sleep in a regular way.
Recently I managed to forward a video card (AMD RX 560) to a virtual machine (Ubuntu 20.04 host, QEMU KVM, Win 8.1 guest)
So, my answer to my own question, summing up. A snapshot of the state with a forwarded video card is fundamentally impossible at the moment (05/13/2021). The only option left is to send the machine to hibernation, and then take a picture. In this case, in subsequent cases of restoring the snapshot, the machine will obviously be turned off and hibernated. So it needs to be turned on. Maybe not very convenient, but something.
I will describe how to do this procedure in QEMU KVM with gpu passthrough.
I will send Windows to hibernation from the host ubuntu via the virsh dompmsuspend https://libvirt.org/manpages/virsh.html#dompmsuspend command. To do this, you need to take the following steps:
1. In the xml of the virtual machine in the pm> section, you need to change suspend-to-mem enabled="no"/ and suspend-to-disk enabled="no"/ to "yes":
<pm>
<suspend-to-mem enabled="yes"/>
<suspend-to-disk enabled="yes"/>
</pm>
<channel type='unix'>
<source mode='bind' path='/var/lib/libvirt/qemu/f16x86_64.agent'/>
<target type='virtio' name='org.qemu.guest_agent.0'/>
</channel>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question