Jump to content

Qemu Howto


devries
 Share

Recommended Posts

Since most of the computers on this world run on Windows it sometimes happens you want to accomplish a task that can not be handled by Linux simply because the tools that you need were written for MS Windows. Wouldn't it be great then to have a version of Windows running on Mandriva on which we can install the application we need? Well the time has arrived that this is possible (actually it has been possible for quite some time but you had to fork out a few 100 Euros) with an emulation program called Qemu.

 

-1- Installing Qemu is easy. Type as root: urpmi qemu :). There is an acceleration module called kqemu that allows you to run PC on PC emulation at near native speed. Install it with: urpmi kqemu. Check if a device called /dev/kqemu gets created. If not unload the module (modprobe -r kqemu) and type:

 

/bin/mknod /dev/kqemu c 250 0
/bin/chmod 666 /dev/kqemu
/sbin/modprobe kqemu

 

-2- Now we need to crate a virtual hard drive (an img file) on which to install Windows. This can be done in different ways. The one I used is (as normal user type):

 

dd of=hd.img bs=1024 seek=2000000 count=0

.

 

It will create a file called hd.img that is 2Gb large. More then enough space to install Windows. For other ways read the Qemu documentation.

 

-3- Pop in you Windows install CD and type (in the folder in which the hd.img file is, as normal user):

 

qemu -boot d -cdrom /dev/hdX  -hda hd.img

(where X is the letter of the CDRom drive)

.

 

Windows will now install. Just follow the instructions.

 

-4- After the installation start Windows with:

 

qemu -m 256 -enable-audio hd.img

 

The -m option defines the RAM size (default is 128) and -enable-audio enables audio (default is audio off). For more options read the Qemu documentation on their website (link above).

 

Don't forget to run the Windows hardware wizzard to install the drivers for the (virtual) soundcard.

 

-5- You now have a Windows system that looks like this:

 

i440FX host PCI bridge and PIIX3 PCI to ISA bridge

Cirrus CLGD 5446 PCI VGA card or dummy VGA card with Bochs VESA extensions (hardware level, including all non standard modes).

PS/2 mouse and keyboard

2 PCI IDE interfaces with hard disk and CD-ROM support

Floppy disk

NE2000 PCI network adapters

Serial ports

Soundblaster 16 card

 

and see ofcourse the screenshots below.

 

Have fun using Windows (if you can :D )

 

p.png

 

p.jpeg

 

p.jpeg

 

p.png

 

p.png

Link to comment
Share on other sites

  • Replies 37
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • 3 weeks later...
Guest Gerald_S

So far, so good

BUT:

 

I can't run it with acceleration. Following your Guide, i got this message:

 

[root@dhcppc1 geri]# modprobe -r kqemu

[root@dhcppc1 geri]# /bin/mknod /dev/kqemu c 250 0

[root@dhcppc1 geri]# /bin/chmod 666 /dev/kqemu

[root@dhcppc1 geri]# /sbin/modprobe kqemu

FATAL: Error inserting kqemu (/lib/modules/2.6.11-6mdk/misc/kqemu.ko): Invalid module format

 

Whats wrong?

Link to comment
Share on other sites

Reboot and check if kqemu gets loaded. (open a console, login as root and type: lsmod | grep kqemu). If it is check for /dev/kqemu etcetc. If not there is something wrong with the module. Most likely your kernel and kernel-source don't match. Make sure they do, uninstall kqemu and try again.

Link to comment
Share on other sites

The biggest difference is that Qemu doesn't need a special kernel. The normal Manriva stock kernel works fine. The combination qemu and kqemu works the same as vmware. PC on PC emeulation runs at near native speed. Note that default ram is only 128 RAM so expect windows xp to boot slowly and apps to start slow. They run fine though.

Link to comment
Share on other sites

Win4lin Pro needs kqemu to be usable with winxp; otherwise it runs way slow. And there's a lot of complaining on their boards about the poor performance of winxp even with kqemu. Check out their forums here:

 

http://www.win4lin.com/phpBB2/viewforum.ph...b8cda795527a7c9

 

Given my experience with win4lin pro and kqemu, I would be shocked if winxp could be run at native speeds in kqemu alone. The combo of win4lin pro and kqemu gives you about half speed performance. That's just my rough estimate; I haven't done any tests, per se. And it's not just a limited ram thing either. Win4lin pro allows you to set aside more ram than the default 128MB; even at 512MB the system is way slower than native though things run faster than with 128MB. I don't have win2000 but that is supposed to run much better from what I hear.

 

By the way, I got win4lin pro for $79 on a special promo and they even threw in a years subscription to some linux magazine with it. If you decice to buy it, I think you should realize what you're getting. This thing is still under heavy development IMHO and really shouldn't have been released as their "flagship product". It's an interesting project and will undoubtedly get better as time goes by but I think it's still very much beta software. The good news is the updates have been coming pretty fast and are free to current owners, at least for the time being. Unfortunately, win4lin pro can't hold a candle to their prior product, win4lin, which runs win9x and winme at near native speeds. But with that product you needed a kernel patch which was a hassle. I think a lot of people expected the same kind of performance out of win4lin pro and that's simply not the case, thus the angry disappointment.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

I have qemu, I just read above that devries used kqemu to use later to make things run faster.

 

Am currently installing with qemu now to see what it's like, versus other emulators such as VMware.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...