-   Slackware (
-   -   QEMU & KQEMU on slackware (

sl4ckw4re 07-18-2006 04:44 AM

QEMU & KQEMU on slackware
Hi. I've found out that QEMU and KQEMU can boot another OS from within other (in my case I would like to boot WindowsXP from my Slackware system, so I don't have to reboot every time). Does anyone used it on Slackware ? Are there packages for it or I have to compile it from source, and if so could someone post what I need to do to boot my XP from Slack ? I don't know what info is needed for that, but please ask and I'll post output from every command you need. Thx.

it's not necesarily has to be QEMU, if you've used smth else and it's working and stable please post that too.

nykey 07-18-2006 05:12 AM

Same here :). Would like to boot XP from Slack.

uselpa 07-18-2006 05:24 AM

Alien Bob has the necessary packages and SlackBuilds, see here.

sl4ckw4re 07-18-2006 06:04 AM

thx, but how about a tutorial or instructions on how to use it. i'm pretty much a :newbie: .

jimX86 07-18-2006 07:02 AM

There's a nice tutorial at the same place.

nykey 07-18-2006 02:33 PM

Ok, I did get it installed just fine. I have only few issues. First, both my keyboard and mouse are USB, when I add '-usb -usbdevice host:xxxx:yyyy -usbdevice host:zzzz:wwww' I get

usb_host: only one interface supported
Warning: could not add USB device host:04a5:7008

. Is there any way to make both USB devices work ? Luckly I have a USB to PS/2 adapter for my mouse, but still I want to keep both on the USB ports if possible. And second question would be, can I/do I have to install my drivers just like in a normal Window$ installation ? I have all my drivers on the CD but should I install them ? I installed Window$ XP. Thx.

Btw, @ sl4ckw4re ... hope it worked out well for you too.

uselpa 07-18-2006 02:39 PM

For keyboard and mouse, what happens if you don't specify *anything*? Do they still work?

nykey 07-18-2006 03:00 PM

well, when I tried to install windows having both keyboard and mouse on the USB ports, the install just got stuck at Installing Devices (37 minutes). So I removed the mouse from the USB port, put it on the PS/2 port, and added only host:xxx:yyy for the keyboard and it works. But my mouse is so sensitive on the PS/2 port (it is USB optical mouse). I mean I barely touch it and it goes all the way in the other part of the screen, too damn sensitive. And the keyboard, well everything works but the NUM buttons (you know, the numbers and aritmetichal signs in the right)... didn't got a chance to check the multimedia buttons but I don't think they work and they aren't that important. Do you know about my second question ? Can I install the drivers from the CD just like I would install to a normal Windows system ?

uselpa 07-18-2006 03:05 PM

No, what I wanted you to try is have your mouse and keyboard on USB but not specify anything about them to Qemu. Because I think that Qemu simulates a normal PS2 mouse and keyboard and Windows is not supposed to know they are USB devices.

nykey 07-18-2006 03:13 PM

Yeah, I did that and they're working both now, but not when I tried to install Windows, it got stucked if they wore on the USB ports at install. Now I've just shut down Windows, closed the process moved the mouse back to USB port, started qemu again and they both work and QEMU sees them as PS/2 mouse and keyboard. Anyway, I've encountered another issue at the moment. My network is not working. I've setup my ip's and everything (I have a static IP address) but it's not working. I've tracked my problem at the MAC address. For whatever reason it shows me other MAC than my real one, and my ip is based on my MAC. If my MAC doesn't matches the IP in the server of my ISP then no net. How can I change my MAC to the real one ?

Alien Bob 07-18-2006 03:28 PM

Remember that QEMU emulates ALL the hardware for the virtual machine: the virtual mouse and keyboard have no connection to the physical devices. An exception is made for a USB mouse if you want that, but this was originally just meant to test the (then) new USB support in QEMU. The default keyboard/mouse in QEMU are emulated PS/2 devices.
You should not have to specify anything on the commandline and it should work. If you want sound or access to physical USB devices (printer, scanner) in the virtual machine, you still have to pass commandline parameters.


nykey 07-18-2006 03:36 PM

thx Alien Bob, I was hoping for you to see this thread :). Could you give more assistance in the other issues please. I have a few questions, if you can and know the answers.
1. Can I install the drivers from my drivers CD for the motherboard/video card/lan/etc (or if not for all, maybe you can the the piece of hardware for which I can install them). I see it only recognizes my video card as 4Mb card - from 128Mb.

2. How can I make my network to work ? I said in my previous post my IP is checked in my ISP's server based on my network card's MAC. I booted in the QEMU Windows install and checked my network card MAC and it's not the same with the real MAC of my card, how can I change it to make it work. I have static IP.

3. How can I check if acceleration is enabled (kqemu) cause it looks pretty slow to me (yes I know it's emulated and all that, but as I've read in your tutorial the system fully installed should run faster then the installation process, but actually it runs the same). I've passted the -kernel-kqemu option when I started qemu and it shows a bit of improvment but I've read that they are 2 diferent accelerations , kemu accelerates user-processes and -kernel-kqemu accelerates the Guest OS's kernel processes.

That would be all ... for now, I may post in the future. I would greatly appreciate if you could help me in this matter. Thx, and looking forward to your replay('s). Untill then, I'll keep :study:.

Oh, and 4. I have 512DDR, I've set

none            /dev/shm        tmpfs      size=512m        0  0
and I run qemu with the following command

none            /dev/shm        tmpfs      size=512m        0  0
. Is that OK ? What should I modify and where, for best performance in the Guest OS, but still keep the Host OS stability under control, I wouldn't want to have to make a force reboot.

Old_Fogie 07-18-2006 05:27 PM

So would qemu allow me to run windows and that windows installation have micorosoft drivers for a scanner?

If not I guess I'm gonna try out this tutorial

one of the gents on the linux general says I should be able to run vmware, but since qemu already tried and true and info/help how to for slackware may be my better option.

uselpa 07-19-2006 02:16 AM

nykey, you need to understand that qemu emulates a PC. This PC has certain characteristics which have absolutely nothing (or nearly) to do with your real PC. Look into the doc of qemu, it describes what PC is emulated. It makes no sense to install drivers which correspond to your real PC, you need to install drivers in qemu which correspond to your virtual PC.

The network part is tricky with qemu, again, read the doc. I think that Alien Bob also has some doc on this. To Old_Fogie, network is the part where VMWare shines in contrast to qemu, but it's only really important if you want to run servers in your virtual machine.

And, in order to check if the kernel module actually accelerates, again, read the doc. There's some key combination to access the qemu console (ALT-2 or CTRL-ALT-2, I don't remember and I'm not at my box now), where you issue a command like 'show kqemu'. It's all in the doc of the kernel module.

So after mentionning the doc, there's also a dedicated forum for qemu where a search usually yields some interesting answers. Google is your friend to find the forum.

acummings 07-19-2006 04:35 AM


How can I make my network to work ?
Again, think *emulated* as in your Win hardware *will_not* be your real hardware.

In a nutshell, Qemu "fools" Win into that Win is running on real hardware. But Win runs inside a container. Such container is software that's named Qemu. Pretty good trick, eh?

The win mac addr comes from the Qemu *emulated* NIC which means it will be a different mac addr than what your *real* NIC has.

So, two NICs, thus: 1. real NIC = Slackware NIC, 2. emulated NIC = MS_Win NIC

Slackware virtualization - subleaf on network

that post at url helps on network.

I've Win 2K SP4 running (rather nicely) in Qemu on top of Slackware.

running Samba on host (Slackware) is key. Key also are all IP addr for Qemu designated items such as like for DNS and the NAT server -- I put these IP addr into Win TCP/IP settings/properties -- also herein, have Win set to "obtain IP addr automatically" (yes, Qemu has it's own built in DHCP server)

almost abra cadabra for me at this point. -- I'm unable to browse the LAN and or LANS in Win and "find" anything, a share, etc.

So, key (at least for me) to now right click on the Win "my computer" icon and choose "map network drive"

right now I forget what typed/entered into that. But i found already answered at the Qemu forums what to enter into that. *Now* my share works, I can LAN network share files between the host and the guest OS's.

Tried Win web browser and *it's working* is on the internet. DL'd firefox for Win and installed it. Now I can simultaneously browse www via both Slackware firefox and Win firefox.

My *real* LAN is at

which I allowed to confuse me for a while as in how can that work with Qemu 10.0.whatever IP range. But it works -- the Qemu NAT and DNS must do it along with Qemu finds a running Samba server and gets the guest OS hooked up with the host OS for network file sharing.

After the fact (I got it working) I can see that it's *easy* to get the networking going.


All times are GMT -5. The time now is 02:26 AM.