I have an Ubuntu 17.04 machine that has both VirtualBox and libvirt/kvm-qemu installed.
Whenever I try to bring up a Vagrant box with the VirtualBox prodiver, I get this error:
$ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'ubuntu/xenial64'... ==> default: Matching MAC address for NAT networking... ==> default: Checking if box 'ubuntu/xenial64' is up to date... ==> default: A newer version of the box 'ubuntu/xenial64' is available! You currently ==> default: have version '20170626.0.0'. The latest is version '20170717.0.0'. Run ==> default: `vagrant box update` to update. ==> default: Setting the name of the VM: mainframe_default_1500383484218_22222 ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2: hostonly ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["startvm", "ab19fdfd-349e-40d0-b540-aa130b9e1b72", "--type", "headless"] Stderr: VBoxManage: error: VT-x is being used by another hypervisor (VERR_VMX_IN_VMX_ROOT_MODE). VBoxManage: error: VirtualBox can't operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
Is there a way to use VirtualBox and Vagrant when kvm-qemu is also present?
This is my
# -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.vm.network "private_network", ip: "192.168.66.10" config.vm.provision "ansible" do |ansible| ansible.playbook = 'playbook.yml' end end
I don't want to use the libvirt provider because it has less boxes, and I have to manually edit every Vagrantfile I use.
How can I use Vagrant with VirtualBox when both VirtualBox and libvirt/kvm-qemu are present?