-
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
Vagrant up fails with VERR_PATH_NOT_FOUND #8275
Comments
The error happens because when set_name (https://github.com/mitchellh/vagrant/blob/master/plugins/providers/virtualbox/action/set_name.rb#L12) is executed by VirtualBox the folder name is changed, but not the hard drive location. When booting, VirtualBox is looking for the hard drive in the old location. I think the fix is to not do the rename at all, instead set the name correctly in the import function (https://github.com/mitchellh/vagrant/blob/master/plugins/providers/virtualbox/driver/version_5_1.rb#L290) |
I'm not good with Ruby, but I wrote a patch that worked for me |
Have almost the same issue. Some details to reproduce:
Vagrant is trying to find the image file at "F:\ubuntu-18.04-amd64_1530171093901 _63417" whereas the real path that was created at that moment was "F:\homestead-7".
|
Hasn't it been fixed yet? I have the same issue today. I could not apply the patch by @vzlatkin because Vagrant has moved some code from I hope this patch will be integrated into Vagrant. |
Running Vagrant 2.1.5, VirtualBox 5.2.18 r124319 (Qt5.6.2), one Windows 10, having the same issue. Makes Vagrant unusable.
Can't even start in VirtualBox as the disks aren't configured correctly. |
To fix it I had to remove the incorrectly mapped disk images from the VM in Virtualbox AND go into |
I'm having the same issue currently, and a workaround I found was to set VirtualBox's Default Machine Folder to a subdirectory instead of just the root of the drive (i.e. "V:/VirtualBox-VMs" instead of just "V:/"). Configuration I installed VirtualBox 5.2.22 r126460 (Qt 5.6.2) and Vagrant 2.2.2 to their default paths on the C:/ drive on Windows 10 Pro (10.0.17763 Build 17763). I have another SSD mounted at V: that I want to use for storing both the VAGRANT_HOME (.vagrant.d) and VirtualBox disks that Vagrant spins up. Steps to Duplicate Issue
The output should look similar to this:
Observations What's interesting is that the actual directory that is made in V: does not match the directory listed in the VBoxManage.exe error. The directory created in V: is named something like "vagrant_default_1543771898753_35470", but the directory in the error is "precise64_1543771898753_84633". If I rename the "vagrant_default_1543771898753_35470" directory to the path VBoxManage.exe is looking for (i.e. "precise64_1543771898753_84633"), I can run Workaround I ended up finding out that if you just change the Default Machine Folder to include a subdirectory, everything works. For example, I updated my Default Machine Folder in VirtualBox to "V:/VirtualBox-VMs" and then ran The directory Vagrant created within V:/VirtualBox-VMs was named "precise64[...]" during initial creation, but before it starts the VM it gets renamed to the correct folder name (ex. "vagrant_default_1543772386536_35470") and boots. My Thoughts My guess is that something within Vagrant's code is preventing the initial directory it creates from being renamed when it's at the root of a drive. I can see that VirtualBox correctly renames the VM in its GUI, but the path being provided by Vagrant to VirtualBox to load the VM doesn't get updated properly. Hopefully a fix for this can be found by someone much more knowledgeable with Vagrant's source code, but for now I'm just going to stick to having my VirtualBox VMs run out of a subdirectory on my secondary drive. |
Vagrant version
1.9.1
VirtualBox Version 5.0.16 r105871
Host operating system
Win 7
Guest operating system
"bento/centos-6.7"
Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "bento/centos-6.7"
end
Debug output
"C:\Program Files (x86)\Vagrant\bin\vagrant.exe" up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/centos-6.7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/centos-6.7' is up to date...
==> default: Setting the name of the VM: test_default_1486795217911_74334
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
There was an error while executing
VBoxManage
, a CLI used by Vagrantfor controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "bb224770-6840-4e03-abea-ae130b4656d0", "--type", "headless
"]
Stderr: VBoxManage.exe: error: Could not open the medium 'V:\centos-6.7-x86_64_
1486795199760_44200\centos-6.7-x86_64-disk1.vmdk'.
VBoxManage.exe: error: VD: error VERR_PATH_NOT_FOUND opening image file 'V:\cen
tos-6.7-x86_64_1486795199760_44200\centos-6.7-x86_64-disk1.vmdk' (VERR_PATH_NOT_
FOUND)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MediumWrap,
interface IMedium
Expected behavior
VirtualBox should have been created
Actual behavior
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component MediumWrap, interface IMedium
Steps to reproduce
References
The reason this fails is because V:\centos-6.7-x86_64_1486795199760_44200\centos-6.7-x86_64-disk1.vmdk' is the path BEFORE rename of the virtual box. After this command is executed, "==> default: Setting the name of the VM: test_default_1486795217911_74334" this path is no longer correct.
The text was updated successfully, but these errors were encountered: