On F42, QEMU/KVM Win7 VM optimisation. Help needed

My computer is getting old. 12 years to be precise. Ordered an B550M with a R5600G which doesn’t support Win7 natively. No drivers. So I generated a win7.VHD file from the actual SSD setup with the MS disk2vhd tool. Converted to windows7.qcow2 for use with QEMU/KVM. Got my VM but it has some annoyances. The most important are below. Im sure I’ll find many more in the days to come.

  1. No hardware acceleration. There is no virtio viogpu for Win 7. Another solution ?

  2. My original setup had a separate SSD seen by windows as H: where games mostly resides. On F42, it is mounted as /mnt/Jeux (NTFS) and is also available as /dev/sdc. It’s a 2TB SSD so I’ve not included it in my image. I tried to use samba share to map it to H: and it worked. However I can’t run the programs directly from that samba share:

My samba setup:

[global]
	workgroup = ZARDOZ$
    netbios name = SHIZUMA
	security = user

	passdb backend = tdbsam

	printing = cups
	printcap name = cups
	load printers = yes
	cups options = raw

	smb3 unix extensions = yes

	# Install samba-usershares package for support
	include = /etc/samba/usershares.conf

[homes]
	comment = Home Directories
	valid users = %S, %D%w%S
	browseable = No
	read only = No
	inherit acls = Yes

[printers]
	comment = All Printers
	path = /var/tmp
	printable = Yes
	create mask = 0600
	browseable = No

[print$]
	comment = Printer Drivers
	path = /var/lib/samba/drivers
	write list = @printadmin root
	force group = @printadmin
	create mask = 0664
	directory mask = 0775

[jeux]
        path = /mnt/Jeux
        read only = No
        force user = shizuma

My command line to launch the VM:

/usr/bin/qemu-system-x86_64 -name guest=win7,debug-threads=on -S -object {"qom-type":"secret","id":"masterKey0","format":"raw","file":"/home/shizuma/.config/libvirt/qemu/lib/domain-1-win7/master-key.aes"} -machine pc-q35-9.2,usb=off,vmport=off,dump-guest-core=off,memory-backend=pc.ram,hpet=off,acpi=on -accel kvm -cpu host,migratable=on,hv-time=on,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x1fff,hv-vpindex=on,hv-runtime=on,hv-synic=on,hv-stimer=on,hv-frequencies=on,hv-tlbflush=on,hv-ipi=on,hv-avic=on -m size=16777216k -object {"qom-type":"memory-backend-ram","id":"pc.ram","size":17179869184} -overcommit mem-lock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 88383f60-c13a-4200-931c-fb16e845092d -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=24,server=on,wait=off -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-shutdown -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on -device {"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"} -device {"driver":"pcie-root-port","port":17,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x2.0x1"} -device {"driver":"pcie-root-port","port":18,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x2"} -device {"driver":"pcie-root-port","port":19,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x3"} -device {"driver":"pcie-root-port","port":20,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x4"} -device {"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.2","addr":"0x0"} -device {"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.3","addr":"0x0"} -blockdev {"driver":"file","filename":"/mnt/Jeux/windows7.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage","backing":null} -device {"driver":"ide-hd","bus":"ide.0","drive":"libvirt-1-format","id":"sata0-0-0","bootindex":1} -netdev {"type":"user","id":"hostnet0"} -device {"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:af:20:61","bus":"pci.1","addr":"0x0"} -chardev pty,id=charserial0 -device {"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0} -chardev spicevmc,id=charchannel0,name=vdagent -device {"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"com.redhat.spice.0"} -device {"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"} -audiodev {"id":"audio1","driver":"spice"} -spice port=0,disable-ticketing=on,image-compression=off,seamless-migration=on -device {"driver":"qxl-vga","id":"video0","max_outputs":1,"ram_size":67108864,"vram_size":67108864,"vram64_size_mb":0,"vgamem_mb":16,"bus":"pcie.0","addr":"0x1"} -device {"driver":"ich9-intel-hda","id":"sound0","bus":"pcie.0","addr":"0x1b"} -device {"driver":"hda-duplex","id":"sound0-codec0","bus":"sound0.0","cad":0,"audiodev":"audio1"} -global ICH9-LPC.noreboot=off -watchdog-action reset -chardev spicevmc,id=charredir0,name=usbredir -device {"driver":"usb-redir","chardev":"charredir0","id":"redir0","bus":"usb.0","port":"2"} -chardev spicevmc,id=charredir1,name=usbredir -device {"driver":"usb-redir","chardev":"charredir1","id":"redir1","bus":"usb.0","port":"3"} -device {"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.4","addr":"0x0"} -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on

I have a second command line for quick tests. That one has no sound though!

qemu-system-x86_64 \
  -enable-kvm \
  -m 16G \
  -cpu host \
  -smp 2 \
  -drive file=/mnt/Jeux/windows7.qcow2,format=qcow2,if=virtio \
  -vga virtio \
  -display gtk,zoom-to-fit=off \
  -usb -device usb-tablet \
  \
  -spice port=5900,disable-ticketing=on \
  -device virtio-serial \
  -chardev spicevmc,id=vdagent,name=vdagent \
  -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
  -net nic,model=virtio -net user,smb=/tmp/barrier,smb=/mnt/Jeux \
  -rtc base=localtime