goodhosts / vagrant

Vagrant plugin that use goodhosts to manipulate hosts files
https://rubygems.org/gems/vagrant-goodhosts/
MIT License
17 stars 8 forks source link

Make goodhosts really work with Hyper-V #52

Closed YouJiacheng closed 1 year ago

YouJiacheng commented 1 year ago

Really solve #40 , use read_guest_ip to handle Hyper-V with dynamic IP. Original @machine.config.vm.provider :hyperv do ... end's block is never executed since provider configuration blocks are only possible to be executed in a very early stage(far before VM boot, while goodhosts is triggered after VM up, and read_guest_ip need a booted VM), and its read_guest_ip usage is incorrect(Hyper-V driver's read_guest_ip accept 0 argument).

Also:

Mte90 commented 1 year ago

I am ok for this PR but I cannot do any test for hyper-v as I don't have any windows machine.

What do you think @tomjn to me the code is fine as we are just prepending everything.

Mte90 commented 1 year ago

New release avalaible :-)