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

Guest machine can't connect to host machine #240

Open
lzontar opened this issue Dec 23, 2019 · 0 comments
Open

Guest machine can't connect to host machine #240

lzontar opened this issue Dec 23, 2019 · 0 comments

Comments

@lzontar
Copy link

lzontar commented Dec 23, 2019

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant