-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use already existing disk using file. #12643
Comments
I'm also having this issue. Vagrant versionVagrant 2.2.19 Host operating systemWindows, using vagrant installed in WSL and Virtualbox installed in Windows (using setup reference from this thread) Guest operating systemLinux Vagrantfile
Debug output
EDIT: my steps to get to this error is do |
The same issue happens when trying from my WSL home directory, instead of my windows home directory. Notice the path change from
|
I believe here is the problem: vagrant/plugins/providers/virtualbox/cap/configure_disks.rb Lines 129 to 133 in 5b501a3
When checking if a disk already exists, vagrant checks if the directory of the default disk location and the current disk location match. In WSL this fails, because the default disk location begins with
I was able to get the VM to accept the existing disk by (manually) updating the disk location in VirtualBox to use the I am thinking the root of the issue happens when the additional disk is first created here: vagrant/plugins/providers/virtualbox/cap/configure_disks.rb Lines 251 to 258 in 5b501a3
Looks like when an additional disk is first created, the directory is selected based on the location of the CfgFile, which Windows VirtualBox will create beginning with I've not contributed to this project before, but I will try my hand at setting up a dev environment and maybe submit a PR. |
Please note that the Vagrant issue tracker is in priority reserved for bug reports and enhancements. For general usage questions, please use
HashiCorp Discuss: https://discuss.hashicorp.com/c/vagrant/24 Thank you!
When submitting a bug report, please provide the minimal configuration and required information necessary to reliably reproduce the issue. It
should include a basic Vagrantfile that only contains settings to reproduce the described behavior.
Tip: Before submitting your issue, don't hesitate to remove the above introductory text, possible empty sections (e.g. References), and this tip.
Vagrant version
2.2.18
Host operating system
Windows
Guest operating system
Linux
Vagrantfile
Debug output
Expected behavior
Utlize already existing vdi disk instead of creating a new one.
Actual behavior
Created a new disk
The text was updated successfully, but these errors were encountered: