How to switch between KVM and VirtualBox on Ubuntu 18.04
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm using VirtualBox for some projects that I'm working on but also want to use KVM. I know that I can't use both at the same time, because of VirtualBox which refuses to start with an error like: VERR_VMX_IN_VMX_ROOT_MODE
Now I thought it would be easy to stop all KVM / libvirtd services and after that to unload the KVM modules like so:
$ sudo systemctl stop libvirtd
$ sudo modprobe -r kvm_intel
$ sudo modprobe -r kvm
But when I try to unload the KVM modules, modprobe tells me that these modules are still in use.
When I check systemctl for other running services with libvirt in its name, it also lists:
$ sudo systemctl list-unit-files| grep libvirt
libvirt-bin.service enabled
libvirt-guests.service enabled
libvirtd.service enabled
and
$ sudo systemctl list-unit-files| grep kvm
qemu-kvm.service enabled
So I stopped them all, but even after that, something is using KVM.
I did a
$ sudo lsof | grep kvm
qemu-syst 14745 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
qemu-syst 14745 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
qemu-syst 14745 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
qemu-syst 14745 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
qemu-syst 14745 14753 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
qemu-syst 14745 14753 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
qemu-syst 14745 14753 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
qemu-syst 14745 14753 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
CPUx200/ 14745 14761 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
CPUx200/ 14745 14761 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
CPUx200/ 14745 14761 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
CPUx200/ 14745 14761 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
SPICEx20 14745 14763 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
SPICEx20 14745 14763 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
SPICEx20 14745 14763 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
SPICEx20 14745 14763 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
kvm-pit/1 14762 root cwd DIR 253,0 4096 2 /
kvm-pit/1 14762 root rtd DIR 253,0 4096 2 /
kvm-pit/1 14762 root txt unknown /proc/14762/exe
and it seems that something is still running. Did I miss something that I have to stop in order to completely stop KVM?
I would like to put all relevant steps into a script so that I can easily start / stop KVM or VirtualBox...
linux ubuntu virtualbox kvm
add a comment |Â
up vote
0
down vote
favorite
I'm using VirtualBox for some projects that I'm working on but also want to use KVM. I know that I can't use both at the same time, because of VirtualBox which refuses to start with an error like: VERR_VMX_IN_VMX_ROOT_MODE
Now I thought it would be easy to stop all KVM / libvirtd services and after that to unload the KVM modules like so:
$ sudo systemctl stop libvirtd
$ sudo modprobe -r kvm_intel
$ sudo modprobe -r kvm
But when I try to unload the KVM modules, modprobe tells me that these modules are still in use.
When I check systemctl for other running services with libvirt in its name, it also lists:
$ sudo systemctl list-unit-files| grep libvirt
libvirt-bin.service enabled
libvirt-guests.service enabled
libvirtd.service enabled
and
$ sudo systemctl list-unit-files| grep kvm
qemu-kvm.service enabled
So I stopped them all, but even after that, something is using KVM.
I did a
$ sudo lsof | grep kvm
qemu-syst 14745 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
qemu-syst 14745 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
qemu-syst 14745 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
qemu-syst 14745 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
qemu-syst 14745 14753 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
qemu-syst 14745 14753 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
qemu-syst 14745 14753 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
qemu-syst 14745 14753 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
CPUx200/ 14745 14761 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
CPUx200/ 14745 14761 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
CPUx200/ 14745 14761 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
CPUx200/ 14745 14761 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
SPICEx20 14745 14763 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
SPICEx20 14745 14763 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
SPICEx20 14745 14763 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
SPICEx20 14745 14763 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
kvm-pit/1 14762 root cwd DIR 253,0 4096 2 /
kvm-pit/1 14762 root rtd DIR 253,0 4096 2 /
kvm-pit/1 14762 root txt unknown /proc/14762/exe
and it seems that something is still running. Did I miss something that I have to stop in order to completely stop KVM?
I would like to put all relevant steps into a script so that I can easily start / stop KVM or VirtualBox...
linux ubuntu virtualbox kvm
KVM can't run VMs on its own and is often paired with QEMU to do the actual emulation. From yourlsof
output, QEMU (your VM) is still running.
â dsstorefile1
May 8 at 7:39
Sorry for my ambiguous use of the terms... But I made sure in virt-manager, that I stopped all the virtual machines. How can it be that qemu is still running?
â Marc
May 8 at 7:48
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm using VirtualBox for some projects that I'm working on but also want to use KVM. I know that I can't use both at the same time, because of VirtualBox which refuses to start with an error like: VERR_VMX_IN_VMX_ROOT_MODE
Now I thought it would be easy to stop all KVM / libvirtd services and after that to unload the KVM modules like so:
$ sudo systemctl stop libvirtd
$ sudo modprobe -r kvm_intel
$ sudo modprobe -r kvm
But when I try to unload the KVM modules, modprobe tells me that these modules are still in use.
When I check systemctl for other running services with libvirt in its name, it also lists:
$ sudo systemctl list-unit-files| grep libvirt
libvirt-bin.service enabled
libvirt-guests.service enabled
libvirtd.service enabled
and
$ sudo systemctl list-unit-files| grep kvm
qemu-kvm.service enabled
So I stopped them all, but even after that, something is using KVM.
I did a
$ sudo lsof | grep kvm
qemu-syst 14745 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
qemu-syst 14745 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
qemu-syst 14745 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
qemu-syst 14745 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
qemu-syst 14745 14753 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
qemu-syst 14745 14753 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
qemu-syst 14745 14753 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
qemu-syst 14745 14753 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
CPUx200/ 14745 14761 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
CPUx200/ 14745 14761 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
CPUx200/ 14745 14761 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
CPUx200/ 14745 14761 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
SPICEx20 14745 14763 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
SPICEx20 14745 14763 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
SPICEx20 14745 14763 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
SPICEx20 14745 14763 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
kvm-pit/1 14762 root cwd DIR 253,0 4096 2 /
kvm-pit/1 14762 root rtd DIR 253,0 4096 2 /
kvm-pit/1 14762 root txt unknown /proc/14762/exe
and it seems that something is still running. Did I miss something that I have to stop in order to completely stop KVM?
I would like to put all relevant steps into a script so that I can easily start / stop KVM or VirtualBox...
linux ubuntu virtualbox kvm
I'm using VirtualBox for some projects that I'm working on but also want to use KVM. I know that I can't use both at the same time, because of VirtualBox which refuses to start with an error like: VERR_VMX_IN_VMX_ROOT_MODE
Now I thought it would be easy to stop all KVM / libvirtd services and after that to unload the KVM modules like so:
$ sudo systemctl stop libvirtd
$ sudo modprobe -r kvm_intel
$ sudo modprobe -r kvm
But when I try to unload the KVM modules, modprobe tells me that these modules are still in use.
When I check systemctl for other running services with libvirt in its name, it also lists:
$ sudo systemctl list-unit-files| grep libvirt
libvirt-bin.service enabled
libvirt-guests.service enabled
libvirtd.service enabled
and
$ sudo systemctl list-unit-files| grep kvm
qemu-kvm.service enabled
So I stopped them all, but even after that, something is using KVM.
I did a
$ sudo lsof | grep kvm
qemu-syst 14745 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
qemu-syst 14745 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
qemu-syst 14745 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
qemu-syst 14745 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
qemu-syst 14745 14753 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
qemu-syst 14745 14753 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
qemu-syst 14745 14753 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
qemu-syst 14745 14753 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
CPUx200/ 14745 14761 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
CPUx200/ 14745 14761 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
CPUx200/ 14745 14761 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
CPUx200/ 14745 14761 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
SPICEx20 14745 14763 libvirt-qemu mem REG 0,13 10646 anon_inode:kvm-vcpu (stat: No such file or directory)
SPICEx20 14745 14763 libvirt-qemu 11u CHR 10,232 0t0 551 /dev/kvm
SPICEx20 14745 14763 libvirt-qemu 12u a_inode 0,13 0 10646 kvm-vm
SPICEx20 14745 14763 libvirt-qemu 18u a_inode 0,13 0 10646 kvm-vcpu
kvm-pit/1 14762 root cwd DIR 253,0 4096 2 /
kvm-pit/1 14762 root rtd DIR 253,0 4096 2 /
kvm-pit/1 14762 root txt unknown /proc/14762/exe
and it seems that something is still running. Did I miss something that I have to stop in order to completely stop KVM?
I would like to put all relevant steps into a script so that I can easily start / stop KVM or VirtualBox...
linux ubuntu virtualbox kvm
edited May 8 at 7:39
asked May 8 at 7:33
Marc
1013
1013
KVM can't run VMs on its own and is often paired with QEMU to do the actual emulation. From yourlsof
output, QEMU (your VM) is still running.
â dsstorefile1
May 8 at 7:39
Sorry for my ambiguous use of the terms... But I made sure in virt-manager, that I stopped all the virtual machines. How can it be that qemu is still running?
â Marc
May 8 at 7:48
add a comment |Â
KVM can't run VMs on its own and is often paired with QEMU to do the actual emulation. From yourlsof
output, QEMU (your VM) is still running.
â dsstorefile1
May 8 at 7:39
Sorry for my ambiguous use of the terms... But I made sure in virt-manager, that I stopped all the virtual machines. How can it be that qemu is still running?
â Marc
May 8 at 7:48
KVM can't run VMs on its own and is often paired with QEMU to do the actual emulation. From your
lsof
output, QEMU (your VM) is still running.â dsstorefile1
May 8 at 7:39
KVM can't run VMs on its own and is often paired with QEMU to do the actual emulation. From your
lsof
output, QEMU (your VM) is still running.â dsstorefile1
May 8 at 7:39
Sorry for my ambiguous use of the terms... But I made sure in virt-manager, that I stopped all the virtual machines. How can it be that qemu is still running?
â Marc
May 8 at 7:48
Sorry for my ambiguous use of the terms... But I made sure in virt-manager, that I stopped all the virtual machines. How can it be that qemu is still running?
â Marc
May 8 at 7:48
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442480%2fhow-to-switch-between-kvm-and-virtualbox-on-ubuntu-18-04%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
KVM can't run VMs on its own and is often paired with QEMU to do the actual emulation. From your
lsof
output, QEMU (your VM) is still running.â dsstorefile1
May 8 at 7:39
Sorry for my ambiguous use of the terms... But I made sure in virt-manager, that I stopped all the virtual machines. How can it be that qemu is still running?
â Marc
May 8 at 7:48