Eu tenho uma máquina Ubuntu 17.04 que tem o VirtualBox e o libvirt / kvm-qemu instalados.
Sempre que tento abrir uma caixa do Vagrant com o produtor do VirtualBox, recebo este erro:
$ 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
Existe uma maneira de usar o VirtualBox e o Vagrant quando o kvm-qemu também está presente?
Este é o meu Vagrantfile
:
# -*- 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
Eu não quero usar o provedor libvirt porque ele tem menos caixas, e eu tenho que editar manualmente cada arquivo Vagrantfile que eu uso.
Como posso usar o Vagrant com o VirtualBox quando o VirtualBox e o libvirt / kvm-qemu estão presentes?