vagrant-azure icon indicating copy to clipboard operation
vagrant-azure copied to clipboard

creating an azure VM from a Vagrant file issue

Open melzoghbi opened this issue 8 years ago • 5 comments

Hi, I followed the steps to provision an Azure VM from a vagrant box that i have configured locally. I have updated the vagrant file and when i execute: vagrant up

I get this error:

image

Here is my updated vagrant file:

Vagrant.configure("2") do |config|
   config.vm.box = 'azure'
   config.vm.provider :azure do |azure, override|
   
     azure.tenant_id = 'MY_TENANT_ID'
     azure.client_id = 'MY_CLIENT_ID'
     azure.client_secret = 'MY_CLIENT_SECRET'
     azure.subscription_id = 'AZURE_SUBSCRIPTION_ID'
  
     azure.vm_image_urn = 'MicrosoftSQLServer:SQL2016-WS2012R2:Express:latest'
     azure.instance_ready_timeout = 600
     azure.vm_password = 'MYPASSWORD'
     azure.admin_username = "USERNAME"
     azure.admin_password = 'PASSWORD'
     override.winrm.transport = :ssl
     override.winrm.port = 5986
     override.winrm.ssl_peer_verification = false # must be false if using a self signed cert
  end
end

I'd like to add that i am running this from my windows machine but the vagrant box is an ubuntu VM.

Any idea why this could happen?

melzoghbi avatar Apr 17 '17 19:04 melzoghbi

I think you missed out on running the following command.

vagrant box add azure https://github.com/azure/vagrant-azure/raw/v2.0/dummy.box

devigned avatar Apr 17 '17 20:04 devigned

Please ping back if that fixes your issue.

devigned avatar Apr 17 '17 20:04 devigned

I ran this command already yesterday. I just re-run it and this is what i am getting:

image

@devigned any thoughts on this?

Thanks a lot.

melzoghbi avatar Apr 18 '17 18:04 melzoghbi

The folder sync protocol actually a part of Vagrant core. I believe you want to use winrm to sync your folder, if in fact, you want to sync your folder, which it will try to do by default.

See: https://www.hashicorp.com/blog/feature-preview-windows-guests/

Vagrant's documentation is pretty solid, so we don't try to replicate too much in our repo.

Let me know if this fixes your issue.

devigned avatar Apr 18 '17 18:04 devigned

I added this line and still got the same issue:

config.vm.communicator = "winrm"

I think what we need to include in github repo is what is needed to provision vagrant boxes into azure. since the current instructions don't really achieve that.

We can add all needed configs/commands without duplicating what is in vagrant website.

@devigned thoughts?

melzoghbi avatar Apr 18 '17 19:04 melzoghbi