# HOWTO: build qemu from cvs (incl. accelerator)

## notz

goto to your portage overlay

```
cd /usr/local/portage
```

download & extract the ebuild

```
wget ftp://notz.homelinux.com/qemu-cvs.tar.gz

tar -xzf qemu-cvs.tar.gz
```

add arch keyword to package.keywords i.e. ~x86

```
echo "=app-emulation/qemu-cvs-0.0.1 ~x86" >> /etc/portage/package.keywords
```

for accelerator add kqemu use flag

```
echo "app-emulation/qemu-cvs kqemu" >> /etc/portage/package.use
```

emerge qemu

```
emerge qemu-cvs
```

load kqemu (accelerator module)

```
/etc/init.d/kqemu start
```

to load the accelerator module on startup

```
rc-update add kqemu default
```

start qemu as usual

```
qemu -hda hd.img -boot c
```

enjoy it and feel free to add your coments, hints and tips.

changelog:

2005-03-14: fixed runscript for udev only users (thx to pussi)Last edited by notz on Mon Mar 14, 2005 2:50 pm; edited 1 time in total

----------

## AlterEgo

```

wget ftp://notz.homelinux.com/qemu-cvs.tar.gz

--22:24:09--  ftp://notz.homelinux.com/qemu-cvs.tar.gz

           => `qemu-cvs.tar.gz'

Resolving notz.homelinux.com... 62.99.150.84

Connecting to notz.homelinux.com[62.99.150.84]:21... connected.

Logging in as anonymous ... Logged in!

==> SYST ... done.    ==> PWD ... done.

==> TYPE I ... done.  ==> CWD not needed.

==> PORT ... done.    ==> RETR qemu-cvs.tar.gz ...

Error in server response, closing control connection.

Retrying.

```

Fetching the file manually does work  :Question: 

But the rest: excellent work, thanks!

----------

## watashiwaotaku7

When using qemu, trying to install windows xp it dies with "bus error" when trying to format the image as fat32 (or ntfs) I invoke qemu with "qemu -user-net -enable-audio -m 384 -hda hd.img -cdrom /dev/hdc -boot d" and created the hd image by going to / and invoking "dd of=hd.img bs=1024 seek=30000000 count=0" my root partition is set as device /dev/md0 using md raid, is this what is causing my problem? I also tried making the image on a empty fat32 partition and replacing -hda hd.img with /mnt/hda/hd.img, can anyone tell me what I am doing wrong?

EDIT: FIXED! I removed the -m 384 argument, from what I can tell this is for using virtual memory only, and you must compile qemu with a certain flag in order for this to work, installing now.

----------

## bravecobra

To have both access to internet and your local network from within qemu, check my blog: http://blog.bravecobra.com/index.php/linux/2005/02/25/emulating_an_os_with_qemu

----------

## PraetorZero

Pardon my n00b-ness, but would this pull whatever is the current version in CVS when you emerge it?  So...  if I were to find at a later time a new version is out, all I would have to do is clear the cache and re-emerge qemu?

----------

## 1der

I also got the same result as watashiwaotaku7.

What did u do to fix it ? What compile flag did you use? 

running the old qemu (6.1) was fine.

----------

## watashiwaotaku7

1der, per my edit, I removed -m 384, if you search there is a thread in portage and programming aobut qemu and the accelerator that talks about using some flag which causes qemu to use only virtual memory.

Having said that, I am still having problems but at least it is installed, everything is working fine, but for some reason it doesnt seem to be using system memory to run windows, which is causing it to be very very slow, I am only using 94 mb of memory total and I have 512 mb so I was hoping to have my emulated OS running on this too, how exactly do I do that? I also imagine other people will want to know since my slowdown running this on raid 0 is big enough, it must be worse with just a regular drive.

----------

## bravecobra

the -m 384 sets the amount of memory you want to assign to qemu. Note that this is the amount of memory you won't be able to use for your host then.

----------

## notz

the mem given to qemu should be lower than /dev/shm

```
root # df | grep shm

none                    240944         0    240944   0% /dev/shm
```

so mine is about 240M....

if you need more, you should edit your fstab and increase /dev/shm ....

----------

## watashiwaotaku7

none                    /dev/shm        tmpfs           defaults     , is my /dev/shm line, how do I edit this to change the size?

also,

has anyone experimented with different windows versions to see which is the most responsive?

how does qemu deal with graphics? (eg: does graphic rendering have the same type of slowdown as everything else or does it just use the native drivers to do everything?)

has anyone attempted to register their windows xp on qemu? I'm using an OEM version of windows from dell, and it tells me the registration key is invalid, how will the microsoft support staff feel about me trying to register and emulated version of XP?

----------

## jdgill0

Use the "size" option:

```
none                    /dev/shm                  tmpfs           size=256m               0 0
```

----------

## corefile

 *bravecobra wrote:*   

> To have both access to internet and your local network from within qemu, check my blog: http://blog.bravecobra.com/index.php/linux/2005/02/25/emulating_an_os_with_qemu

 

Thanks for the link, helped alot. I was wondering if its posiible to setup networking so that i can set up smb (to access HOST file system) Internet AND local network (printer on the network). So basically I wan't to be about to easially access the host files, use the internet, and use printer on my network

----------

## at6

great howto.

qemu works like a charm. thanks!

best regards 

marc

----------

## bravecobra

You should be able to able all of that, following the guidelines. Maybe you need to adjust your smb.conf? I haven't tested this, but it should possible. The only thing you won't be able to do, is run services on the qemu host, unless you set upset a forwarding to your host's gateway.

As you can see in the screenshot (might be a little small), I was able to access my network through samba from within qemu and had access to the internet.

----------

## pussi

Note that if you are using udev, /dev/kqemu is not created automatically when you boot, and acceleration won't work.

( http://fabrice.bellard.free.fr/qemu/kqemu-doc.html#SEC4 )

If youre using udev you need to create the file yourself:

```
mknod /dev/kqemu c 250 0

chmod 666 /dev/kqemu
```

Or you can edit the /etc/init.d/kqemu file:

```
#!/sbin/runscript

udev() {

   # Create the KQEMU device if using udev

   if [ -a /dev/kqemu ] ; then

      einfo "/dev/kqemu exists"

   else

      ebegin "Creating /dev/kqemu"

      mknod /dev/kqemu c 250 0

      chmod 666 /dev/kqemu

   fi

}

start() {

   ebegin "Loading kqemu module"

   /sbin/modprobe kqemu

   udev

   eend $?

}

stop() {

   ebegin "Unloading kqemu module"

   /sbin/modprobe -r kqemu

   eend $?

}
```

----------

## techiem2

The Howto is wonderful and worked fine.

I am having one problem though.

When I try to boot my old Win98SE vm, it dies with a Windows Protection Error.

Starting it with -no-kqemu works fine as before.

Any suggestions?

I'm currently trying to install win2k in a new vm to see if that works.

Mark II

----------

## pussi

 *techiem2 wrote:*   

> When I try to boot my old Win98SE vm, it dies with a Windows Protection Error.
> 
> Starting it with -no-kqemu works fine as before.
> 
> Any suggestions?
> ...

 This happened to me also and it seems to be known bug in qemu. 

Win2k works fine with me. :)

----------

## Koala Kid

Guys, how can I access my local files and directories from the guest OS ?

----------

## techiem2

You have to setup the networking and use smb (at least from win) to access the host.

There's a link higher in the thread about how to set that up.

Direct access to the host fs would be a nice feature.

----------

## stonent

```
Aurora ~ # /etc/init.d/kqemu start

 * Loading kqemu module ...

FATAL: Error inserting kqemu (/lib/modules/2.6.10-gentoo-r4/misc/kqemu.ko): Invalid module format
```

Something happened that wasn't right...

----------

## Lejban

 *Koala Kid wrote:*   

> Guys, how can I access my local files and directories from the guest OS ?

 

I use winSCP from the guest (winXP) to any computer including the host (gentoo). Much easier then setting up a smb-server on the host.

----------

## Koala Kid

 *Lejban wrote:*   

>  *Koala Kid wrote:*   Guys, how can I access my local files and directories from the guest OS ? 
> 
> I use winSCP from the guest (winXP) to any computer including the host (gentoo). Much easier then setting up a smb-server on the host.

 

Can you write some details about that ? it sounds me like chinese...  :Laughing: 

What's that winSCP thing ?

Thanks in advance  :Cool: 

----------

## Lejban

 *Koala Kid wrote:*   

>  *Lejban wrote:*    *Koala Kid wrote:*   Guys, how can I access my local files and directories from the guest OS ? 
> 
> I use winSCP from the guest (winXP) to any computer including the host (gentoo). Much easier then setting up a smb-server on the host. 
> 
> Can you write some details about that ? it sounds me like chinese... 
> ...

 

scp is coping over ssh, winscp is a windows app to do this, come on, one google serch would give you this info...

----------

## Debentoo_Gao

 *pussi wrote:*   

> Note that if you are using udev, /dev/kqemu is not created automatically when you boot, and acceleration won't work.
> 
> ( http://fabrice.bellard.free.fr/qemu/kqemu-doc.html#SEC4 )
> 
> If youre using udev you need to create the file yourself:
> ...

 

I just did all the thing above,but when I start qemu in cosole,it still said "Could not open '/dev/kqemu' - QEMU acceleration layer not activated'

----------

## pussi

I just realized that it don't work with me eiter  :Embarassed:   :Embarassed: 

I know it should work as it reads in Qemu acceleration module manual, but for some reason it don't.  :Sad: 

----------

## Debentoo_Gao

 *pussi wrote:*   

> I just realized that it don't work with me eiter  
> 
> I know it should work as it reads in Qemu acceleration module manual, but for some reason it don't. 

 

It's so strange that it works now after I reemerge qemu-cvs  :Smile:   :Smile:   :Smile: 

----------

## pussi

 *Debentoo_Gao wrote:*   

>  *pussi wrote:*   I just realized that it don't work with me eiter :oops: :oops: 
> 
> I know it should work as it reads in Qemu acceleration module manual, but for some reason it don't. :( 
> 
> It's so strange that it works now after I reemerge qemu-cvs :) :) :)

 Yeah, but you have to recompile qemu every time you reboot your system to make it work again. :P

----------

## jdoe

works for me, replacing

 mknod /dev/kqemu c 250 0

with

 mknod /dev/kqemu c 241 0

just ls -l /dev/kqemu after emerged it...

crw-rw-rw-  1 root root 241, 0 Mar 13 16:46 /dev/kqemu

see 241 not 250.

John

----------

## pussi

Thanks I'll try that. :)

The manual said 250 so I assumed that it would be correct :P

----------

## Debentoo_Gao

 *jdoe wrote:*   

> works for me, replacing
> 
>  mknod /dev/kqemu c 250 0
> 
> with
> ...

 

Thanks  :Smile:  It works now:)  :Smile:   :Smile: 

----------

## destr0yr

... maybe i'm missing something (or just overly tired), but when i run "qemu -user-net -m 384 -hda myimage.img -cdrom /dev/cdrom1 -boot d", not much appears to be happening.  my cpu jumps to 99% and it just sits there..   am i supposed to do something?  :Question: 

----------

## jdoe

now, with recent cvs versions, I have this problem too... 

cpu at 100% and nothing happening...

----------

## StringCheesian

I got this:

```
 * Copying qemu from /mnt/store/gentoo/distfiles/cvs-src ...

 * CVS module qemu is now in /var/tmp/portage/qemu-cvs-0.0.1/work

>>> Unpacking kqemu-0.6.2-1.tar.gz to /var/tmp/portage/qemu-cvs-0.0.1/work/qemu

patching file kqemu/install.sh

patching file kqemu/kqemu.h

>>> Source unpacked.

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------

LOG FILE = "/tmp/sandbox-app-emulation_-_qemu-cvs-0.0.1-30208.log"

mkdir:     /root/.ssh

--------------------------------------------------------------------------------

```

----------

## Boris27

```
>>> emerge (1 of 1) app-emulation/qemu-cvs-0.0.1 to /

