Raspberry pi 4b emulating Windows 2000

I will share the QML file here:

<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="qemu">
<name>win2k-x86_64</name>
<uuid>24828db7-6937-4da1-ab6b-317267af4156</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/2k"/>
</libosinfo:libosinfo>
</metadata>
<memory unit="KiB">524288</memory>
<currentMemory unit="KiB">524288</currentMemory>
<memoryBacking>
<hugepages/>
</memoryBacking>
<vcpu placement="static">1</vcpu>
<os>
<type arch="x86_64" machine="pc-i440fx-7.2">hvm</type>
</os>
<features>
<acpi/>
<apic/>
<hyperv mode="custom">
<relaxed state="on"/>
<vapic state="on"/>
<spinlocks state="on" retries="8191"/>
</hyperv>
<vmport state="off"/>
</features>
<cpu mode="custom" match="exact" check="none">
<model fallback="forbid">qemu64</model>
</cpu>
<clock offset="localtime">
<timer name="hpet" present="yes"/>
<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="yes"/>
</pm>
<devices>
<emulator>/usr/local/bin/qemu-system-x86_64</emulator>
<disk type="file" device="disk">
<driver name="qemu" type="raw"/>
<source file="/VMs/win2k.img"/>
<target dev="hda" bus="ide"/>
<boot order="2"/>
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
</disk>
<disk type="file" device="disk">
<driver name="qemu" type="raw"/>
<source file="/VMs/vol.img"/>
<target dev="hdc" bus="ide"/>
<address type="drive" controller="0" bus="1" target="0" unit="0"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"/>
<source file="/mnt/myusbdrive/softwares/win2000sp4_ZRMPSEL_CN_itmop.com.iso"/>
<target dev="hdd" bus="ide"/>
<readonly/>
<boot order="1"/>
<address type="drive" controller="0" bus="1" target="0" unit="1"/>
</disk>
<controller type="usb" index="0" model="ich9-ehci1">
<address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x7"/>
</controller>
<controller type="usb" index="0" model="ich9-uhci1">
<master startport="0"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x0" multifunction="on"/>
</controller>
<controller type="usb" index="0" model="ich9-uhci2">
<master startport="2"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x1"/>
</controller>
<controller type="usb" index="0" model="ich9-uhci3">
<master startport="4"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x05" function="0x2"/>
</controller>
<controller type="pci" index="0" model="pci-root"/>
<controller type="ide" index="0">
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x1"/>
</controller>
<interface type="network">
<mac address="52:54:00:e4:d4:ee"/>
<source network="default"/>
<model type="rtl8139"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0"/>
</interface>
<input type="mouse" bus="ps2"/>
<input type="keyboard" bus="ps2"/>
<input type="tablet" bus="usb">
<address type="usb" bus="0" port="1"/>
</input>
<graphics type="vnc" port="5902" autoport="no" listen="0.0.0.0">
<listen type="address" address="0.0.0.0"/>
</graphics>
<audio id="1" type="none"/>
<video>
<model type="cirrus" vram="16384" heads="1" primary="yes"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0"/>
</video>
<memballoon model="virtio">
<address type="pci" domain="0x0000" bus="0x00" slot="0x07" function="0x0"/>
</memballoon>
</devices>
<qemu:commandline>
<qemu:arg value="-L"/>
<qemu:arg value="/usr/share/qemu"/>
</qemu:commandline>
</domain>

Enable Hugepages to improve the performance of the Windows 2000 virtual machine:

vim /etc/sysctl.conf

vm.nr_hugepages = 512 ## this will use your 1GB memory.

sysctl -p

Then, add the block below to your xml file:

<memoryBacking>
<hugepages/>
</memoryBacking>

SCSI Driver and Virtio Network adapter: this link.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *