Closed apancutt closed 8 years ago
The first issue no longer applies when using VirtualBox 5.0.0
The second issue still exists - the hosts file on Windows does not update and forces an error.
The /tmp/hosts
path resolves to C:\tmp\hosts
which is a directory, containing one file hosts.windows
.
Manually running the command in Powershell reproduces the error:
PS C:\Users\vagrant> mv -force /tmp/hosts C:\Windows\System32\drivers\etc\hosts
mv : Cannot create a file when that file already exists.
At line:1 char:1
+ mv -force /tmp/hosts C:\Windows\System32\drivers\etc\hosts
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (C:\tmp\hosts:DirectoryInfo) [Move-Item], IOException
+ FullyQualifiedErrorId : MoveDirectoryItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand
However, changing the source path to /tmp/hosts/host.windows
works:
PS C:\Users\vagrant> mv -force /tmp/hosts/hosts.windows C:\Windows\System32\drivers\etc\hosts
PS C:\Users\vagrant> echo $?
True
Can you please try and reproduce? This should be resolved.
Apologies, I should have reported that the issue has since been resolved. I'll admit it's been a while so not sure whether it was a Vagrant or hostmanager upgrade that fixed the issue. Either way, thanks!
Running Vagrant 1.7.4 and vagrant-hostmanager 1.6.0
Multi-machine setup (one named "linux", the other "windows). When trying to run
vagrant up
I get the following error:This suggests the plugin is trying to update the hosts file on the
windows
machine which has not booted yet - it boots after thelinux
machine.A subsequent run of
vagrant up
(orvagrant hostmanager
) successfully updates thelinux
hosts file, but fails to updatewindows
with another error:Note that both problems disappear if I roll back to Vagrant 1.6.5.