2016-12-14 2 views
1

Ich arbeite an Bereitstellung von azurblauen Boxen mit Vagrant. Ich folgte den Schritten, die unter dem folgenden Link https://stapp.space/setup-vagrant-with-azure/ erwähnt werden, um die Vagrant-Datei zu erstellen. Während der Ausführung von Vagrant Up-Befehl am Ende bin ich mit folgenden Fehlern konfrontiert enter code here Es gibt Fehler in der Konfiguration dieses Systems. Bitte beheben die folgenden Fehler und versuchen Sie es erneut:Fehler während der Ausführung von vagrant up Befehl

Microsoft Azure Provider: * Die folgenden Einstellungen nicht existieren sollten: mgmt_certificate, mgmt_endpoint, ssh_c ertificate_file, ssh_port, ssh_private_key_file, vm_image, vm_location * Sie bieten müssen Azure Aktiv Verzeichnis-Mandanten-ID, Anwendungs-Client-ID und Anwendungs-Client-Secret über ENV oder Vagrantfile.

Vagrant Datei:

VAGRANTFILE_API_VERSION = '2' 

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

    config.ssh.username   = 'vagrant' 
    config.ssh.private_key_path = File.expand_path('C:\Windows\System32\cert.pem') 

    config.vm.provider :azure do |azure| 
    azure.mgmt_certificate = File.expand_path('C:\Windows\System32\cert.pem') 
    azure.mgmt_endpoint = 'https://management.core.windows.net' 
    azure.subscription_id = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 

    azure.cloud_service_name = 'Windows Azure MSDN - Visual Studio Ultimate(Converted to EA)12-9-2016-credentials' 
    azure.storage_acct_name = 'Windows Azure MSDN - Visual Studio Ultimate(Converted to EA)' 
    azure.deployment_name = 'azurevagrantdeployment' 

    azure.vm_name  = 'azurevagrantsmall1' 
    azure.vm_password = 'vagrant123' 
    azure.vm_image = '03f55de797f546a1b29d1b8d66be687a__VS-2017-RC1-Comm-WS2012R22016-11-16 ' 
    azure.vm_size  = 'Small' 
    azure.vm_location = 'North Europe' 


    azure.ssh_port    = '22' 
    azure.ssh_private_key_file = File.expand_path('C:\Windows\System32.pem') 
    azure.ssh_certificate_file = File.expand_path('C:\Windows\System32.cer') 

    azure.tcp_endpoints = '8000' 
    end 

    config.vm.provision 'shell', inline: 'echo OHAI' 
end 

bitte die optimale Lösung

Maschinenkonfiguration bieten: Windows 8.1 64-Bit-

Antwort

1

Dies ist einige Dokumentation aus früheren Version des Plugins.

sollten Sie überprüfen, mit dem github readme document - Ihre vagrant Datei wie

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

    config.ssh.username   = 'vagrant' 
    config.ssh.private_key_path = File.expand_path('C:\Windows\System32\cert.pem') 

    config.vm.provider :azure do |azure, override| 

    # use Azure Active Directory Application/Service Principal to connect to Azure 
    # see: https://azure.microsoft.com/en-us/documentation/articles/resource-group-create-service-principal-portal/ 

    # each of the below values will default to use the env vars named as below if not specified explicitly 
    azure.tenant_id = ENV['AZURE_TENANT_ID'] 
    azure.client_id = ENV['AZURE_CLIENT_ID'] 
    azure.client_secret = ENV['AZURE_CLIENT_SECRET'] 
    azure.subscription_id = ENV['AZURE_SUBSCRIPTION_ID'] 
    end 

end 
+0

danke für deinen Vorschlag @frederic henri. So erhalten Sie azure.client_id und –

+0

'client_id' ist die Client-ID Ihrer Azure Active Directory-Anwendung. –

1

Ja aussehen, Wenn ich andere optionale entfernen das Bild nicht gefunden dann bekommen.

"Antwort": { "Körper": "{\ r \ n \" Fehler: {\ r \ n \ "Code \": \ "NotFound \", \ r \ n \ "Nachricht \ ": \" Artifact: VMImage wurde nicht gefunden. \ " \ r \ n} \ r \ n}", "headers": { "Cache-Kontrolle": "no-cache", "Pragma" : "no-cache", "content-length": "99", "Inhaltstyp": "application/json; charset = utf-8", "läuft ab": "-1", "streng -transport-security ":" max-age = 31536000; includeSubDomains ", " x-ms-Anfrage-ID ":" xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ", " Server ":" Microsoft-HTTPAPI/2.0 , Microsoft-HTTPAPI/2.0 ", " x-ms -ratrelimit-resting-subscription-reads ":" 14998 ", " x-ms-korrelationsanfrage-id ":" yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy ", " x-ms-routing-request-id ": "Southeastasia: 20170102T093102Z: yyyyyyyyyyyy-yyyyyyyy-yyyyyyyyyyyy", "Datum": "Mo, 2. Januar 2017 09.31.02 GMT", "Verbindung": "close" }, " status ": 404 } }

Verwandte Themen