Vagrant: Vagrant up (1.9.5) not running on WSL

Created on 20 May 2017  ยท  8Comments  ยท  Source: hashicorp/vagrant

First of all, thanks for adding support for WSL, it's really helpful. But unfortunately for some reason vagrant up is not working. Other commands are running as expected. For example, vagrant ssh is working and using WSL's ssh client.

Vagrant version

1.9.5 on both Windows and WSL

Host operating system

Windows 10 Home + WSL (Ubuntu on Bash on Windows)

Guest operating system

Ubuntu 16.04 (ubuntu/xenial64)

Vagrantfile

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/xenial64"

  config.vm.network "forwarded_port", guest: 8000, host: 8001

  config.vm.synced_folder ".", "/home/ubuntu/project"

  config.vm.provision "shell", path: "install.sh", privileged: false

end

Also, VAGRANT_WSL_ENABLE_WINDOWS_ACCESS is set to 1.

Debug output

https://gist.github.com/587a3b20ad9b424bb5390fc60ca8ba7a

Expected behavior

vagrant up should work on WSL

Actual behavior

vagrant up is only working on Windows Powershell (didn't tested on other terminals yet). Other commands (likevagrant ssh, vagrant halt, vagrant destroy and vagrant box update) are working normally.

Steps to reproduce

  1. Access WSL bash (for example, opening Powershell and running bash.exe)
  2. Go to your project's folder
  3. Set VAGRANT_WSL_ENABLE_WINDOWS_ACCESS to 1
  4. Try running vagrant up
WSL hoswindows providevirtualbox

Most helpful comment

After further investigations, I found out what was the problem. For some reason, the path to the Serial Port log is not being converted to a Windows path, thus resulting in an error when powering on a VM provisioned by VirtualBox. Here is the gist with the error: https://gist.github.com/mmarchini/d9594997f385953e0585d13968254a8b

I'm working on a fix for this problem and I'll try to submit a PR with the fix until the end of next week.

If someone else is experiencing this problem, here is a quick workaround. Just add the following to your Vagrantfile:

config.vm.provider "virtualbox" do |vb|
  vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ]
end

All 8 comments

@mmarchini Please provide a gist of the output with the --debug flag. Thanks!

After further investigations, I found out what was the problem. For some reason, the path to the Serial Port log is not being converted to a Windows path, thus resulting in an error when powering on a VM provisioned by VirtualBox. Here is the gist with the error: https://gist.github.com/mmarchini/d9594997f385953e0585d13968254a8b

I'm working on a fix for this problem and I'll try to submit a PR with the fix until the end of next week.

If someone else is experiencing this problem, here is a quick workaround. Just add the following to your Vagrantfile:

config.vm.provider "virtualbox" do |vb|
  vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ]
end

Closing as this seems to have been a box specific issue. Cheers!

Hi @mmarchini did you make any PR?
I am currently facing this same problem and was wondering about it.

Thanks!

After further investigations, I found out what was the problem. For some reason, the path to the Serial Port log is not being converted to a Windows path, thus resulting in an error when powering on a VM provisioned by VirtualBox. Here is the gist with the error: https://gist.github.com/mmarchini/d9594997f385953e0585d13968254a8b

I'm working on a fix for this problem and I'll try to submit a PR with the fix until the end of next week.

If someone else is experiencing this problem, here is a quick workaround. Just add the following to your Vagrantfile:

config.vm.provider "virtualbox" do |vb|
  vb.customize [ "modifyvm", :id, "--uartmode1", "disconnected" ]
end

I haven't, ended up switching back to Linux instead.

Just to comment that I faced exactlly same problem (and applied same temporal solution) with the box ubuntu/bionic64.

With the "temporal fix" of disabling the serial port everything is working perfect.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StefanScherer picture StefanScherer  ยท  3Comments

lebogan picture lebogan  ยท  3Comments

OtezVikentiy picture OtezVikentiy  ยท  3Comments

jazzfog picture jazzfog  ยท  3Comments

hesco picture hesco  ยท  3Comments