>>> md5 src_uri ;-) kqemu-0.6.2-1.tar.gz

>>> Unpacking source...

 * Fetching CVS module qemu into /usr/portage/distfiles/cvs-src ...

 * Warning: The SSH host key of the remote server will not be verified.

 * A temporary known hosts list will be used.

 * Running  cvs -q -f -z4 -d ":ext:anoncvs@savannah.gnu.org:/cvsroot/qemu" checkout  qemu

Warning: Permanently added 'savannah.gnu.org,199.232.41.3' (RSA) to the list of known hosts.

cvs [checkout aborted]: cannot make directory qemu: Permission denied

!!! ERROR: app-emulation/qemu-cvs-0.0.1 failed.

!!! Function cvs_fetch, Line 447, Exitcode 1

!!! cvs checkout command failed

!!! If you need support, post the topmost build error, NOT this status message.

```

What gives?

EDIT: Nevermind. Don't mount your distfiles from a samba share... That doesnt work....  :Sad: 

----------

## djm

this done properly (no offence):

http://dev.gentoo.org/~lu_zero/overlay/qemu.tar.bz2

edit: fixed the url tags

----------

## destr0yr

 *djm wrote:*   

> this done properly (no offence):
> 
> [url][http://dev.gentoo.org/~lu_zero/overlay/qemu.tar.bz2/url]

 

sweet.  this actually does something!

----------

## pussi

 *StringCheesian wrote:*   

> I got this:
> 
> ```
>  * Copying qemu from /mnt/store/gentoo/distfiles/cvs-src ...
> 
> ...

 

```
mkdir  /root/.ssh
```

and try again :)

----------

## StringCheesian

 *djm wrote:*   

> this done properly (no offence):
> 
> http://dev.gentoo.org/~lu_zero/overlay/qemu.tar.bz2

 

Doesn't work here:

```
/var/tmp/portage/qemu-0.6.2.20050309/temp/ccJPO2ri.s: Assembler messages:

/var/tmp/portage/qemu-0.6.2.20050309/temp/ccJPO2ri.s:45640: Error: unknown pseudo-op: `.l'

/var/tmp/portage/qemu-0.6.2.20050309/temp/ccJPO2ri.s:45640: Error: invalid character (0xfffffffb) in mnemonic

make[1]: *** [translate.o] Error 1

make[1]: Leaving directory `/var/tmp/portage/qemu-0.6.2.20050309/work/qemu/ppc-user'
```

USE flags: -debug +kqemu +sdl +softmmu

gcc 3.4.3.20050110

binutils 2.15.92.0.2-r6

 *pussi wrote:*   

> 
> 
> ```
> mkdir  /root/.ssh
> ```
> ...

 

Thanks, I'll try the first ebuild again.

EDIT:   :Crying or Very sad: 

```
/var/tmp/portage/qemu-cvs-0.0.1/temp/cc0kSyAd.s: Assembler messages:

/var/tmp/portage/qemu-cvs-0.0.1/temp/cc0kSyAd.s:30422: Error: bad expression

/var/tmp/portage/qemu-cvs-0.0.1/temp/cc0kSyAd.s:30422: Error: junk at end of line, first unrecognized character is `s'

/var/tmp/portage/qemu-cvs-0.0.1/temp/cc0kSyAd.s:44531: Error: junk at end of line, first unrecognized character valued 0x16

make[1]: *** [translate.o] Error 1

make[1]: Leaving directory `/var/tmp/portage/qemu-cvs-0.0.1/work/qemu/ppc-user'

make: *** [all] Error 1
```

----------

## djm

If you're having trouble with lu_zero's ebuild, then you should go to https://bugs.gentoo.org/show_bug.cgi?id=82885 and report it

----------

## StringCheesian

 *djm wrote:*   

> If you're having trouble with lu_zero's ebuild, then you should go to https://bugs.gentoo.org/show_bug.cgi?id=82885 and report it

 

I'm starting to think it might be something wrong with my system.

EDIT: Yep, it was. I reinstalled my system and now it installs and runs fine with lu_zero's ebuild (I haven't tried the first one), but Win98 won't run.Last edited by StringCheesian on Mon Apr 04, 2005 4:57 am; edited 1 time in total

----------

## zeek

 *notz wrote:*   

> goto to your portage overlay ...

 

Great instructions!

----------

## AngryLlama

I can't get the qemu-cvs ebuild to work.  I am running it in my 32-bit chroot since running the standard ebuild in my 64bit enviroment would cause the emulator to freeze in certain circumstances.  I'm not sure what it is.. but in 64bit the Windows 2000 installer throws page faults when I do things like move the window or click next after typing in the cd-key.

Here is what I did:

```

wget ftp://notz.homelinux.com/qemu-cvs.tar.gz

tar -xzf qemu-cvs.tar.gz

echo "app-emulation/qemu-cvs ~x86" >> /etc/portage/package.keywords              

echo "app-emulation/qemu-cvs kqemu" >> /etc/portage/package.use                  

emerge qemu-cvs

```

The emerge proceed for a short time then I get this error:

```
make[1]: Leaving directory `/var/tmp/portage/qemu-cvs-0.0.1/work/qemu/x86_64-softmmu'

make -C kqemu

make[1]: Entering directory `/var/tmp/portage/qemu-cvs-0.0.1/work/qemu/kqemu'

make -C /usr/src/linux SUBDIRS=`pwd` modules

make[2]: Entering directory `/usr/src/linux-2.4.28-gentoo-r5'

gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/split-includescripts/split-include.c

ACCESS DENIED  open_wr:   /usr/src/linux-2.4.28-gentoo-r5/scripts/split-include

/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/../../../../i686-pc-linux-gnu/bin/ld: cannot open output file scripts/split-include: Permission denied

collect2: ld returned 1 exit status

ACCESS DENIED  unlink:    /usr/src/linux-2.4.28-gentoo-r5/scripts/split-include

make[2]: *** [scripts/split-include] Error 1

make[2]: Leaving directory `/usr/src/linux-2.4.28-gentoo-r5'

make[1]: *** [kqemu.o] Error 2

make[1]: Leaving directory `/var/tmp/portage/qemu-cvs-0.0.1/work/qemu/kqemu'

make: *** [all] Error 2

!!! ERROR: app-emulation/qemu-cvs-0.0.1 failed.

!!! Function src_compile, Line 48, Exitcode 2

!!! make failed

!!! If you need support, post the topmost build error, NOT this status message.

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------

LOG FILE = "/tmp/sandbox-app-emulation_-_qemu-cvs-0.0.1-29477.log"

open_wr:   /usr/src/linux-2.4.28-gentoo-r5/scripts/split-include

unlink:    /usr/src/linux-2.4.28-gentoo-r5/scripts/split-include

--------------------------------------------------------------------------------

```

I don't use my chroot often so it only has 2.4.28 installed; My real system has 2.6.11-gentoo-r3.

When I emerge qemu-cvs in my main 64bit enviroment it compiles fine, /dev/kqemu is created. However, the kqemu module cannot be found anywhere.  Any ideas? I added kqemu to my packages.use.

Thanks!

----------

## zybl0re

Okay, I'm not sure what's going on here, but I'm following the directions of the thread poster exactly (as far as I can tell), but when it get to the emerge step, I get

```

tinomen portage # emerge qemu-cvs

Calculating dependencies   

emerge: there are no ebuilds to satisfy "qemu-cvs".

```

the tar extracted to /usr/local/portage... what's going on?  I'm sure this must be some simple little thing I'm overlooking.   :Sad: 

edit: okay, a dude ssh'd into my machine and helped me out.  I needed to add /usr/local/portage to PORTDIR_OVERLAY in make.conf

qemu-cvs is compiling right now.   :Smile: 

----------

## Fr0d083

it seems that the tarball for the ebuild is no longer on the ftp server

does anyone know if it is hosted anywhere else? I checked gentoo-portage and they don't have it either.

I really would like to get this installed so I can dump VMWare.

----------

## Fr0d083

bump

----------

## djm

use the one on http://dev.gentoo.org/~lu_zero that I linked to earlier in the thread

----------

## bravecobra

The permissions on /dev/kqemu get reset by udev on my machine.

```
zeus gentoo-qemu # /etc/init.d/kqemu stop

 * Unloading kqemu module...                                            [ ok ]

zeus gentoo-qemu # /etc/init.d/kqemu start

 * Loading kqemu module...

 * Creating /dev/kqemu...                                                  [ ok ]

zeus gentoo-qemu # ls -al /dev/|grep kqemu

crw-rw-rw-   1 root  root    241,   0 Apr 24 00:17 kqemu

zeus gentoo-qemu # ls -al /dev/|grep kqemu

crw-rw----   1 root  root    250,   0 Apr 24 00:17 kqemu
```

Even when creating a new device with 241, it gets reset by udev to 250 and has its permissions reset to 0660 (udev uses the default mode 0660 as set in /etc/udev/udev.conf).

So an additional udev permission rule is needed. So I added /etc/udev/permissions.d/10-local.permissions with the following content:

```
kqemu:root:root:0666
```

That kept the permissions of /dev/kqemu on 0666.

Hope this helps the udev users out there.

----------

## bravecobra

Following the guide as presented in my blog (http://blog.bravecobra.com/index.php/linux/2005/02/25/emulating_an_os_with_qemu), I came up with the following startup script. You'll also need the following packages

```
#emerge vde iptables
```

Another requirement would be to enable the tun device in your kernel (vde uses that to setup a private networking device).

```
Device drivers -> Networking support -> Network device support  -> [*] Universal TUN/TAP device driver support
```

When all that is enabled, you can start using the following startup script.

```
#!/sbin/runscript

udev() {

   # Create the KQEMU device if using udev

    if [ -a /dev/kqemu ] ; then

        einfo "        /dev/kqemu exists"

    else

        ebegin "        Creating /dev/kqemu"

        mknod /dev/kqemu c 241 0

        chmod 666 /dev/kqemu

    fi

}

start() {

    ebegin "Starting kqemu"

        ebegin "        Loading kqemu module"

            /sbin/modprobe kqemu

            udev

        eend $?

        ebegin "        Starting up virtual network"

            vde_switch -tap tun -daemon

            ifconfig tun 192.168.254.254

            chmod 666 /tmp/vde.ctl

            echo "1" > /proc/sys/net/ipv4/ip_forward

            iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

        eend $?

    eend $?

}

stop() {

    ebegin "Stopping kqeum"

        ebegin "        Unloading kqemu module"

            /sbin/modprobe -r kqemu

        eend $?

        ebegin "        Stopping virtual network"

            killall -9 vde_switch

            rm /tmp/vde.ctl

        eend $?

    eend $?

}

```

Of course I could start finetuning that by having the virtual TUN ip set in /etc/conf.d/kqemu etc, but you'll get the idea. Don't forget the above udev permissions rule  :Smile: .

----------

## bravecobra

 *destr0yr wrote:*   

> ... maybe i'm missing something (or just overly tired), but when i run "qemu -user-net -m 384 -hda myimage.img -cdrom /dev/cdrom1 -boot d", not much appears to be happening.  my cpu jumps to 99% and it just sits there..   am i supposed to do something? 

 

Did you emerge with the softmmu flag? Otherwise it's quite normal nothing happens.  :Smile: 

----------

## dobh

Hi,

I moved from qemu-cvs to lu_zeros ebuild.

When I try to emerge it, the following error appears:

>>> Downloading http://dev.gentoo.org/~lu_zero/distfiles/qemu-0.6.2.20050309.tar.bz2

--13:26:37--  http://dev.gentoo.org/%7Elu_zero/distfiles/qemu-0.6.2.20050309.tar.bz2

           => `/usr/portage/distfiles/qemu-0.6.2.20050309.tar.bz2'

Resolving dev.gentoo.org... 134.68.220.30

Connecting to dev.gentoo.org[134.68.220.30]:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 974,674 [application/x-tar]

100%[===============================================================================>] 974,674      426.44K/s

