-
Notifications
You must be signed in to change notification settings - Fork 148
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
no update on Windows host #178
Comments
Please provide your entire Vagrantfile, excluding any secrets. |
i have similiar problem the hosts file on windows is not being updated here my vagrant file:
The host file on windows only being updated when i run
Is it really necessary to run that command? I thought the configuration should handle that automatically..Please help, i have been pulling my hair for weeks now |
Mine don´t update even running vagrant hostmanager |
Here's the vagrant hostmanager --debug output. https://gist.github.com/killua99/2a5243e8dc7daf1d60c9ac2e6974371f Hope it can help to solve this issue. |
I have given up on the stock solution and am using a custom resolver, I hope this helps some people:
Don't shoot me for the shoddy scripting, after banging my head against the wall for a few hours, this is the best I could come up with and you can easily adapt it to suit your needs, you will not find any other working example for Windows with vagrant-hostmanager. You can find my full Vagrantfile in #200. |
I also have this problem.... I know this is closed but this might help people create a solution to this problem. I realised that the issue for me was with the read-only attribute remained when the ruby FileUtils.cp was used. A simple fix seems to be compounded by the fact that win32ole acts asynchronously and ruby just continues before it has completed - so you cannot safely alter a files attributes using Ruby before and back again after the win32ole action e.g. if you want to xcopy the hosts.local to hosts as read-only. The patch (not fully tested) is below. The main difference is ensuring the hosts.local has the read-only attribute turned off, and that xcopy is used to copy the file back to the read-only hosts file (and then ensure it is read-only after this action for security reasons.)
NOTE:
PS Just discovered an alternative to win32ole using system (which I believe is synchronous so might be useful when you need the copy to finish before continuing...). Try this as a .rb with the the source as your hosts file :
|
Hi
i try it on 3 different Windows hosts:
Windows 7, Windows 8 and Windows 10
I have absolutely no clue what is wrong. plz help
Vagrant 1.7.4 or Vagrant 1.8.1
config.vm.hostname = "myhost.local"
config.vm.network "private_network", ip: "192.168.33.63"
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.manage_guest = false
config.hostmanager.ignore_private_ip = false
The text was updated successfully, but these errors were encountered: