See below for the command I am now using (I changed it to Q35 since the last message I sent), for EDK2, I used -bios OVMF.fd instead and removed -bios bios.bin (which is SeaBIOS).
- Christopher Lentocha
qemu-system-x86_64 \
-name debug-threads=on \
-machine pc-q35-2.10,usb=off,vmport=off,smm=on,kernel_irqchip=on,dump-guest-core=off \
-accel kvm \
-m 8192 \
-overcommit mem-lock=off \
-smp 4,sockets=1,dies=1,cores=2,threads=2 \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=localtime,clock=rt \
-global kvm-pit.lost_tick_policy=discard \
-global ICH9-LPC.disable_s3=0 \
-global ICH9-LPC.disable_s4=0 \
-boot menu=on,strict=on \
-device "{'driver':'ich9-usb-ehci1','id':'usb','bus':'pcie.0','addr':'0x2'}" \
-device "{'driver':'virtio-serial-pci','id':'virtio-serial0','bus':'pcie.0','addr':'0x9'}" \
-blockdev "{'driver':'file','filename':'Vista.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'}" \
-netdev user,id=hostnet0 \
-device "{'driver':'e1000e','netdev':'hostnet0','id':'net0','bus':'pcie.0','addr':'0x8'}" \
-chardev spicevmc,id=charchannel0,name=vdagent \
-device "{'driver':'virtserialport','bus':'virtio-serial0.0','nr':1,'chardev':'charchannel0','id':'channel0','name':'com.redhat.spice.0'}" \
-chardev spiceport,id=charchannel1,name=org.spice-space.webdav.0 \
-device "{'driver':'virtserialport','bus':'virtio-serial0.0','nr':2,'chardev':'charchannel1','id':'channel1','name':'org.spice-space.webdav.0'}" \
-device "{'driver':'usb-tablet','id':'input2','bus':'usb.0','port':'1'}" \
-device "{'driver':'usb-kbd','id':'input3','bus':'usb.0','port':'2'}" \
-audiodev "{'id':'audio1','driver':'spice'}" \
-spice port=0,disable-ticketing=on,seamless-migration=on \
-device "{'driver':'vmware-svga','id':'video0','vgamem_mb':512,'bus':'pcie.0','addr':'0xf'}" \
-device "{'driver':'ich9-intel-hda','id':'sound0','bus':'pcie.0','addr':'0xe'}" \
-device "{'driver':'hda-duplex','id':'sound0-codec0','bus':'sound0.0','cad':0,'audiodev':'audio1'}" \
-machine pcspk-audiodev=audio1 \
-msg timestamp=on \
-display gtk \
-cdrom Vista.iso
-bios bios.bin
On 2/7/25 07:41, Gerd Hoffmann wrote:
On Thu, Feb 06, 2025 at 07:23:44AM -0500, Christopher Lentocha wrote:
Indeed, the patch you provided works for both CSM in QEMU mode and QEMU's bios.bin mode.
Testing Results (For this whole time, just for reference):
EDK2 Build Revision: e7d7f02c8e157e936855a091948757f78c7d0298 SeaBIOS Build Revision: df9dd418b3b0e586cb208125094620fc7f90f23d (SeaBIOS with your patch applied from your last message) QEMU Build Revision: 621da7789083b80d6f1ff1c0fb499334007b4f51
QEMU command line I used is too long, but if you want it anyways, please do ask!
In short, I used pc-i440fx-7.1 with a Vista Install CD and Vista installed QCOW2 Image, and switched between the firmware with the -bios command-line option.
Then add a sata controller via -device I assume? Because 'pc-i440fx-7.1' uses ide storage by default.
I've tested (the non-csm case only) using '-M q35' which uses ahci by default. More convenient as you can simply use '-hda' and '-cdrom' switches to add sata disk + cdrom (but could very well be that the vista image doesn't boot then if installed using '-M pc').
take care, Gerd