vagrant icon indicating copy to clipboard operation
vagrant copied to clipboard

vagrant up fails on Windows with Virtualbox

Open aka-mj opened this issue 3 years ago • 10 comments

Vagrant version

2.3.0

Host operating system

Windows 10

Guest operating system

Ubuntu, box generic/ubuntu2004

Vagrantfile

$default_network_interface = `ip route | awk '/^default/ {printf "%s", $5}'`

Vagrant.configure("2") do |config|
  config.vm.box = "generic/ubuntu2004"

  config.vm.network "forwarded_port", guest: 9000, host: 9001
  config.vm.network "forwarded_port", guest: 514, host: 9514

  config.vm.network "public_network", bridge: "#$default_network_interface"

  config.vm.synced_folder "data", "/vagrant"
  config.vm.synced_folder "utils", "/utils"

  config.vm.provider "virtualbox" do |vb|
    vb.name = "ubuntu-graylog"
    vb.memory = 2048
    vb.cpus = 2
  end
end

Debug output

https://gist.github.com/dangerousHobo/85c894c713fdf877c83796831c90d3da

Expected behavior

To boot Ubuntu

Actual behavior

See gist for error

Steps to reproduce

  1. vagrant up

aka-mj avatar Sep 14 '22 18:09 aka-mj

VirtualBox version is 6.1.38

aka-mj avatar Sep 15 '22 13:09 aka-mj

I found if I run the VM without the headless option it starts successfully. It seems Windows doesn't like the --type to be headless.

Fails:

C:/Program Files/Oracle/VirtualBox/VBoxManage.exe startvm 5eff5f98-c7f2-4370-a5cf-d5ffd21c1211 --type headless

Starts:

C:/Program Files/Oracle/VirtualBox/VBoxManage.exe startvm 5eff5f98-c7f2-4370-a5cf-d5ffd21c1211

aka-mj avatar Sep 22 '22 11:09 aka-mj

I'm having this exact issue also, also a colleagues of mine too.

https://gist.github.com/skeeith/7a99c1308af668250e0523455798c403

I also checked my vagrant up --debug command , --type headless is causing the issue

OS: Windows 11 Vagrant: v.2.3.0 Virtual Box: v6.1.38

skeeith avatar Oct 02 '22 17:10 skeeith

@dangerousHobo have you found any solution? besides on removing the --type headless? like overriding the vagrant up command

This is really a disturbing bug

skeeith avatar Oct 02 '22 17:10 skeeith

Hi there. This issue has come up in the past and is generally related to antivirus software or a bad install of virtualbox on the host.

chrisroberts avatar Oct 03 '22 17:10 chrisroberts

@chrisroberts that's really weird cause I've been using this for the past 5 years and I haven't encountered this before in the last few years. I've also been using the same anti-virus software (Eset) for the past 7 years too. I'm also sure that Virtual Box is installed properly too, but maybe could you take a look at this? just to be sure?

Is it possible does the box have an issues but I doubt it's the box? my box is Laravel/Homestead v12.2.0, since I was using v12.0.0 I didn't have this issue before, it only came up when I upgraded my box to v12.2.0

Also, maybe the issue is Virtual Box v6.1.38? I recall I upgraded my Virtual Box the same time I upgraded my box Laravel/Homestead, BUT I also had fresh Vagrant and fresh Vagrant Box installed on a newly reformatted Windows 11 and still have the same issue.

so I'm guessing the issue is actually Virtual Box v6.1.38?

skeeith avatar Oct 04 '22 04:10 skeeith

@chrisroberts btw I can also recall enabling Windows Security -> Device Security -> Core Isolation

Core Isolation - Security features available on your device that use virtualization-based security.

Memory Integrity - Prevents attacks from inserting malicious code into high-security processes ON.

Does this affect it?

skeeith avatar Oct 04 '22 04:10 skeeith

@dangerousHobo have you tried downgrading Virtual Box? I'm planning to downgrade Virtual Box to see if this fixes the issue

skeeith avatar Oct 07 '22 03:10 skeeith

@chrisroberts I uninstalled my Eset Anti-virus application and uninstalled Virtual Box v6.1.40 and Vagrant v2.3.1

Restarted my laptop and installed Virtual Box v6.1.40 and Vagrant v2.3.1, still not working properly.

something is really wrong here.

skeeith avatar Oct 16 '22 09:10 skeeith

@chrisroberts btw I can also recall enabling Windows Security -> Device Security -> Core Isolation

Core Isolation - Security features available on your device that use virtualization-based security.

Memory Integrity - Prevents attacks from inserting malicious code into high-security processes ON.

Does this affect it?

@chrisroberts @dangerousHobo confirmed this is the configuration that's causing the issue, can you guys look into this one?

turning this ON will cause issues on booting up your VM.

skeeith avatar Oct 16 '22 10:10 skeeith

Closing this to track underlying issue in #12955

chrisroberts avatar Nov 18 '22 01:11 chrisroberts