13:26:40 (425.32 KB/s) - `/usr/portage/distfiles/qemu-0.6.2.20050309.tar.bz2' saved [974674/974674]

!!! Security Violation: A file exists that is not in the manifest.

!!! File: files/kqemu-sysfs.patch

What shoud I do?

----------

## djm

 *dobh wrote:*   

> Hi,
> 
> I moved from qemu-cvs to lu_zeros ebuild.
> 
> When I try to emerge it, the following error appears:
> ...

 

FEATURES="-strict" emerge qemu

FEATURES="strict" means that the file size of ebuilds and patches in the portage tree are checked, instead of just the things that get downloaded to distfiles. Until recently if was off by default, but that changed (on x86, at least).

Or, doing emerge --digest qemu should do the trick too

----------

## somas1

 *zybl0re wrote:*   

> Okay, I'm not sure what's going on here, but I'm following the directions of the thread poster exactly (as far as I can tell), but when it get to the emerge step, I get
> 
> ```
> 
> tinomen portage # emerge qemu-cvs
> ...

 

I've added 

```
PORTDIR_OVERLAY="/usr/local/portage"
```

 to /etc/make.conf but I still get "there are no ebuilds to satisfy "qemu-cvs""

What am I doing wrong?

----------

## xming

I get this while emerging qemu with kqemu

```

make[1]: Entering directory `/var/tmp/portage/qemu-0.6.2.20050309/work/qemu/kqemu'

make -C /usr/src/linux M=`pwd` modules

make[2]: Entering directory `/usr/src/linux-2.6.11.7-reiser4'

  CC [M]  /var/tmp/portage/qemu-0.6.2.20050309/work/qemu/kqemu/kmod.o

In file included from include/asm/processor.h:18,

                 from include/asm/thread_info.h:17,

                 from include/linux/thread_info.h:21,

                 from include/linux/spinlock.h:12,

                 from include/linux/capability.h:45,

                 from include/linux/sched.h:7,

                 from include/linux/module.h:10,

                 from /var/tmp/portage/qemu-0.6.2.20050309/work/qemu/kqemu/kmod.c:5:

include/asm/system.h:306:23: warning: null character(s) preserved in literal

include/asm/system.h:306:23: missing terminating " character

In file included from include/asm/processor.h:18,

                 from include/asm/thread_info.h:17,

                 from include/linux/thread_info.h:21,

                 from include/linux/spinlock.h:12,

                 from include/linux/capability.h:45,

                 from include/linux/sched.h:7,

                 from include/linux/module.h:10,

                 from /var/tmp/portage/qemu-0.6.2.20050309/work/qemu/kqemu/kmod.c:5:

include/asm/system.h:311: error: syntax error before "kernel"

```

any ideas?

xming

----------

## djm

qemu 0.7 is out and it's in portage (including the kernel module if you set the kqemu use flag), so (emerge sync &&) emerge qemu is now the way to get this

it's almost certainly keyworded as ~x86, btw

----------

## somas1

 *djm wrote:*   

> qemu 0.7 is out and it's in portage (including the kernel module if you set the kqemu use flag), so (emerge sync &&) emerge qemu is now the way to get this
> 
> it's almost certainly keyworded as ~x86, btw

 

Okay I've got .7 loaded with kqemu and I copied over a 6 gig .img file loaded with ubuntu that I've been using under the windows port of qemu for weeks.  This .img will boot and will load basic services but will crash before loading a desktop.  Is this (.7) working for anyone?

----------

## xming

ok, I solved my problem, it was due to corrupted kernel headers, now running 0.7  :Smile: 

----------

## hpux

I dont know if this is the problem you had, I had the same error, but the problem that I had was remidied by loading the new kqemu module that is created when you install using the accelerator.

However, now BeOS doesn't boot in qemu anymore...  we'll see how it goes...

----------

## asouldja

I've just installed qemu like such:

```
USE="kqemu softmmu" emerge qemu
```

kqemu files are there but I can't load any module even after a modules-update or reboot.

also tried:

```
emerge qemu-cvs
```

but nothing....

----------

