Hello,
I managed to successfully create and start a Windows XP 32-bit machine on Q35 with a virtio disk following this guide:
https://computernewb.com/wiki/QEMU/Guests/Windows_XP
My matter of concern regards the command from said website I use to start the machine and trying to replicate it in virt-manager. Here is the command in question with slight modifications:
qemu-system-x86_64 -M q35,usb=on,acpi=on,hpet=off -global q35-pcihost.x-pci-hole64-fix=false -m 4G -cpu host -accel kvm -drive if=virtio,file=winxp.qcow2 -drive if=floppy,file=xp_q35_x86.img,format=raw -device usb-tablet -device VGA,vgamem_mb=64 -nic user,model=virtio -monitor stdio -cdrom en_windows_xp_professional_SP3_x86.iso -boot d
The thing I am currently stuck at is the disk recognition part in virt-manager. No matter what I do, the Windows XP setup cannot recognize the virtio disk whatsoever when I load the driver for it. Using the i440fx chipset, it finds the virtio disk no problem, but swapping chipsets is not what I want to achieve. Also, if I try to run it on 4G RAM, the setup BSOD's, which is strange, as the command had no such problem. Here is the overview XML file from virt-manager (I modified the paths for obvious reasons):
<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm"> <name>winxp</name> <uuid>511059d5-8335-4210-bc2a-2f5074be8779</uuid> <metadata> <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0"> <libosinfo:os id="http://microsoft.com/win/xp"/> </libosinfo:libosinfo> </metadata> <memory unit="KiB">524288</memory> <currentMemory unit="KiB">524288</currentMemory> <vcpu placement="static">2</vcpu> <os> <type arch="x86_64" machine="pc-q35-10.2">hvm</type> <boot dev="hd"/> <bootmenu enable="yes"/> </os> <features> <acpi/> <apic/> <hyperv mode="custom"> <relaxed state="on"/> <vapic state="on"/> <spinlocks state="on" retries="8191"/> <vpindex state="on"/> <runtime state="on"/> <synic state="on"/> <stimer state="on"/> <frequencies state="on"/> <tlbflush state="on"/> <ipi state="on"/> <avic state="on"/> </hyperv> <vmport state="off"/> </features> <cpu mode="host-passthrough" check="none" migratable="on"/> <clock offset="localtime"> <timer name="rtc" tickpolicy="catchup"/> <timer name="pit" tickpolicy="delay"/> <timer name="hpet" present="no"/> <timer name="hypervclock" present="yes"/> </clock> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <pm> <suspend-to-mem enabled="no"/> <suspend-to-disk enabled="no"/> </pm> <devices> <emulator>/bin/qemu-system-x86_64</emulator> <disk type="file" device="cdrom"> <driver name="qemu" type="raw"/> <source file="$HOME/en_windows_xp_professional_SP3_x86.iso"/> <target dev="sda" bus="sata"/> <readonly/> <address type="drive" controller="0" bus="0" target="0" unit="0"/> </disk> <disk type="file" device="floppy"> <driver name="qemu" type="raw"/> <source file="$HOME/xp_q35_x86.img"/> <target dev="fda" bus="fdc"/> <address type="drive" controller="0" bus="0" target="0" unit="0"/> </disk> <disk type="file" device="disk"> <driver name="qemu" type="qcow2"/> <source file="/var/lib/libvirt/images/winxp.qcow2"/> <target dev="vda" bus="virtio"/> <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/> </disk> <controller type="usb" index="0" model="ich9-ehci1"> <address type="pci" domain="0x0000" bus="0x00" slot="0x1d" function="0x7"/> </controller> <controller type="usb" index="0" model="ich9-uhci1"> <master startport="0"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x1d" function="0x0" multifunction="on"/> </controller> <controller type="usb" index="0" model="ich9-uhci2"> <master startport="2"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x1d" function="0x1"/> </controller> <controller type="usb" index="0" model="ich9-uhci3"> <master startport="4"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x1d" function="0x2"/> </controller> <controller type="sata" index="0"> <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/> </controller> <controller type="pci" index="0" model="pcie-root"/> <controller type="pci" index="1" model="pcie-root-port"> <model name="pcie-root-port"/> <target chassis="1" port="0x10"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/> </controller> <controller type="pci" index="2" model="pcie-to-pci-bridge"> <model name="pcie-pci-bridge"/> <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/> </controller> <controller type="pci" index="3" model="pcie-root-port"> <model name="pcie-root-port"/> <target chassis="3" port="0x11"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/> </controller> <controller type="pci" index="4" model="pcie-root-port"> <model name="pcie-root-port"/> <target chassis="4" port="0x12"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/> </controller> <controller type="pci" index="5" model="pcie-root-port"> <model name="pcie-root-port"/> <target chassis="5" port="0x13"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/> </controller> <controller type="pci" index="6" model="pcie-root-port"> <model name="pcie-root-port"/> <target chassis="6" port="0x14"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/> </controller> <controller type="fdc" index="0"/> <controller type="virtio-serial" index="0"> <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/> </controller> <serial type="pty"> <target type="isa-serial" port="0"> <model name="isa-serial"/> </target> </serial> <console type="pty"> <target type="serial" port="0"/> </console> <channel type="spicevmc"> <target type="virtio" name="com.redhat.spice.0"/> <address type="virtio-serial" controller="0" bus="0" port="1"/> </channel> <input type="tablet" bus="usb"> <address type="usb" bus="0" port="1"/> </input> <input type="mouse" bus="ps2"/> <input type="keyboard" bus="ps2"/> <graphics type="spice" autoport="yes"> <listen type="address"/> <image compression="off"/> </graphics> <sound model="ich6"> <address type="pci" domain="0x0000" bus="0x02" slot="0x01" function="0x0"/> </sound> <audio id="1" type="spice"/> <video> <model type="vga" vram="16384" heads="1" primary="yes"/> <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/> </video> <watchdog model="itco" action="reset"/> <memballoon model="virtio"> <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/> </memballoon> </devices> <qemu:commandline> <qemu:arg value="-global"/> <qemu:arg value="q35-pcihost.x-pci-hole64-fix=false"/> </qemu:commandline> </domain>
I am fairly new to this, but I just want to understand what the difference is between the working command and my attempt to replicate it in virt-manager. Maybe there are different default values in the command coming into play that are of significance here? What is the difference between the command and XML file which might cause this problem? I appreciate every expertise in that matter.
Thank you in advance!
Source: r/qemu_kvm · by /u/X–X–X