我在Windows机器上configurationVagrant和Azure。 同时运行vagrant上面命令面临下面的问题
这台机器的configuration有错误。 请修复以下错误并重试:Microsoft Azure Provider:*以下设置不应该存在:vm_image
如果我通过禁用vagrant文件中的Vm_image面临下面的问题运行相同的命令
**"body": "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message
\“:\”工件:VMImage未find\“\ r \ n} \ r \ n}”,“headers”:{“cache-control”:“no-cache”,“pragma”caching“,”content-length“:”99“,”content-type“:”application / json; charset = utf-8“,”expires“:”-1“,”strict-transport-security“ -age = 31536000; includeSubDomains“,”x-ms-request-id“:”553a43ab-efe6-4250-9b6d-9ab5aa9493f3“,”server“:”Microsoft-HTTPAPI / 2.0,Microsoft-HTTPAPI / 2.0“ -ms-ratelimit-remaining-subscription-reads“:”14996“,”x-ms-correlation-request-id“:”b5f9cee2-6dfc-4e89-abf7-72d2cca84ff1“,”x-ms-routing-request-id “:”东南亚:20170103T072604Z:b5f9cee2-6dfc-4 e89-abf7-72d2cca84ff1“,”date“:”星期二,2017年1月3日07:26:04 GMT“,”连接“:”closures“},”状态“: 404} **
stream氓文件:
Vagrant.configure('2') do |config| config.vm.box = 'azure' #config.vm.box_url = 'https://github.com/msopentech/vagrant-azure/raw/master/dummy.box' # use local ssh key to connect to remote vagrant box #config.ssh.private_key_path = '~/.ssh/id_rsa' config.vm.provider :azure do |azure, override| # use Azure Active Directory Application / Service Principal to connect to Azure # each of the below values will default to use the env vars named as below if not specified explicitly #azure.mgmt_certificate = 'enterprise_dev-test-1-2-2017-credentials.pem' #azure.mgmt_endpoint = 'xxxxxxx' azure.subscription_id = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' azure.tenant_id = 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' azure.client_id = 'zzzzzzzzzzzzzzzzzzzzzzzzzz' azure.client_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' #azure.vm_image='a699494373c04fc0bc8f2bb1389d6106__Win2K8R2SP1-Datacenter-20161214-en.us-127GB.vhd' azure.vm_name = 'box01' #azure.tcp_endpoints = '3389:53390' end config.ssh.username = 'vagrant' #config.ssh.private_key_path = 'C:/Users/skannan/.vagrant.d/insecure_private_key' config.vm.provision "shell", inline: "echo hello" #config.vm.synced_folder "./vagrant", "/vagrant" config.vm.network :private_network, ip: "172.17.1.100", type: "dhcp" end
这仅仅意味着您正在请求一个不可用的图像,或者您所在的地区可用。 这是一个共同的根本原因是过时的文件! 尝试
az vm image list
从中挑选一个