I get notes every now and then about people not being able to use Qemu. Â While Qemu is great, cross platform, and free it can be a little crazy to use, esp to people who are scared of the command line.
But rest assured it really isn’t that bad, once when you see the order of its seeming chaos.
Take this string for example:
C:\qemu\NTwalk>..\qemu-1.0.1\qemu-system-i386.exe -L ..\qemu-1.0.1\pc-bios -m 64
-cpu pentium -drive file=nt31disk,if=ide,index=0,media=disk,cache=writeback -ne
t nic,model=pcnet -net user -cdrom “Windows NT 3.1,Â Win32 SDK.iso” -fda “\temp\extensions.img” -soundhw sb16,adlib
Lets break it down as follows:
First I specify the Qemu emulator I’m going to use. Â I’m using the i386 one here, and as you can see, I’m running this from a different directory than where I’m working with disk images.
Next is where I tell Qemu where it can find the needed BIOS files. Â I think there is some global install path, but I tend to run all kinds of versions of Qemu all at once so this will *not* work for me, and it is just easier to tell it where to find them.
I’ve set my VM to a maximum of sixty four megabytes of RAM. Â The default is 128MB, but Â sometimes you want less, as some OS’s can’t use more than 8/16/64 anyways and they may have issues finding RAM where they aren’t expecting it.
Most OS’s will run and boot on a modern CPU, this includes MS-DOS 3.30 which I have booted via a USB floppy controller on my 8core AMD processor. Â However some OS’s fell into the trap of how to identify the processor, and configure themselves accordingly. Â All was well until the Pentium 4, Itanium, and the CORE CPU’s came intoÂ existence.
Â -drive file=nt31disk,if=ide,index=0,media=disk,cache=writeback
With a lot of experimentation I’ve found that this combination works best for qcow2 disk images. Â While a lot more complicated than “-hda nt31disk” it does perform significantly quicker. Â Another ‘tip’ I like is that you can have Qemu mount a directory (as long as it is under 500MB) and it’ll create a virtual FAT-16 formatted disk. Â The flags are [ -hdb fat:<path> ] Â this is a great way to copy in things like device drivers, and even programs. Â However this disk is read only, so you cannot copy data out.
-net nic,model=pcnet -net user
This enables the AMD PCNet PCI network card, and sets it to User mode NAT. Â I like the AMD card as it has really good support. Â With that in mind, Qemu supports the following models:
I’ve never really messed with the tun/tap stuff as you can only have one host on it, so its kind of useless to me. Â With the usermode NAT the VM should be configured the following way if it doesn’t support DHCP:
If you have DNS issues, you may want to try a DNS server that you are using on your physical computer, or perhaps 22.214.171.124/126.96.36.199 . Also you will *NOT* be able to ping outside of the VM, but you *CAN* ping the gateway, 10.0.2.2 .
-cdrom “Windows NT 3.1,Â Win32 SDK.iso”
Just as it appears, this adds an ISO image into the VM which is typically located on the second IDE interface, on the primary port. To force the VM to boot from CD, add the flag ‘-boot d’ and the BIOS will attempt to boot from the CD-ROM.
And like the CD-ROM, this is for the floppy disk. Â Sizes can be 360k, 720k, 1.2M and 1.4M. If you wish to boot from the floppy disk you simply add the flag ‘-boot a’ Â Older floppies will not contain a bootÂ check sum, so to force them to boot, you’ll need the additional flag ‘-no-fd-bootchk’ to ignore theÂ check sumÂ that later diskettes used. Â In my above example I’m just using a disk image, not booting from it.
And finally I’m enabling both the SoundBlaster 16 & Adlib emulation. Â By default in the builds of Qemu the adlib is turned off, but I just turn it back on when I build Qemu. Â Other sound cards include the recent HDA & AC97 chipsets.
Remember the Sound Blaster is configured for an IO base of 0Ã—220, IRQ 5, DMA 1 and High DMA 5.
I hope this gives some insight to users on how toÂ effectivelyÂ use QEMU.
isn’t win32 slirp networking is broken since 1.0?
I have to keep 0.15.1 for the networking.
I’ve just noticed this… I only used 1.0 for non networking things…!
I even went as far to build my own Glib on Windows but now I think I’ve hopelessly broken my build environment 🙁
By the way, which is the most stable version of qemu to run an ARM (versatile) guest from a win xp host? I’ve tried your latest build , this one:
but I’m having all sorts of errors and qemu crashed with a generic Microsoft error.
the 1.0 turned out to be horrible for windows with user mode networking being broken, along with some disk error stuff..
I’d probably stick with 0.15.1 …
That said I don’t know about ARM you may have to try them all…..