You are not logged in.

#1 2008-09-18 01:09:33

AD28
Member
Registered: 2008-09-16
Posts: 161

KVM conflict between VBox and qemu?

After I run a VDI with kernel extensions enabled, qemu-kvm won't work anymore until I reboot.  I figured that you wouldn't be able to run 2 kernel-based VMs at the same time, but why won't qemu-kvm work even after I've shut off the VBox VM?

Just wondering if anyone else has noticed this.. anything I could try on my end to fix this aside from rebooting each time or is that just how it's supposed to work?  I'm running virtualbox_bin 2.0.2-1 and qemu 0.9.1-9 on Arch64.

Offline

#2 2008-09-18 08:44:58

nielsb
Member
From: Harrogate, UK
Registered: 2008-07-07
Posts: 32
Website

Re: KVM conflict between VBox and qemu?

I assume it's because you have the vboxdrv module loaded, and there may be some "issues" between the kvm, kvm-intel/amd modules and the vboxdrv module.

Try to unload the VB's module before you run kvm: sudo modprobe -r vboxdrv.

How do you like kvm otherwise, do you use it straight from the console or do you have any UI for it? I'm curious as I've just switched from VB to KVM.

Niels


MacBook4.1 - Arch64 - OpenBox WM

Offline

#3 2008-09-18 15:14:20

AD28
Member
Registered: 2008-09-16
Posts: 161

Re: KVM conflict between VBox and qemu?

nielsb wrote:

Try to unload the VB's module before you run kvm: sudo modprobe -r vboxdrv.

That didn't fix it, but I also tried unloading the kvm module before running qemu-kvm and it said FATAL: Module kvm is in use.  Apparently VB doesn't release kvm even after it shuts down, so that's why qemu-kvm won't work.  The qemu-kvm process just sits there eating 100% cpu at that point.. I can't seem to kill it unless I reboot.



How do you like kvm otherwise, do you use it straight from the console or do you have any UI for it? I'm curious as I've just switched from VB to KVM.

So far I've only used qemu from the terminal.  I prefer qemu except for a couple images where I take/revert a lot of snapshots.  qemu can do snapshots, but VB's snapshot UI makes managing them a lot easier with its tree display and comment boxes.  Maybe qemu guis can do the same thing, but I just haven't tried any yet.

Otherwise I find it easier and faster to customize qemu than going through all the VB dialog boxes.  Plus I don't know how to do some things with VBox like forwarding guest connections to host ports.  Things like that can probably be accomplished from the cli with VBoxManage, but it's easier for me to use qemu since there's a man page.

Offline

#4 2008-09-18 15:37:06

nielsb
Member
From: Harrogate, UK
Registered: 2008-07-07
Posts: 32
Website

Re: KVM conflict between VBox and qemu?

AD28 wrote:
nielsb wrote:

Try to unload the VB's module before you run kvm: sudo modprobe -r vboxdrv.

That didn't fix it, but I also tried unloading the kvm module before running qemu-kvm and it said FATAL: Module kvm is in use.  Apparently VB doesn't release kvm even after it shuts down, so that's why qemu-kvm won't work.  The qemu-kvm process just sits there eating 100% cpu at that point.. I can't seem to kill it unless I reboot.

Hmm, are you saying that VB uses the kvm module? In order to run qemu-kvm you do need the kvm module (together with the kvm-intel/amd module). Before I started using qemu-kvm I used VB, and at that time I did not have any kvm modules loaded explicity. Do you have the kvm and kvm-intel/amd in your rc.conf? If you do it may be worth trying to unload those two before you run VB, after you have ran VB you unload the vboxdrv and load the kvm, kvm-intel/amd and see if that helps.

Niels


MacBook4.1 - Arch64 - OpenBox WM

Offline

#5 2008-09-18 16:08:42

AD28
Member
Registered: 2008-09-16
Posts: 161

Re: KVM conflict between VBox and qemu?

Yes, VB seems to use the kvm module.  I know kvm uses amd-v extensions, but I'm not sure if they intended VB to handle the kvm module like this.  I just tried one last thing.. it seems to work if I unload kvm-amd before kvm.

- fresh reboot
- ran a vdi with amd-v enabled
- closed vbox
- sudo modprobe -r kvm-amd (last time I unloaded kvm here and got a fatal error)
- sudo modprobe -r kvm
- sudo modprobe kvm
- sudo modprobe kvm-amd
- qemu-kvm works again

Kind of sucks having to do this each time, but at least it works now.  Thanks for the help.

Last edited by AD28 (2008-09-18 16:26:57)

Offline

Board footer

Powered by FluxBB