Skip to content
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

Cannot find path 'C:\tmp\hosts\hosts.agent2' because it does not exist. #228

Open
pearcec opened this issue Mar 10, 2017 · 0 comments
Open

Comments

@pearcec
Copy link

pearcec commented Mar 10, 2017

The code for Windows is broken when it comes to move the hosts file in place.

https://github.com/devopsgroup-io/vagrant-hostmanager/blob/master/lib/vagrant-hostmanager/hosts_file/updater.rb#L43

==> agent2: Mounting shared folders...
    agent2: /vagrant => C:/Users/user/Documents/projects/vagrant-puppet4-oss
==> agent2: Updating /etc/hosts file on active guest machines...
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mv -force /tmp/hosts/hosts.agent2 C:\Windows\System32\drivers\etc\hosts

Stdout from the command:



Stderr from the command:

Cannot find path 'C:\tmp\hosts\hosts.agent2' because it does not exist.
At line:1 char:1
+ mv -force /tmp/hosts/hosts.agent2 C:\Windows\System32\drivers\etc\hosts
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\tmp\hosts\hosts.agent2:String) [Move-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.MoveItemCommand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant