Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vagrant with virtualbox on wsl VERR_PATH_NOT_FOUND

I try to run vagrant from wsl :

Windows 10 Pro Version 1703 Build 15063.540

Ubuntu 16.04.2 LTS

vagrant version : 1.9.7

Virtualbox version : 5.1.26r117224

add to my bachrc

export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"

and i have added the virtualbox to path in windows

enter image description here

on run vagrant up i got this error

Stderr: VBoxManage.exe: error: RawFile#0 failed to create the raw output file /mnt/d/Projects/GOPATH/src/github.com/hyperledger/Fabric/devenv/ubuntu-xenial-16.04-cloudimg-console.log (VERR_PATH_NOT_FOUND)

if i try to start the vm from Virtualbox directly

Failed to open a session for the virtual machine hyperledger.

RawFile#0 failed to create the raw output file /mnt/d/Projects/GOPATH/src/github.com/hyperledger/Fabric/devenv/ubuntu-xenial-16.04-cloudimg-console.log (VERR_PATH_NOT_FOUND).

Result Code: E_FAIL (0x80004005) Component: ConsoleWrap Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

enter image description here

like image 603
Sadok Avatar asked Aug 19 '17 16:08

Sadok


People also ask

Does vagrant work with WSL?

Recent versions of Windows 10 now include Windows Subsystem for Linux (WSL) as an optional Windows feature. The WSL supports running a Linux environment within Windows. Vagrant support for WSL is still in development and should be considered beta.

Can I run VirtualBox and WSL at the same time?

Will I be able to run WSL 2 and other 3rd party virtualization tools such as VMware, or VirtualBox? Some 3rd party applications cannot work when Hyper-V is in use, which means they will not be able to run when WSL 2 is enabled, such as VMware and VirtualBox.

Is vagrant the same as VirtualBox?

VirtualBox is basically inception for your computer. You can use VirtualBox to run entire sandboxed operating systems within your own computer. Vagrant is software that is used to manage a development environment.


2 Answers

I have found the solution

it to add

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

to the vagrant file

https://github.com/mitchellh/vagrant/issues/8604

However, you may also do this via the VirtualBox UI as shown here, i.e. the "disconnected" as shown will accomplish the same thing. vb.customize - the .customize will not work for some vagrant versions.

enter image description here

like image 104
Sadok Avatar answered Oct 01 '22 18:10

Sadok


I resolved same issue by turning off the serial port in the virtualbox configuration.

If you need the serial port, you can leave it enabled but change the log file path to match your filesystem

like image 30
Daniel Garmoshka Avatar answered Sep 29 '22 18:09

Daniel Garmoshka