Parallels / vagrant-parallels

Vagrant Parallels Provider

Home Page:https://parallels.github.io/vagrant-parallels

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My plugin seems to crash on network configuration

gtestault opened this issue · comments

vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "andreiborisov/macos-catalina"
  config.vm.network "public_network", adapter: "1"
end

ouput:

test_box vagrant up
Bringing machine 'default' up with 'parallels' provider...
==> default: Registering VM image from the base box 'andreiborisov/macos-catalina'...
==> default: Creating new virtual machine as a linked clone of the box image...
==> default: Unregistering the box VM image...
==> default: Setting the default configuration for VM...
==> default: Setting the name of the VM: test_box_default_1634555629720_76891
==> default: Preparing network interfaces based on configuration...
    default: Adapter 0: shared
    default: Adapter 1: bridged
==> default: Clearing any previously set network interfaces...
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: :22
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for Parallels Tools installed on the VM...
==> default: Parallels Tools installed on this VM are outdated! In most cases
==> default: this is fine but in rare cases it can cause things such as shared
==> default: folders to not work properly. If you see shared folder errors,
==> default: please update Parallels Tools within the virtual machine and
==> default: reload your VM.
==> default: Configuring and enabling network interfaces...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
==> default: Destroying unused networking interface...
Traceback (most recent call last):
	107: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
	106: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/machine.rb:201:in `action'
	105: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/machine.rb:201:in `call'
	104: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/environment.rb:614:in `lock'
	103: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/machine.rb:215:in `block in action'
	102: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/machine.rb:246:in `action_raw'
	101: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
	100: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
	 99: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
	 98: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
	 97: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 96: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/call.rb:53:in `call'
	 95: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
	 94: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
	 93: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
	 92: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
	 91: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 90: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	 89: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 88: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
	 87: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 86: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	 85: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 84: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
	 83: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 82: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/call.rb:53:in `call'
	 81: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
	 80: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
	 79: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
	 78: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
	 77: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 76: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	 75: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 74: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/customize.rb:39:in `call'
	 73: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 72: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/box_register.rb:36:in `call'
	 71: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 70: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/prepare_clone.rb:15:in `call'
	 69: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 68: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/prepare_clone_snapshot.rb:36:in `call'
	 67: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 66: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/import.rb:66:in `call'
	 65: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 64: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/box_unregister.rb:32:in `call'
	 63: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 62: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/sane_defaults.rb:24:in `call'
	 61: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 60: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/customize.rb:39:in `call'
	 59: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 58: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	 57: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 56: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/box_check_outdated.rb:23:in `call'
	 55: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 54: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/call.rb:53:in `call'
	 53: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
	 52: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
	 51: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
	 50: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
	 49: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 48: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	 47: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 46: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/call.rb:53:in `call'
	 45: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
	 44: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
	 43: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
	 42: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
	 41: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 40: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	 39: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 38: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/call.rb:53:in `call'
	 37: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `run'
	 36: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/util/busy.rb:19:in `busy'
	 35: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/runner.rb:89:in `block in run'
	 34: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builder.rb:149:in `call'
	 33: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 32: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
	 31: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 30: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/check_shared_interface.rb:13:in `call'
	 29: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 28: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/set_name.rb:48:in `call'
	 27: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 26: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/clear_forwarded_ports.rb:16:in `call'
	 25: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 24: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/provision.rb:80:in `call'
	 23: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 22: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/prepare_forwarded_port_collision_params.rb:35:in `call'
	 21: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 20: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:52:in `call'
	 19: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 18: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/prepare_nfs_valid_ids.rb:12:in `call'
	 17: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 16: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
	 15: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 14: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
	 13: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 12: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/delayed.rb:19:in `call'
	 11: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	 10: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/builtin/synced_folders.rb:87:in `call'
	  9: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	  8: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/prepare_nfs_settings.rb:18:in `call'
	  7: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/action/warden.rb:48:in `call'
	  6: from /Users/gtestault/.vagrant.d/gems/2.7.4/gems/vagrant-parallels-2.2.4/lib/vagrant-parallels/action/network.rb:133:in `call'
	  5: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/guest.rb:43:in `capability'
	  4: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/capability_host.rb:111:in `capability'
	  3: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/lib/vagrant/capability_host.rb:111:in `call'
	  2: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/guests/darwin/cap/configure_networks.rb:24:in `configure_networks'
	  1: from /opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/guests/darwin/cap/configure_networks.rb:24:in `each'
/opt/vagrant/embedded/gems/2.2.18/gems/vagrant-2.2.18/plugins/guests/darwin/cap/configure_networks.rb:25:in `block in configure_networks': undefined method `+' for nil:NilClass (NoMethodError)

Hi @gtestault
This error happens because you use the parameter adapter, which is not documented and is not suppoosed to be used there:

config.vm.network "public_network", adapter: "1"

What's purpose of it in your Vagrantfile configuration?
If you want to select a certain network interface, please use bridge: parameter instead, as described in docs:

Or just try to run without it:

config.vm.network "public_network"