Skip to content

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

Open
@JABirchall

Description

@JABirchall

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions