<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div><br></div><div dir="ltr"><div>I passed a nvidia graphic card to a virtual machine with KVM.</div><div><br></div><div>I seted '-vga none' because vga in qemu will conflict with the gpu that I passed to VM in windows 7. I will get code 12 with graphic card in Device Manager when I set '-vga cirrus' or '-vga qxl'.</div><div>I could not connect to VM by spice because I had set '-vga none'.</div><div><br></div><div>The '-vga cirrus' will not conflict with the gpu in Windows 10, but spice will connect to vga instead of the graphic card that I passed to VM.</div><div><br></div><div>How can I connet to the graphic card and controll the vm by spice?</div></div></blockquote><div><br></div><div>Currently is not possible. The problem is that the card is fully controlled by the guest<br></div><div>so the host cannot see the content of the screen. We are doing some experimentation<br></div><div>in order to get the content with the help of the guest. Possibly with Intel the host</div><div>can read the screen content so won't require any guest collaboration.<br></div><div><br></div><div>Frediano<br></div><div><br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div><br></div><div>Here my qemu command:</div><div><br></div><div>/root/qemu25/qemu/x86_64-softmmu/qemu-system-x86_64 \</div><div>-name i-gputest \</div><div>-machine pc \</div><div>-m 2048 \</div><div>-boot strict=on \</div><div>-smp 2,sockets=1,cores=2,threads=1 \</div><div>-hda /root/gputest/windows7.raw \</div><div>-k en-us \</div><div>-drive if=pflash,format=raw,readonly,file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd \</div><div>-drive if=pflash,format=raw,file=/root/gputest/OVMF_VARS-pure-efi.fd \</div><div>-device vfio-pci,host=44:00.0,multifunction=on,x-vga=on \</div><div>-device vfio-pci,host=44:00.1 \</div><div>-spice port=5944,disable-ticketing \</div><div>-vga none </div><div><br></div><div><span style="font-size:14px">Regards,</span><br></div><div><span style="font-size:14px">John</span></div></div></blockquote></div></body></html>