mitchellh / vagrant-google

Vagrant provider for GCE.
Apache License 2.0
334 stars 100 forks source link

NoMethodError in run_instance #234

Open scottbrumley opened 4 years ago

scottbrumley commented 4 years ago

Kind of at my wits end here. No matter what I do I get this message.

/home/someuser/.vagrant.d/gems/2.4.9/gems/vagrant-google-2.5.0/lib/vagrant-google/action/run_instance.rb:108:in call': undefined methodself_link' for nil:NilClass (NoMethodError)

Temikus commented 4 years ago

So this failed here:

image = env[:google_compute].images.get(image, image_project_id).self_link

This means that the image specified could probably not be found. Can I have your Vagrantfile to look at? You can remove anything you deem proprietary, I'm just interested what you've put into image and image_project_id config, if anything.

scottbrumley commented 4 years ago

Vagrant.configure("2") do |config| config.vm.box = "google/gce"

config.vm.provider :google do |google, override| google.google_project_id = "Palo-Cortex-XDR" google.google_json_key_location = "/Users/blah/Documents/bla/bla.json"

google.image_family = 'ubuntu-1804-lts'

# Override provider defaults
google.name = "testing-vagrant"
#google.image = "debian-9-stretch-v20180611"

google.machine_type = "n1-standard-1"
google.zone = "us-east1-b"
google.metadata = {'custom' => 'metadata', 'testing' => 'foobarbaz'}
google.tags = ['vagrantbox', 'dev']

override.ssh.username = "blah"
override.ssh.private_key_path = "~/.ssh/id_rsa"
#override.ssh.private_key_path = "~/.ssh/google_compute_engine"

end

end

I've tried numerous things. Used glcoud to list image names. Even tried you default.

fabiomarinetti commented 4 years ago

I ran with similar Vagrantfile as @scottbrumley:

Vagrant.configure("2") do |config|
  config.vm.box = "gce"
  config.vm.provider :google do |google, override|
    google.google_project_id = "ansible-swarm"
    google.google_json_key_location = "~/secret-key.json"
    # Define the name of the instance.
    google.name = "devel"
    # Set the zone where the instance will be located. To find out available zones:
    # `gcloud compute zones list`.
    google.zone = "us-east1-c"
    # Set the machine type to use. To find out available types:
    # `gcloud compute machine-types list --zone asia-east1-c`.
    google.machine_type = "f1-micro"
    # Set the machine image to use. To find out available images:
    # `$ gcloud compute images list`.
    google.image = "centos-7-v20200309"
    google.image_project_id = "centos-cloud"
#    google.image_family = 'centos-7'
    override.ssh.username = "chao"
    override.ssh.private_key_path = "~/.ssh/id_rsa"
  end
end

I both tried by specifying image_family and image but I got same error. Running with debug flag I see these errors during run:

ERROR warden: Error occurred: forbidden: Required 'compute.diskTypes.get' permission for 'projects/ansible-swarm/zones/us-east1-c/diskTypes/pd-standard'
 INFO warden: Beginning recovery process...
 INFO warden: Recovery complete.
ERROR warden: Error occurred: forbidden: Required 'compute.diskTypes.get' permission for 'projects/ansible-swarm/zones/us-east1-c/diskTypes/pd-standard'

and finally

 INFO runner: Running action: environment_unload #<Vagrant::Action::Builder:0x00000000069f3d68>
/root/.vagrant.d/gems/2.4.9/gems/google-api-client-0.23.9/lib/google/apis/core/http_command.rb:218:in `check_status': forbidden: Required 'compute.diskTypes.get' permission for 'projects/ansible-swarm/zones/us-east1-c/diskTypes/pd-standard' (Google::Apis::ClientError)
        from /root/.vagrant.d/gems/2.4.9/gems/google-api-client-0.23.9/lib/google/apis/core/api_command.rb:116:in `check_status'
        from /root/.vagrant.d/gems/2.4.9/gems/google-api-client-0.23.9/lib/google/apis/core/http_command.rb:183:in `process_response'
        from /root/.vagrant.d/gems/2.4.9/gems/google-api-client-0.23.9/lib/google/apis/core/http_command.rb:299:in `execute_once'
        from /root/.vagrant.d/gems/2.4.9/gems/google-api-client-0.23.9/lib/google/apis/core/http_command.rb:104:in `block (2 levels) in execute'
        from /root/.vagrant.d/gems/2.4.9/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
        from /root/.vagrant.d/gems/2.4.9/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
        from /root/.vagrant.d/gems/2.4.9/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
        from /root/.vagrant.d/gems/2.4.9/gems/google-api-client-0.23.9/lib/google/apis/core/http_command.rb:101:in `block in execute'
        from /root/.vagrant.d/gems/2.4.9/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
        from /root/.vagrant.d/gems/2.4.9/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
        from /root/.vagrant.d/gems/2.4.9/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
        from /root/.vagrant.d/gems/2.4.9/gems/google-api-client-0.23.9/lib/google/apis/core/http_command.rb:93:in `execute'
        from /root/.vagrant.d/gems/2.4.9/gems/google-api-client-0.23.9/lib/google/apis/core/base_service.rb:360:in `execute_or_queue_command'
        from /root/.vagrant.d/gems/2.4.9/gems/google-api-client-0.23.9/generated/google/apis/compute_v1/service.rb:2031:in `get_disk_type'
        from /root/.vagrant.d/gems/2.4.9/gems/fog-google-1.9.1/lib/fog/compute/google/requests/get_disk_type.rb:12:in `get_disk_type'
        from /root/.vagrant.d/gems/2.4.9/gems/vagrant-google-2.5.0/lib/vagrant-google/action/run_instance.rb:331:in `get_disk_type'
        from /root/.vagrant.d/gems/2.4.9/gems/vagrant-google-2.5.0/lib/vagrant-google/action/run_instance.rb:138:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /root/.vagrant.d/gems/2.4.9/gems/vagrant-google-2.5.0/lib/vagrant-google/action/warn_ssh_keys.rb:28:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /root/.vagrant.d/gems/2.4.9/gems/vagrant-google-2.5.0/lib/vagrant-google/action/warn_networks.rb:28:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/synced_folders.rb:87:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/provision.rb:80:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:121:in `block in finalize_action'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builder.rb:116:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `block in run'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/util/busy.rb:19:in `busy'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `run'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/call.rb:53:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /root/.vagrant.d/gems/2.4.9/gems/vagrant-google-2.5.0/lib/vagrant-google/action/connect_google.rb:45:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/box_check_outdated.rb:36:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/after_trigger.rb:26:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builtin/before_trigger.rb:23:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/warden.rb:50:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/builder.rb:116:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `block in run'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/util/busy.rb:19:in `busy'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/action/runner.rb:102:in `run'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/machine.rb:238:in `action_raw'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/machine.rb:209:in `block in action'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/environment.rb:613:in `lock'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/machine.rb:195:in `call'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/machine.rb:195:in `action'
        from /opt/vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'

I verified my user has the needed permissions.

Can you help on this?

Temikus commented 4 years ago

@scottbrumley Your Vagrantfile looks correct, I have been able to launch a machine with it. Can you provide full output of vagrant up --debug ? This should give me a bit more info where to put debugging points and hopefully we can get to the bottom of this.

@fabiomarinetti Perhaps the permissions are locked down on the organisation level somehow? You should be able to verify whether it's vagrant or something with your service account by making a direct call to the api like so:

$ gcloud auth activate-service-account --key-file=/full/path/to/your/key.json
$ alias gcurl='curl -H "Authorization: Bearer $(gcloud auth print-access-token)"'
$ gcurl https://compute.googleapis.com/compute/v1/projects/ansible-swarm/zones/us-east1-c/diskTypes/pd-standard
BirkhoffLee commented 4 years ago

Same here.

Vagrant.configure("2") do |config|
  config.vm.box = "google/gce"

  config.vm.provider :google do |google, override|
    google.google_project_id = "vagrant-playground"
    google.google_json_key_location = "./gce.json"

    google.image_family = 'centos-7'
    google.zone = 'asia-east1-b'
    google.machine_type = 'g1-small'

    override.ssh.username = "vagrant"
    override.ssh.private_key_path = "~/.ssh/id_ed25519"
  end

end

Update: It was because I used wrong service account for the project.

Temikus commented 4 years ago

@BirkhoffLee Can you tell me which permissions you were lacking? Perhaps we can add better error messages here.

BirkhoffLee commented 4 years ago

I had two projects A and B, I specified to use project B in this plugin but I used project A’s service account credentials in the config.

karlarao commented 3 years ago

@BirkhoffLee Can you tell me which permissions you were lacking? Perhaps we can add better error messages here.

I experienced this "NoMethodError in run_instance" issue and fixed it by adding "compute admin" on my service account. By the way, this is just my test environment so use a subset of this role on prod.

Initially I was having this error when accessing the API. I agree that there should be a more descriptive error message on permission issue.

gcurl https://compute.googleapis.com/compute/v1/projects/ansible-swarm/zones/us-east1-c/diskTypes/pd-standard
{
  "error": {
    "code": 403,
    "message": "Required 'compute.diskTypes.get' permission for 'projects/ansible-swarm/zones/us-east1-c/diskTypes/pd-standard'",
    "errors": [
      {
        "message": "Required 'compute.diskTypes.get' permission for 'projects/ansible-swarm/zones/us-east1-c/diskTypes/pd-standard'",
        "domain": "global",
        "reason": "forbidden"
      }
    ]
  }
}
slavaaaaaaaaaa commented 3 years ago

Just hit this: I mistyped the project name. Better error tracking would be helpful - or even a generic error to point the user in the right direction of checking SA permissions.

laithrafid commented 2 years ago
# https://github.com/mitchellh/vagrant-google
Vagrant.configure("2") do |config|
  config.vm.box_version = "0.1.0"
  config.vm.define "gcp" do |gcp|
    gcp.vm.box = "google/gce" #dummy gcp vagrantbox provided by atlas
    config.vm.provider :google do |google, override|
      google.google_project_id = "my_projectid" #from terraform
      google.google_json_key_location = "./mykeysecret.json" #terraform service account key.json
      google.image_family = "kali-rolling"
      google.name = "kali-v1.0"
      google.disk_size = 500            
      google.zone = "us-east1-c"     
      google.machine_type = "n1-standard-4"
      override.ssh.username = 'provisioner'
      override.ssh.private_key_path = 'mysectret.pub' # your ssh key
    end
  end

  config.vm.provision "shell", path: "scripts/create-swapfile.sh"
  config.vm.provision "shell", path: "scripts/install-chrome-remote-desktop.sh"
  config.vm.provision "shell", path: "scripts/all-passwordless-sudo.sh"
  config.vm.provision "shell", path: "scripts/set-hostname-kali.sh"

  config.vm.provision "shell", path: "scripts/pulseaudio.sh"
  config.vm.provision "shell", path: "scripts/install-nessus.sh"
  config.vm.provision "shell", path: "scripts/install-misc-packages.sh"
  config.vm.provision "shell", path: "scripts/install-social-engineer-toolkit.sh"
end

i think this's a vagrant issue because when i run direct call to API is working , however from vagrant hitting this error.

gcurl https://compute.googleapis.com/compute/v1/projects/my_projectid/zones/us-east1-c/diskTypes/pd-standard
{
  "kind": "compute#diskType",
  "creationTimestamp": "1969-12-31T16:00:00.000-08:00",
  "name": "pd-standard",
  "description": "Standard Persistent Disk",
  "validDiskSize": "10GB-65536GB",
  "zone": "https://www.googleapis.com/compute/v1/projects/my_projectid/zones/us-east1-c",
  "selfLink": "https://www.googleapis.com/compute/v1/projects/my_projectid/zones/us-east1-c/diskTypes/pd-standard",
  "defaultDiskSizeGb": "500"
}

vagrant up --debug output below

Just hitting this : ==> gcp: -- Accelerators: [] ERROR warden: Error occurred: undefined method self_link' for nil:NilClass INFO warden: Beginning recovery process... INFO warden: Calling recover: #<VagrantPlugins::Google::Action::RunInstance:0x00007f83319bfc10> INFO machine: Calling action: read_state on provider Google (new) INFO interface: Machine: action ["read_state", "start", {:target=>:gcp}] INFO runner: Running action: machine_action_read_state #<Vagrant::Action::Builder:0x00007f8332306350> INFO warden: Calling IN action: #<Vagrant::Action::Builtin::ConfigValidate:0x00007f8332595df0> INFO warden: Calling IN action: #<VagrantPlugins::Google::Action::ConnectGoogle:0x00007f8332595dc8> INFO connect_google: Creating Google API client and adding to Vagrant environment INFO warden: Calling IN action: #<VagrantPlugins::Google::Action::ReadState:0x00007f8332627cf0> INFO warden: Calling OUT action: #<VagrantPlugins::Google::Action::ReadState:0x00007f8332627cf0> INFO warden: Calling OUT action: #<VagrantPlugins::Google::Action::ConnectGoogle:0x00007f8332595dc8> INFO warden: Calling OUT action: #<Vagrant::Action::Builtin::ConfigValidate:0x00007f8332595df0> INFO interface: Machine: action ["read_state", "end", {:target=>:gcp}] INFO warden: Recovery complete. 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 warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: undefined methodself_link' for nil:NilClass INFO warden: Beginning recovery process... INFO warden: Recovery complete. ERROR warden: Error occurred: undefined method self_link' for nil:NilClass INFO warden: Beginning recovery process... INFO warden: Calling recover: #<Vagrant::Action::Builtin::Call:0x00007f8331927708> INFO warden: Beginning recovery process... INFO warden: Recovery complete. INFO warden: Recovery complete. 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 warden: Beginning recovery process... INFO warden: Recovery complete. INFO environment: Released process lock: machine-action-bd56383a5f174b6eb3d79cbcffb7f802 INFO environment: Running hook: environment_unload INFO runner: Running action: environment_unload #<Vagrant::Action::Builder:0x00007f8331d5faa0> Traceback (most recent call last): 37: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/batch_action.rb:86:inblock (2 levels) in run' 36: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/machine.rb:201:in action' 35: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/machine.rb:201:incall' 34: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/environment.rb:614:in lock' 33: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/machine.rb:215:inblock in action' 32: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/machine.rb:246:in action_raw' 31: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/runner.rb:89:inrun' 30: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/util/busy.rb:19:in busy' 29: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/runner.rb:89:inblock in run' 28: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/builder.rb:149:in call' 27: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:incall' 26: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/builtin/handle_box.rb:56:in call' 25: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:incall' 24: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/builtin/config_validate.rb:25:in call' 23: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:incall' 22: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/builtin/box_check_outdated.rb:93:in call' 21: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:incall' 20: from /Users/laithrafid/.vagrant.d/gems/2.7.4/gems/vagrant-google-2.7.0/lib/vagrant-google/action/connect_google.rb:47:in call' 19: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:incall' 18: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/builtin/call.rb:53:in call' 17: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/runner.rb:89:inrun' 16: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/util/busy.rb:19:in busy' 15: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/runner.rb:89:inblock in run' 14: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/builder.rb:149:in call' 13: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:incall' 12: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:127:in block in finalize_action' 11: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:incall' 10: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/builtin/provision.rb:80:in call' 9: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:incall' 8: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/builtin/delayed.rb:19:in call' 7: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:incall' 6: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/builtin/synced_folders.rb:87:in call' 5: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:incall' 4: from /Users/laithrafid/.vagrant.d/gems/2.7.4/gems/vagrant-google-2.7.0/lib/vagrant-google/action/warn_networks.rb:28:in call' 3: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:incall' 2: from /Users/laithrafid/.vagrant.d/gems/2.7.4/gems/vagrant-google-2.7.0/lib/vagrant-google/action/warn_ssh_keys.rb:28:in call' 1: from /opt/vagrant/embedded/gems/2.2.19/gems/vagrant-2.2.19/lib/vagrant/action/warden.rb:48:incall' /Users/laithrafid/.vagrant.d/gems/2.7.4/gems/vagrant-google-2.7.0/lib/vagrant-google/action/run_instance.rb:117:in call': undefined methodself_link' for nil:NilClass (NoMethodError)