hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.02k stars 4.42k forks source link

Please support virtualbox-kvm on Linux #13355

Open VanNostrand opened 4 months ago

VanNostrand commented 4 months ago

On https://github.com/cyberus-technology/virtualbox-kvm there is a patch for the VirtualBox code that allows Virtualbox to use KVM on Linux. It is a pre-release but works quite well - except in combination with Vagrant there are some issues:

The provider 'virtualbox' that was requested to back the machine
'default' is reporting that it isn't usable on this system. The
reason is shown below:

VirtualBox is complaining that the kernel module is not loaded. Please
run `VBoxManage --version` or open the VirtualBox GUI to see the error
message which should contain instructions on how to fix this error.
The new KVM backend utilizes the --driverless mode of VirtualBox. Some setups that require kernel module support will not work in this mode and prevent the VM from starting. Specifically, the Bridged adapter and "NAT Network" modes do not work. Only regular NAT is easily supported. More complex setups will need manual configuration, e.g., using tun/tap devices.

Vagrant version

Vagrant 2.4.0

Host operating system

Gentoo Linux with kernel 6.7

Guest operating system

The official opensuse/Leap-15.5.x86_64 from vagrant cloud

Vagrantfile

Vagrant.configure("2") do |config|

  config.vm.box = "opensuse/Leap-15.5.x86_64"
  config.vm.hostname = "seminar"

  config.vm.network "public_network", bridge: "eth0"

  config.vm.provider "virtualbox" do |vb|
     vb.gui = true
  end

  # that just installs packages, it is active in my Vagrantfile but irrelevant for this issue:
  #config.vm.provision "bootstrap", type: "shell", inline: "/vagrant/bootstrap.sh"
end