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

HostsUpdater.rb:153:in `initialize': Invalid argument @ rb_sysopen #194

Open
JABirchall opened this issue Dec 22, 2020 · 7 comments
Open
Labels

Comments

@JABirchall
Copy link

Getting this error with hostupdater when using Vagrant with VMWare 16 provider

vagrant up
Bringing machine 'hrm' up with 'vmware_workstation' provider...
==> hrm: [vagrant-hostsupdater] Checking for host entries
==> hrm: [vagrant-hostsupdater] Writing the following entries to (C:/WINDOWS/system32/drivers/etc/hosts)
==> hrm: [vagrant-hostsupdater]   192.168.10.10  hrm  # VAGRANT: 214b496165a126bb2dab3d816b625aab (hrm) / C:/Users/owner/Documents/projects/HRM/.vagrant/machines/hrm/vmware_workstation/d51d9ce9-18ac-48bf-9d32-4a22c22315eb/ubuntu-20.04-amd64.vmx
==> hrm: [vagrant-hostsupdater]   192.168.10.10  hrm.test  # VAGRANT: 214b496165a126bb2dab3d816b625aab (hrm) / C:/Users/owner/Documents/projects/HRM/.vagrant/machines/hrm/vmware_workstation/d51d9ce9-18ac-48bf-9d32-4a22c22315eb/ubuntu-20.04-amd64.vmx
C:/Users/owner/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.1/lib/vagrant-hostsupdater/HostsUpdater.rb:153:in `initialize': Invalid argument @ rb_sysopen - C:/Users/owner/AppData/Local/Temp/hosts-C:/Users/owner/Documents/projects/HRM/.vagrant/machines/hrm/vmware_workstation/d51d9ce9-18ac-48bf-9d32-4a22c22315eb/ubuntu-20.04-amd64.vmx.cmd (Errno::EINVAL)
	from C:/Users/owner/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.1/lib/vagrant-hostsupdater/HostsUpdater.rb:153:in `open'
	from C:/Users/owner/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.1/lib/vagrant-hostsupdater/HostsUpdater.rb:153:in `addToHosts'
	from C:/Users/owner/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.1/lib/vagrant-hostsupdater/HostsUpdater.rb:99:in `addHostEntries'
	from C:/Users/owner/.vagrant.d/gems/2.6.6/gems/vagrant-hostsupdater-1.2.1/lib/vagrant-hostsupdater/Action/UpdateHosts.rb:17:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/plugins/commands/up/middleware/store_box_metadata.rb:33:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call'
	from C:/Users/owner/.vagrant.d/gems/2.6.6/gems/vagrant-vmware-desktop-2.1.5/lib/vagrant-vmware-desktop/action_farm.rb:326:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builder.rb:149:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in `block in run'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/busy.rb:19:in `busy'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in `run'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builtin/call.rb:43:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call'
	from C:/Users/owner/.vagrant.d/gems/2.6.6/gems/vagrant-vmware-desktop-2.1.5/lib/vagrant-vmware-desktop/action_farm.rb:159:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call'
	from C:/Users/owner/.vagrant.d/gems/2.6.6/gems/vagrant-vmware-desktop-2.1.5/lib/vagrant-vmware-desktop/action_farm.rb:448:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call'
	from C:/Users/owner/.vagrant.d/gems/2.6.6/gems/vagrant-vmware-desktop-2.1.5/lib/vagrant-vmware-desktop/action_farm.rb:306:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/warden.rb:48:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/builder.rb:149:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in `block in run'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/util/busy.rb:19:in `busy'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/action/runner.rb:89:in `run'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:246:in `action_raw'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:215:in `block in action'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/environment.rb:613:in `lock'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:201:in `call'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/machine.rb:201:in `action'
	from C:/HashiCorp/Vagrant/embedded/gems/2.2.14/gems/vagrant-2.2.14/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'

Process finished with exit code 1
@cgsmith
Copy link
Collaborator

cgsmith commented Dec 22, 2020

What version of vagrant are you running?

@JABirchall
Copy link
Author

JABirchall commented Dec 22, 2020

Latest version 2.2.14 and the latest version of hostupdater
I had to unstinstall it and reinstall it for VMWare 16 support.

Then when i reinstalled the host updater and started a VM it will error out.

It worked fine with the older version before i had to reinstall vagrant. But i cant remeber what version that was, just that it didnt support vmware 16

@cgsmith
Copy link
Collaborator

cgsmith commented Dec 22, 2020

Can you determine what the machine ID of your VM is?

@JABirchall
Copy link
Author

JABirchall commented Dec 22, 2020

Is it this? d51d9ce9-18ac-48bf-9d32-4a22c22315eb

If thats not it, Im using laravel/homestead

@Enchiridion
Copy link

Enchiridion commented Feb 1, 2021

I just updated Vagrant and Vagrant VMware utility, which then required me to update my plugins and now I'm getting the exact same error and stack trace with the latest version.

I was previously using version 1.1.1.160. When I roll back to that version everything works again. I tried 1.2.0 and got the same error as 1.2.1.

Versions:
Vagrant 2.2.14
VMWare 15
vagrant-hostsupdater 1.2.1

@cbirajdar To roll back the plugin to the earlier version, run vagrant plugin install vagrant-hostsupdater --plugin-version 1.1.1.160

@JABirchall
Copy link
Author

Why is this marked wontfix?

@cgsmith
Copy link
Collaborator

cgsmith commented Apr 21, 2021

Because this repo is abandoned. I cannot get full control from Faulk. Best longevity is to fork it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants