# How-To: Run WinXP in qemu virtual computer on AMD64

## piwacet

Hi.  Recently got this working so I thought I 'd go over what I did.  Goal was to install windows xp (the regular, 32-bit version) in a qemu virtual computer (native OS is Gentoo, 64-bit) with kqemu accelerator on my AMD64.  It's working fine.  Note the kqemu accelerator module is free but proprietary.  Also note that qemu was recently upgraded from 0.7 to 0.8 with a few changes.  I've updated this, but let me know if something's not working.

First, unmask relevant packages:

```
Nautilus magenta # cat /etc/portage/package.keywords

app-emulation/qemu ~amd64

app-emulation/qemu-softmmu ~amd64

app-emulation/qemu-user ~amd64
```

Next, add kqemu to your use flags.  I did this in /etc/make.conf as I can't imagine what other programs this would affect, but if you want to be purist:

```
Nautilus profile # cat /etc/portage/package.use

app-emulation/qemu kqemu

app-emulation/qemu-softmmu kqemu

app-emulation/qemu-user kqemu

```

I don't think all these apps need the use flag, but it won't hurt.

Next, 

```
emerge qemu
```

Now, we'll use qemu to install XP.  Note you can do this as a regular user with a few steps as root.  First, we will make a file which will serve as a virtual hard drive for the qemu program.  I made a directory for this file in my user's home directory, /home/magenta/qemu_windows, but you can do as you wish.

```
qemu-img create /path_to_virtual_hard_disk/winxp.img 5G

```

For instance, on my computer:

```
qemu-img create /home/magenta/qemu_windows/winxp.img 5G

```

You can change the size to what you think is suitable.  The file winxp.img will be the virtual hard disk.  (Duh).

The windows XP install takes a while, so before that, let's get kqemu running, to try to speed the process up as much as we can.  As root:

```
modprobe kqemu major=0
```

The major=0 is necessary or it won't work.  This will create a device /dev/kqemu.  I believe the device is owned by root and in the group 'qemu', so you should make sure the user which will use qemu is in the group 'qemu'.  (See Gentoo documentation on adding users to groups if you don't know how.)  As root:

```
gpasswd -a [your_user] qemu

```

And, before proceeding, as root, check to see kqemu is working:

```
Nautilus magenta # lsmod | grep kqemu

kqemu                  43656  0 
```

Now, we'll install XP.  Take your windows XP install disk and put it in your cdrom.  In order to use qemu on an AMD64 running 64 bit, with kqemu enabled, you must use the program qemu_system-x86_64.

```
qemu-system-x86_64 -localtime -hda /path_to_virtual_hard_disk/winxp.img -cdrom /dev/hdc -m 450 -boot d

```

This tells qemu that your virtual computer's cdrom is your actual hdc (usually /dev/hdc, also /dev/cdrom or something like that under udev, you may need to adjust this for your system); '-boot d' tells your virtual computer to boot from the cdrom; '-localtime' sets the virtual computer's clock to your system's clock; '-m 450' allocates 450 MB of memory to the virtual computer (you'll need to adjust this to your system).  '-hda' tells qemu the path to the virtual hard disk.

At this point a window should open and you should see the windows xp installation program start.  As this will take a long time, I recommend confirming that kqemu is working before continuing.  To do this, hit 'alt+cntrl+2'  This will get you a console in qemu.  Type 'info kqemu' in the console, and it should say 'kqemu is enabled.'  At this point, type 'quit' to exit qemu, and then re-issue:

```
qemu-system-x86_64 -localtime -hda /path_to_virtual_hard_disk/winxp.img -cdrom /dev/hdc -m 450 -boot d

```

to re-start the windows xp install process.  If kqemu is not enabled, it should still work, but will take longer.

Follow the windows install process as you normally would.  Your virtual computer should re-boot a few times.  If you ever reach a point where you would like to tell the virtual computer to boot from the virtual hard drive, just change '-boot d' to '-boot c' in the above command.

Helpful to know during this process:

1.) clicking you mouse over the virtual computer screen will bind your mouse and keyboard to the virtual computer;

2.) 'alt+cntrl' will unbind the mouse and keyboard

O.K.  That should get windows xp installed on your virtual hard-drive.  To actually use it, do the following:

1.) If kqemu module is not started, you must issue, as root:

```
modprobe kqemu major=0
```

2.) start the program (as user in the qemu group):

```
qemu-system-x86_64 -localtime -hda /path_to_virtual_hard_disk/winxp.img -m 450 -boot c

```

Again, '-localtime' sets the virtual computer's clock to your system's clock; '-hda' is the path to the virtual hard-drive; specifiying no network option causes qemu to set up a default network (which should work right out of the box); '-m 450' allots memory to your virtual computer (adjust as appropriate); '-boot c' tells the virtual computer to boot from the virtual hard drive.  If you have a cdrom in the cdrom drive which you want to use, you can also add '-cdrom /dev/hdc'.

Helpful to know:

1.) clicking you mouse over the virtual computer screen will bind your mouse and keyboard to the virtual computer;

2.) 'alt+cntrl' will unbind the mouse and keyboard

3.) in a reqular linux console, just typing 'qemu' will get you very usefull and succinct help summary.

The proper way to shut down the virutal computer is to shut down windows xp as you would normally, wait until the virutal computer screen says 'it is safe to shut off your computer now,' then get a qemu console by typing 'alt+cntrl+2', then typing 'quit.'  

As root,

```
modprobe -r kqemu
```

will remove the kqemu module.

I have a script which automates all of this.

Good luck.Last edited by piwacet on Sun Jan 29, 2006 10:02 pm; edited 4 times in total

----------

## adrianeczek

thanks, it works... so... why kqemu use flag is masked?

----------

## z0mb13

Thanks piwacet for your howto!

PROBLEM:

"info kqemu" reported disbaled even with module loaded and /dev/kqemu in place (running as normal user).

SOLUTION:

As root, edit /etc/udev/rules.d/48-qemu.rules and change the MODE 0660 to 0666 as follows...

```

KERNEL="kqemu*",           NAME="%k", GROUP="qemu", MODE="0660"

```

to

```

KERNEL="kqemu*",           NAME="%k", GROUP="qemu", MODE="0666"

```

Even though I'm using 2.6 kernel I had to  issue this command as root to get it working...

```

# echo 1024 > /proc/sys/dev/rtc/max-user-freq

```

Now you should be working a little faster  :Razz: 

NOTE:

I have not rebooted yet so I don't know if these udev changes will persist.

I have not thought about any security implications.

----------

## piwacet

So I'm not a linux guru, if other people have thoughts, please chime in.

As to needing to unmask the kqemu USE flag, I'm not sure why, but it may have something to do with the fact that the only program which could use this USE flag is still masked.

About the kqemu being disabled, thanks z0mb13 for the suggestion.  I haven't tried it myself as kqemu is working on my computer.  I can tell you two instances where I did have difficulty getting kqemu working:  first, if I issue the command "modprobe kqemu" without the 'major=0', and realized my mistake, and re-issued 'modprobe kqemu major=0.'  This would not work as the kqemu module was already loaded without 'major=0'.  So I would need to first remove the kqemu module and then issue 'modprobe kqemu major=0.'  The second instance where kqemu sometimes would not work is when I use a script which loads the kqemu module and then runs qemu:

```
sudo /sbin/modprobe kqemu major=0

qemu-system-x86_64 -localtime -user-net -hda /home/magenta/qemu_windows/winxp.img -m 450 -boot c

```

I've tested this extensively and it seemed random when it would enable kqemu and when it would appear as disabled despite lsmod showing it was loaded.  I don't know why this happens, and if I issue these commands manually it always runs successfully with kqemu enabled.  One hypothesis I had was that it just takes a short amount of time to load the kqemu module and set up the /dev/kqemu, and perhaps the script was executing too fast, and qemu-system-x86_64 was loaded and running before kqemu had properly set up.  Anyway, I modified my script with redundant modprobes, figuring it would not hurt, and may ensure that kqemu was set up properly before qemu ran:  

```
sudo /sbin/modprobe kqemu major=0

sudo /sbin/modprobe kqemu major=0

sudo /sbin/modprobe kqemu major=0

qemu-system-x86_64 -localtime -user-net -hda /home/magenta/qemu_windows/winxp.img -m 450 -boot c

```

Using this script qemu always runs with kqemu enabled.

As to the max-user-frequency, I haven't tried that, and I'm not sure what it's significance would be as I don't know what it does.  What's your experience with it?

Thanks!

----------

## adrianeczek

I'm now sure what to do with this frequency thing and why we have this problem using kernel 2.6. Guest clock is going faster than host clock and maybe that's the reason.

z0mb13, are your clocks synchronized after several hours of running qemu?

----------

## z0mb13

I have just rebooted and kqemu is woking fine now with max-user-freq at it's default of 64.

The reason I used the max-user-freq thing at all is that qemu would initially not start when kqemu was enabled and part of the error message was to try that command "or use a 2.6 kernel".

Even though I'm on a 2.6 kernel I tried it and it worked. So unless you get an error message telling you to try max-user-freq=1024 - don't use it.

I have not run qemu long enough to see any noticeable difference in clocks.

----------

## adrianeczek

This message is a warning (at least on my system) so qemu works.

----------

## piwacet

This is the warning message I get with my max-user-freqency at default (64):

```
Could not configure '/dev/rtc' to have a 1024 Hz timer. This is not a fatal

error, but for better emulation accuracy either use a 2.6 host Linux kernel or

type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root.

```

Since I already use a 2.6 kernel, I assumed this message was not important, I didn't make any changes to the max-user-freqency, and qemu is working fine.  Although I have not watched for clock drift on the virtual machine, so I'll keep an eye out for that.

z0mb13, does qemu work now without editing the udev rules, or do you still nee that modification?  On my computer:

```
Nautilus rules.d # cat 48-qemu.rules

KERNEL="kqemu*",           NAME="%k", GROUP="qemu", MODE="0660"
```

And it works fine.  Changing the MODE value, as you have done, would change the permisions for the module.  Just a thought, is your user in the qemu group?  If not, that may be why you needed to change the device permission.

----------

## Sheepdogj15

hmm...

how is the performance? i presume you need a good amount of RAM (say a half gig or more)? 

right now i use Remote Desktop, which works fine enough, but has enough inconveniences that i'm still interested in the emulation route.

----------

## z0mb13

 *piwacet wrote:*   

> 
> 
> z0mb13, does qemu work now without editing the udev rules, or do you still nee that modification?  On my computer:
> 
> ```
> ...

 

Yes, my user is in the qemu group. I changed back to 0660 mode and it still works. So it seems that was only needed before I did a reboot.

Must have been a permissions error on my part   :Embarassed:  I added the user to qemu group but it seems I did not relogin to console for the change to take effect.

Sorry for for any confusion created.

----------

## blackwhite

 *Quote:*   

> Nautilus profile # cat /etc/portage/package.use
> 
> app-emulation/qemu kqemu
> 
> app-emulation/qemu-softmmu kqemu
> ...

 

In my gentoo box , app-emulation/qemu-softmmu has kqemu use flag, others does not have kqemu use flag

About this problem:

 *Quote:*   

> Could not configure '/dev/rtc' to have a 1024 Hz timer. This is not a fatal
> 
> error, but for better emulation accuracy either use a 2.6 host Linux kernel or
> 
> type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root. 

 

In the kernel, using the following choice for Timer frequency, this will fix this problem.

 *Quote:*   

>   │ CONFIG_HZ_1000:                                                         │
> 
>   │                                                                         │
> 
>   │ 1000 HZ is the preferred choice for desktop systems and other           │
> ...

 

----------

## shirozaru

has anyone tried to use the x86_64 windows version in this scenario? i am curious to know how it might work. i will look in to it and report back.

----------

## jamiethehutt

 *z0mb13 wrote:*   

> Thanks piwacet for your howto!
> 
> PROBLEM:
> 
> "info kqemu" reported disbaled even with module loaded and /dev/kqemu in place (running as normal user).
> ...

 

"gpasswd -a <your user> qemu" would also do the trick.   :Wink: 

----------

## rickvernam

When I run as user who is part of qemu group, I keep getting:

```
qemu: could not open hard disk image '/dev/cdrom'
```

I don't understand why b/c /dev/cdrom has 

```
rick@ricklap ~/qemu $ stat /dev/cdrom

  File: `/dev/cdrom' -> `hdc'

  Size: 3               Blocks: 0          IO Block: 4096   symbolic link

Device: eh/14d  Inode: 2708        Links: 1

Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)

Access: 2005-12-16 14:46:33.000000000 -0600

Modify: 2005-12-16 14:12:45.496656000 -0600

Change: 2005-12-16 14:12:45.496656000 -0600
```

and I tried setting /dev/cdrom to group qemu, too...but that didn't help at all.

No problems at all when run as root.

whats the deal here?

Thanks...

----------

## rickvernam

 *rickvernam wrote:*   

> When I run as user who is part of qemu group, I keep getting:
> 
> ```
> qemu: could not open hard disk image '/dev/cdrom'
> ```
> ...

 

okay, figured it out   :Embarassed: 

/dev/cdrom is link to /dev/hdc.  /dev/hdc is 

```
Access: (0660/brw-rw----)  Uid: (    0/    root)   Gid: (   19/   cdrom)
```

So, i just added my user to the cdrom group...

Haven't tested yet..but there is no reason why this solution should not work...

----------

## Pizentios

great guide, worked right off the hop for me  :Smile: 

----------

## kinkozmasta

I've tried with WinXP x86_64 but it complains that the operating system I am trying to install does not have APIC enabled and to check the system's firmware...

Anybody know anything about this?

----------

## boldaire

Hello,

Thanks for this very nice howto; I used it on a (32-bit) Dell Latitude x1 and it works quite well   :Very Happy: 

I have some questions about the kqemu module:

1/ isn't there a way to lauch it at boot?

2/

 *Quote:*   

> The proper way to shut down the virutal computer is to shut down windows xp as you would normally, wait until the virutal computer screen says 'it is safe to shut off your computer now,' then get a qemu console by typing 'alt+cntrl+2', then typing 'quit.'
> 
> As root,
> 
> Code:
> ...

 

Any special reason for removing kqemu?

cheers,

----------

## piwacet

I do not see the harm of having kqemu loaded all the time, so if you do not want to remove it after you shut off qemu, I don't see a problem with this.

Simillarly, I don't see the harm of loading kqemu at boot.

I guess to load kqemu at boot you would (I have not tested this):

edit /etc/modules.autoload.d/kernel-2.6 and add a line 

```
kqemu
```

to it.  Then run

```
modules-update
```

(both must be done as root.)  Then it should automatically load at boot.  Again, I have not tested this.

Good luck.

----------

## slycordinator

 *piwacet wrote:*   

> so you should make sure the user which will use qemu is in the group 'qemu'.  (See Gentoo documentation on adding users to groups if you don't know how.)  As root:
> 
> ```
> usermod -G qemu,[plus all the other groups your user should be a member of] [your_user]
> 
> ...

 

A much simpler way (as it doesn't require you memorizing every group you already are a member of) is to do:

```
gpasswd -a [your_user] qemu
```

edit:

Fixed my code

----------

## piwacet

Thanks, slycordinator, I changed the how-to with your suggestion.

----------

## Sheepdogj15

 *kinkozmasta wrote:*   

> I've tried with WinXP x86_64 but it complains that the operating system I am trying to install does not have APIC enabled and to check the system's firmware...
> 
> Anybody know anything about this?

 

oh i had this problem when i tried to install 64bit XP a long time back. i don't remember the cause, but i had to change a BIOS setting. i doubt that would work here, except perhaps as a setting in qemu   :Confused: 

----------

## Sheepdogj15

also i recommend unmasking packages by version number. that way if e.g. 0.8.1 comes out masked as ~amd64 and it's buggy, it won't be installed when you update world. 

```
~app-emulation/qemu-0.8.0 ~amd64

~app-emulation/qemu-softmmu-0.8.0 ~amd64 

~app-emulation/qemu-user-0.8.0 ~amd64
```

qemu-softmmu is actually marked as stable, be we can keep it in there just in case (there are rare cases where a package gets remasked as testing or unstable).

----------

## Sheepdogj15

a couple of other points, since i'm up late monkeying with qemu. i'm feeling generous  :Smile: 

 *piwacet wrote:*   

> I guess to load kqemu at boot you would (I have not tested this):
> 
> edit /etc/modules.autoload.d/kernel-2.6 and add a line 
> 
> ```
> ...

 

i thought the "major=0" was required. i don't know if you can put that option in kernel-2.6. but alternatively you can put the command into /etc/conf.d/local.start:

```
modprobe kqemu major=0
```

this will cause the command to be run towards the end of boot time.

and i don't think it's necessary, but the command to remove the module can be put in local.stop.

also, the "sdl" USE flag is required for qemu... otherwise you never get a window. i found out the hard way.   :Evil or Very Mad:   i think "sdl" is in the default USE flags, so most people probably have it already. "emerge --info" will say what flags you have.

someone mentioned a problem with XP 64bit and APIC. i'm actually thinking using that edition of XP myself... i happened to find this page through googling: http://www.h7.dion.ne.jp/~qemu-win/

scroll down and there is a hack or something that should fix the problem. i haven't tried it out yet and to be honest i'm not sure how to use it. if i do play with it i'll report back here later.

----------

## rickvernam

 *Sheepdogj15 wrote:*   

> 
> 
> i thought the "major=0" was required. i don't know if you can put that option in kernel-2.6. but alternatively you can put the command into /etc/conf.d/local.start:
> 
> ```
> ...

 

You can have 'kqemu major=0' in kernel-2.6...it works fine.  using it in my setup right now.

----------

## Marlo

There's no harm if you know few about the german language: looking here to some pieces of  advice  with Qemu and WinXP.

----------

## Sheepdogj15

ok, cool

----------

## Martyr

I got these bug. Google didn't answer on it.  :Sad: 

```
martyr@arillan ~ $ qemu-system-x86_64 -hda /home/martyr/qemu_windows/winxp.img -cdrom /dev/hdc -m 256 -boot d 

Could not configure '/dev/rtc' to have a 1024 Hz timer. This is not a fatal

error, but for better emulation accuracy either use a 2.6 host Linux kernel or

type 'echo 1024 > /proc/sys/dev/rtc/max-user-freq' as root.

BIOS panic at rombios.c, line 8299

martyr@arillan ~ $ 

```

----------

## Martyr

 *Martyr wrote:*   

> I got these bug. Google didn't answer on it. 
> 
> ```
> martyr@arillan ~ $ qemu-system-x86_64 -hda /home/martyr/qemu_windows/winxp.img -cdrom /dev/hdc -m 256 -boot d 
> 
> ...

 

I try to execute qemu-system-ppc and qemu-system-sparc. It works!

----------

## Sheepdogj15

that's probably not a good idea if you are using AMD64. then again, it may not be a bad thing either. 

you just have to do what it says. switch to root and then enter in: 

```
echo 1024 > /proc/sys/dev/rtc/max-user-freq
```

then try again. 

if it works, then add this to /etc/sysctl.conf: 

```
dev.rtc.max-user-freq = 1024
```

----------

## zietbukuel

Anyone knows hot to use the CD while using qemu? i cant access the cd device in My PC (windoze) thanks.

----------

## Marlo

Cange into the Qemu-console:

```

<Strg><< Alt>> <<2>>

CDRom mounten write:# change cdrom /dev/hdx # i.e. "hdb"

CDRom ejecten write:# eject cdrom

```

Ma

----------

## qeldroma

I have problems configuring the network, how do i do this correctly?

In the moment, my pc(linux) has the ip 192.168.20.10 and the WinXP (qemu) has got 192.168.20.11 initialized and is able to ping my host (...20.10) correctly.

What do i have to do now to give the WinXP-client access to the internet? Of course gateway and DNS is setup correctly, but the client can't ping anything than the host (..20.10), every other IP doesn't get pinged....?

Florian

----------

## bravecobra

http://blog.bravecobra.com/index.php/linux/2005/02/25/emulating_an_os_with_qemu

----------

## stelinux

Anyone know how can I boot winxp from rescue partition on notebook (its on /dev/hda3) under qemu? I try the suggested syntax changing "-cdrom /dev/hdc" with "-hda /dev/hda3" and "boot -d" in "-boot -c" but qemu say:"No boot disk" even if /dev/hda3 contains io.sys, msdos.sys and command.com.

Please, help me  :Shocked: 

----------

## Marlo

I was not ever in this situation but if you use your WinXP-Disc in your cdrom it`s make the same.

Like a newinstall but with the rescuesystem?

Ma

----------

## stjepan

  Last edited by stjepan on Tue Sep 20, 2022 10:01 pm; edited 1 time in total

----------

## batjohan

 *stjepan wrote:*   

> One stupid question please.
> 
> Today it isnt possible to buy windows 98. If I want windows 98, I must get a pirated one. What do you think? May I get pirated one? Is windows 98 free? 

 

windows 98 is _not_ free.

buy windows 98 on ebay   :Wink: 

----------

## zietbukuel

 *batjohan wrote:*   

>  *stjepan wrote:*   One stupid question please.
> 
> Today it isnt possible to buy windows 98. If I want windows 98, I must get a pirated one. What do you think? May I get pirated one? Is windows 98 free?  
> 
> windows 98 is _not_ free.
> ...

 

Naaahh It's not worth paying for that crap...   :Laughing: 

----------

## batjohan

 *zietbukuel wrote:*   

>  *batjohan wrote:*    *stjepan wrote:*   One stupid question please.
> 
> Today it isnt possible to buy windows 98. If I want windows 98, I must get a pirated one. What do you think? May I get pirated one? Is windows 98 free?  
> 
> windows 98 is _not_ free.
> ...

 

Win98 is not crap.. Win ME IS CRAP..  but  WinNT 4.0 is teh best  :Wink: 

----------

## zxy

I tried to use kqemu but there are no use flags for it on my box.

```
localhost kdeqemu # emerge qemu kqemu -av

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] app-emulation/qemu-0.8.2  0 kB

[ebuild   R   ] app-emulation/kqemu-1.3.0_pre9  0 kB

Total size of downloads: 0 kB

Would you like to merge these packages? [Yes/No]   
```

No use flags at all?   :Sad: 

I'm running amd64

----------

## zietbukuel

 *zxy wrote:*   

> I tried to use kqemu but there are no use flags for it on my box.
> 
> ```
> localhost kdeqemu # emerge qemu kqemu -av
> 
> ...

 

If there's no use flags doens't matter just emerge them.

----------

## zxy

I just did emerge --sync. Use flags appeared for 

```
qemu-softmmu-0.8.2-r1 USE="alsa kqemu sdl"
```

. 

Others have no use flags. 

Recompiling from scratch (all of them) and selected gcc3 compiler (it wants it) 

kqemu i had to compile with gcc4 otherwise I couldn't load the module.

kqemu module loaded.   <--- I checked with lsmod

BUT, when I press ctrl-alt-2 and enter 

```
info kqemu
```

 it says 

```
kqemu support: not compiled
```

So module is loaded, but what does this not compiled mean???

----------

## rocketship

Just curious - could I use kqemu with an existing Windows XP installation?  I've got a dual-boot configuration, and I'd like to use kqemu to avoid rebooting (for one or two pieces of software).  I have the NTFS partition mounted for convenience now - could kqemu just open that partition up?

RS

----------

## infogerance

 *blackwhite wrote:*   

> 
> 
> About this problem:
> 
>  *Quote:*   
> ...

 

Did you really solve anything with this? Mine is set to 1000Hz, on a 2.6.18 amd64 kernel, but the warning is displayed yet.

If I manually echo '1024', the warning doesnt appear.

Any other idea?

----------

## odegard

 *rocketship wrote:*   

> Just curious - could I use kqemu with an existing Windows XP installation?  I've got a dual-boot configuration, and I'd like to use kqemu to avoid rebooting (for one or two pieces of software).  I have the NTFS partition mounted for convenience now - could kqemu just open that partition up?
> 
> RS

 

Now that would be interesting!

----------

## bradbeglin

yes, you can use Qemu to save you from rebooting.  It is covered in Qemu documentation.

----------

## Centinul

Will this work in regular 32bit x86 Gentoo? If so what kind of performance hit is taken by running Windows applications in qemu? Are games playable? Thanks.

----------

## bradbeglin

Um, everything works fine in 32bit x86 gentoo (that is what I am running).  I personally do not find much of a performance hit if you have kqemu running.  I think official qemu says that it is supposed to be like %5 or so, but I can not tell that much a difference (pretty much native), in fact I only run Windows in qemu now, to save on disk space and such.  As far as games, they should run just the same as they do on Windows, but right now the graphics card virtualization in Qemu is really basic, so all you are going to get is SDL output for now.  If you want to play games, VMWare has experiment 3D acceleration support, but from what I tried, it is rather buggy.  I know from the Qemu forms that the developers are open to adding 3D acceleration in the future, but it is rather hard, so it will not be something that is imminent by any means.

----------

## slycordinator

 *zxy wrote:*   

> I just did emerge --sync. Use flags appeared for 
> 
> ```
> qemu-softmmu-0.8.2-r1 USE="alsa kqemu sdl"
> ```
> ...

 

Did you build qemu-softmmu with USE="kqemu" or not? The "support: not compiled" could just mean that qemu wasn't compiled to include support for it.

----------

## reteo

 *zxy wrote:*   

> I just did emerge --sync. Use flags appeared for 
> 
> ```
> qemu-softmmu-0.8.2-r1 USE="alsa kqemu sdl"
> ```
> ...

 

Are you running the AMD64-Specific binary of qemu, or the generic qemu?  I found that if you run the AMD64 version of the QEMU binary, the support will be compiled in, because the kqemu module is compiled specifically for the 64-bit version.

Since I'm not at home right now, I am unable to remember the exact binary name, but try typing qemu[tab][tab] and see what appears.

[edit]: The name of the binary is `qemu-system-x86_64` [/edit]

----------

## upengan78

Hi

I have created 5 G .img already and installing windows 2003 server but after typical network settings screen, it shows transferring files and suddenly BSD.

This is the error

 *Quote:*   

> 
> 
> http://img219.imageshack.us/img219/701/screenshotqemupj5.jpg

 

I did this before starting installation,

```
qemu-img create /nfs/win2003.img 5G

qemu-system-x86_64  -localtime -hda /nfs/win2003.img -cdrom /dev/cdrom -m 512 -kernel-kqemu -boot d
```

 *Quote:*   

> lsmod
> 
> Module                  Size  Used by
> 
> kqemu                 163368  0 
> ...

 

I have windows 2003 Server CD in cdrom-drive and my machine is intel core2 duo with 2 GB ram.

Can some one throw some light , what this error indicate ?

----------

## beep

Hi,

I encounter the same issue here, 

```
app-emulation/qemu-softmmu-0.9.1-r1  USE="alsa gnutls kqemu sdl" 0 kB 
```

```
snow200 ~ #qemu-system-x86_64 -kernel-kqemu

qemu-system-x86_64: invalid option -- '-kernel-kqemu'

```

And with the regular qemu

```
snow200 ~ #qemu -h

QEMU PC emulator version 0.9.1, Copyright (c) 2003-2008 Fabrice Bellard

...

...

...

-kernel-kqemu   enable KQEMU full virtualization (default is user mode only)

...

...

```

->upengan78

How did you got -kernel-kqemu with qemu-system-x86_64?

Thanks,

::Beppe

----------

## upengan78

 *Quote:*   

>  # eix qemu
> 
> [I] app-emulation/kqemu
> 
>      Available versions:  0.7.2 ~1.3.0_pre5 ~1.3.0_pre7 1.3.0_pre9 1.3.0_pre11 {kernel_linux sdl}
> ...

 

I am now using kvm instead of qemu to install and run windows2003std edition

Already enabled kvm in kernel, then emerge kvm (see following swiches)

eix kvm 

 *Quote:*   

> [I] app-emulation/kvm [1]
> 
>      Available versions:  41 (~)43 (~)44 (~)45 (~)45-r1 (~)46 (~)47 (~)48 (~)50 (~)51 (~)52 (~)53 (~)53-r1 (~)54 (~)54-r1 (~)54-r2 (~)54-r3 (~)55 (~)55-r1 (~)55-r2 (~)55-r3 (~)56 (~)56-r1 (~)57 (~)58 (~)59 (~)59-r1 (~)60 -61 (~)62 (~)63!m {alsa bios gcc4 gnutls kvm qemu sdl test}
> 
>      Installed versions:  63!m(11:27:09 03/14/0(alsa kernel_linux qemu sdl -bios -gcc4 -gnutls -kvm -test)
> ...

 

 *Quote:*   

> modprobe kvm-intel

 

FOR INSTALLATION :

 *Quote:*   

> kvm --no-tap windows.img --install --cdrom /dev/cdrom

 

FOR RUNNING INSTALLED WINDOWS:

 *Quote:*   

> kvm -cpu qemu64 -no-acpi -localtime -hda /nfs/win2k3.img -m 512 -boot c

 

I am using dhcp and I could update windows2003 with service pack2.

 *Quote:*   

> http://gentoo-wiki.com/Kvm

  helped

Thanks

----------

## machinelou

I haven't tried kvm because my processor doesn't support it.  How does using it compare to running windows native?

----------

