Skip to content
This repository was archived by the owner on Jan 30, 2021. It is now read-only.
This repository was archived by the owner on Jan 30, 2021. It is now read-only.

Guest machine can't connect to host machine  #240

Description

@lzontar

Hello, on the image below you can see the error that my 'vagrant up --provider azure' throws and I have absolutely no idea why. If needed I can also provide the output of 'vagrant up --provider azure --debug'. Could someone please tell me how to set up networking properly on guest machine through Vagrantfile?

image

My Vagrantfile:

require 'vagrant-azure'
Vagrant.configure("2") do |config|
  config.vm.box = 'azure'
  config.vm.box_url = 'https://github.com/azure/vagrant-azure/raw/master/dummy.box'

  config.vm.network "private_network", guest: 80, host: 80

  config.ssh.username = 'vagrant'
  config.ssh.private_key_path = '~/.ssh/id_rsa'

  config.vm.synced_folder '.', '/vagrant', :disabled => true

  config.vm.provider :azure do |azure, override|
    # each of the below values will default to use the env vars named as below if not specified explicitly
    azure.tenant_id = ****
    azure.client_id = ****
    azure.client_secret = ****
    azure.subscription_id = ****
#ENV['AZURE_SUBSCRIPTION_ID']

    azure.tcp_endpoints = '80'

    azure.vm_name = 'grafmuvivm'
    azure.vm_size = 'Standard_B1s'
    azure.vm_image_urn = 'Canonical:UbuntuServer:18.04-LTS:latest'
    azure.resource_group_name = 'grafmuvirg'
    azure.location = 'westeurope'
    virtual_network_name = 'grafmuvivm-vagrantPublicIP'
  end

  # Declare where chef repository path
  chef_repo_path = "./chef"

  # Provisioning Chef-Zero
  config.vm.provision :chef_zero do |chef|
    # Added necessary chef attributes
    chef.cookbooks_path = 'chef/cookbooks'
    chef.nodes_path = 'chef/cookbooks'

    #### Adding recipes ####
    chef.add_recipe "api::ssh_user"
    chef.add_recipe "api::grafmuvi"

    # Running recipes
    chef.run_list = [
      'recipe[api::ssh_user]',
      'recipe[api::grafmuvi]'
    ]
    # Accept chef license
    chef.arguments = "--chef-license accept"
  end
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions