vagrant-vsphere
vagrant-vsphere copied to clipboard
"can't modify frozen String" error on vagrant-vsphere 1.14.0
Problem
Error "can't modify frozen String" when running vagrant up using plugin version 1.14.0
vagrant up aio --debug
console log
INFO interface: info: Bringing machine 'aio' up with 'vsphere' provider...
Bringing machine 'aio' up with 'vsphere' provider...
INFO machine: Calling action: get_state on provider vSphere (new)
INFO interface: Machine: action ["get_state", "start", {:target=>:aio}]
INFO runner: Running action: machine_action_get_state #<Vagrant::Action::Builder:0x0000000003a748d0>
INFO warden: Calling IN action: #<Vagrant::Action::Builtin::HandleBox:0x0000000003c7a558>
INFO handle_box: Machine already has box. HandleBox will not run.
INFO warden: Calling IN action: #<Vagrant::Action::Builtin::ConfigValidate:0x0000000003c5ff50>
INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x0000000003c5ff28>
INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::GetState:0x0000000003c5fed8>
INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::CloseVSphere:0x0000000003c5fe88>
INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::CloseVSphere:0x0000000003c5fe88>
INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::GetState:0x0000000003c5fed8>
INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x0000000003c5ff28>
INFO warden: Calling OUT action: #<Vagrant::Action::Builtin::ConfigValidate:0x0000000003c5ff50>
INFO warden: Calling OUT action: #<Vagrant::Action::Builtin::HandleBox:0x0000000003c7a558>
INFO interface: Machine: action ["get_state", "end", {:target=>:aio}]
INFO batch_action: Enabling parallelization by default.
INFO batch_action: Disabling parallelization because only executing one action
INFO batch_action: Batch action will parallelize: false
INFO batch_action: Starting action: #<Vagrant::Machine:0x00000000036921b8> up {:destroy_on_error=>true, :install_provider=>false, :parallel=>true, :provision_ignore_sentinel=>false, :provision_types=>nil}
INFO machine: Calling action: up on provider vSphere (new)
DEBUG environment: Attempting to acquire process-lock: machine-action-0f22c9a593d0bcd5b320c09e437c621d
DEBUG environment: Attempting to acquire process-lock: dotlock
INFO environment: Acquired process lock: dotlock
INFO environment: Released process lock: dotlock
INFO environment: Acquired process lock: machine-action-0f22c9a593d0bcd5b320c09e437c621d
INFO interface: Machine: action ["up", "start", {:target=>:aio}]
INFO runner: Running action: machine_action_up #<Vagrant::Action::Builder:0x0000000003be82c0>
DEBUG updater: init updater
INFO warden: Calling IN action: #<Vagrant::Action::Builtin::HandleBox:0x0000000002e10df0>
INFO handle_box: Machine already has box. HandleBox will not run.
INFO warden: Calling IN action: #<Vagrant::Action::Builtin::ConfigValidate:0x0000000002d4f6c8>
INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x0000000002d4f678>
INFO warden: Calling IN action: #<Vagrant::Action::Builtin::Call:0x0000000002d4f600>
INFO runner: Running action: machine_action_up #<Vagrant::Action::Builder:0x0000000003ec8f58>
INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::IsCreated:0x0000000003e63f90>
INFO machine: Calling action: get_state on provider vSphere (new)
INFO interface: Machine: action ["get_state", "start", {:target=>:aio}]
INFO runner: Running action: machine_action_get_state #<Vagrant::Action::Builder:0x0000000003e448c0>
INFO warden: Calling IN action: #<Vagrant::Action::Builtin::HandleBox:0x0000000003d6e220>
INFO handle_box: Machine already has box. HandleBox will not run.
INFO warden: Calling IN action: #<Vagrant::Action::Builtin::ConfigValidate:0x0000000003d4d7f0>
INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x0000000003d4d7a0>
INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::GetState:0x0000000003d4d750>
INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::CloseVSphere:0x0000000003d4d700>
INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::CloseVSphere:0x0000000003d4d700>
INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::GetState:0x0000000003d4d750>
INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::ConnectVSphere:0x0000000003d4d7a0>
INFO warden: Calling OUT action: #<Vagrant::Action::Builtin::ConfigValidate:0x0000000003d4d7f0>
INFO warden: Calling OUT action: #<Vagrant::Action::Builtin::HandleBox:0x0000000003d6e220>
INFO interface: Machine: action ["get_state", "end", {:target=>:aio}]
INFO warden: Calling OUT action: #<VagrantPlugins::VSphere::Action::IsCreated:0x0000000003e63f90>
INFO runner: Running action: machine_action_up #<Vagrant::Action::Warden:0x0000000003a644f8>
INFO warden: Calling IN action: #<Proc:0x0000000003c951a0 /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:126 (lambda)>
INFO warden: Calling IN action: #<VagrantPlugins::VSphere::Action::Clone:0x0000000003a64458>
ERROR warden: Error occurred: can't modify frozen String: "vsphere_aio"
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
ERROR warden: Error occurred: can't modify frozen String: "vsphere_aio"
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
ERROR warden: Error occurred: can't modify frozen String: "vsphere_aio"
INFO warden: Beginning recovery process...
INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x0000000002d4f600>
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Recovery complete.
ERROR warden: Error occurred: can't modify frozen String: "vsphere_aio"
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO warden: Beginning recovery process...
INFO warden: Recovery complete.
INFO environment: Released process lock: machine-action-0f22c9a593d0bcd5b320c09e437c621d
INFO environment: Running hook: environment_unload
INFO runner: Running action: environment_unload #<Vagrant::Action::Builder:0x0000000003c71ac0>
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<VagrantPlugins::VSphere::Errors::VSphereError: can't modify frozen String: "vsphere_aio">
ERROR vagrant: can't modify frozen String: "vsphere_aio"
ERROR vagrant: /home/tokhg/.vagrant.d/gems/2.7.6/gems/vagrant-vsphere-1.14.0/lib/vSphere/action/connect_vsphere.rb:25:in `rescue in call'
/home/tokhg/.vagrant.d/gems/2.7.6/gems/vagrant-vsphere-1.14.0/lib/vSphere/action/connect_vsphere.rb:16:in `call'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builder.rb:180:in `call'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `block in run'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/util/busy.rb:19:in `busy'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `run'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/machine.rb:248:in `action_raw'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/machine.rb:217:in `block in action'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/environment.rb:631:in `lock'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/machine.rb:203:in `call'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/machine.rb:203:in `action'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
INFO interface: error: can't modify frozen String: "vsphere_aio"
can't modify frozen String: "vsphere_aio"
INFO interface: Machine: error-exit ["VagrantPlugins::VSphere::Errors::VSphereError", "can't modify frozen String: \"vsphere_aio\""]
Using
- vagrant 2.3.0
- ubuntu 20.04
Workaround #1 (downgrade)
downgrade plugin back to last working version
vagrant plugin install vagrant-vsphere --plugin-version 1.13.5
Workaround #2 (set name; thanks to @tmarshall93)
Vagrant.configure("2") do |config|
config.vm.hostname = 'dummy'
...
config.vm.provider :vsphere do |vsphere|
vsphere.name = config.vm.hostname
...
also running into this issue on provider version 1.14.0 when not giving a vm name. Specifying a name works