难以理解Vagrant的需求或工作方式(Windows上的Vagrant,提供程序vmware_esxi)

时间:2018-12-02 23:32:08

标签: vagrant esxi

我试图按照本页https://github.com/josenk/vagrant-vmware-esxi上的说明进行操作,并且在Windows计算机(win 10)上使用Vagrant,并且希望能够在独立的ESXI6.5 Server(免费版)上部署VM。 -demo许可证已过期)。这里没有VCenter。

我正在使用此命令行

无所事事--provider = vmware_esxi

root@110.10.10.10 password:
Bringing machine 'default' up with 'vmware_esxi' provider...
==> default: Box 'cdua/ubuntu16' could not be found. Attempting to find and install...
    default: Box Provider: vmware_esxi, vmware, vmware_desktop, vmware_fusion, vmware_workstation
    default: Box Version: 16.04
==> default: Loading metadata for box 'cdua/ubuntu16'
    default: URL: https://vagrantcloud.com/cdua/ubuntu16
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.

If you're adding a box from HashiCorp's Vagrant Cloud, make sure the box is
released.

Name: cdua/ubuntu16
Address: https://vagrantcloud.com/cdua/ubuntu16
Requested provider: ["vmware_esxi", "vmware", "vmware_desktop", "vmware_fusion", "vmware_workstation"]

这是我的Vagrantfile

    #
#  Fully documented Vagrantfile available
#  in the wiki:  https://github.com/josenk/vagrant-vmware-esxi/wiki
Vagrant.configure('2') do |config|

  config.vm.box = "cdua/ubuntu16"
  config.vm.box_version = "16.04"
  config.vm.synced_folder('.', '/vagrant', type: 'nfs', disabled: true)
  config.vm.network 'private_network', type: "dhcp"
  config.vm.network "public_network", auto_config: false

  config.vm.provider :vmware_esxi do |esxi|
    esxi.esxi_hostname = '10.10.10.10'
    esxi.esxi_username = 'root'
    esxi.esxi_password = 'prompt:'
    esxi.esxi_virtual_network = ['Production','VM Network']
    esxi.guest_name = 'VagrantTestVM'
  end
end

我不明白流浪汉想要我什么。 就Google / read而言,我可以看到提供程序是用于上传VM的插件。对于VMWare,有两种类型的提供程序,并且在hashicorp站点上,没有一种列为vmware_esxi。从功能上讲,最接近的一个应该是cdua / ubuntu16映像支持的vmware_ovf。 但是流浪汉失败了,但它告诉我盒子提供者是vmware_esxi

更新: 在这里发布之前,我尝试了以下方法,因为您可以再次看到错误

  vagrant up --provider=vmware_esxi

root@10.10.10.10 password:
Bringing machine 'default' up with 'vmware_esxi' provider...
==> default: Box 'generic/ubuntu1710' could not be found. Attempting to find and install...
default: Box Provider: vmware_esxi, vmware, vmware_desktop, vmware_fusion, vmware_workstation
default: Box Version: >= 0
==> default: Loading metadata for box 'generic/ubuntu1710'
default: URL: https://vagrantcloud.com/generic/ubuntu1710
==> default: Adding box 'generic/ubuntu1710' (v1.8.50) for provider: vmware
default: Downloading: https://vagrantcloud.com/generic/boxes/ubuntu1710/versions/1.8.50/providers/vmware.box
default: Download redirected to host: vagrantcloud-files-production.s3.amazonaws.com
default: Progress: 100% (Rate: 3286k/s, Estimated time remaining: --:--:--)
The box you attempted to add doesn't match the provider you specified.

Provider expected: vmware
Provider of box: vmware_desktop

1 个答案:

答案 0 :(得分:0)

您似乎链接了supports every vmware box format except vmware_ovf,即the only format provided for the cuda/ubuntu16 box。您可能还需要将config.vm.box更改为支持其他格式之一的其他框。

您可以选中Hashicorp's box index for "vmware" format Ubuntu boxes。 (过去我在bento/ubuntu-16.04方面表现不错,它声称是vmware_desktop的版本。)