Vagrant和vmware_desktop

时间:2017-05-09 14:35:07

标签: vagrant packer

我使用打包器构建自定义框:

  "builders": [{
   "type": "vmware-iso",
       "iso_urls": "http://mirror.vtti.vt.edu/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1611.iso",
      "iso_checksum_type": "sha256",
      "iso_checksum": "27bd866242ee058b7a5754e83d8ee8403e216b93d130d800852a96f41c34d86a",
      "boot_wait": "10s",
      "disk_size": 81920,
      "output_directory": "/home/aida/vmware-packer/",      
      "guest_os_type": "redhat",
      "headless": true,
      "http_directory": "http",
      "ssh_username": "vagrant",
      "ssh_password": "vagrant",
      "ssh_port": 22,
      "ssh_wait_timeout": "10000s",
      "shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p",
      "vm_name": "packer-centos-7-x86_64",
      "vmx_data": {
        "memsize": "4096",
        "numvcpus": "2"
        },
        "boot_command" : [
        "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
      ]
  }],
  "provisioners": [
   {
    "type": "shell",
     "scripts": [
    "scripts/vagrant.sh",
    "scripts/vmware.sh",
    "scripts/vagrant.sh",
    "scripts/sshd.sh",
    "scripts/cleanup.sh"
    ],
    "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'"    
  }
 ],
  "post-processors": [{
     "output": "builds/{{.Provider}}-centos7.box",
     "type": "vagrant"

  }]  
}

然后,我将它添加到流浪盒中。现在,我正在尝试使用vagrant,但我收到了这个错误:

   The provider 'vmware_desktop' could not be found, but was requested to back the
 machine 'default'. Please use a provider that exists.

我试图添加一个vmware工作站插件,但我遇到了另一个错误,我需要一个specefic许可证。 (我有工作站专业许可证)

那么,你知道我该怎么做吗?

1 个答案:

答案 0 :(得分:0)

(只是重复FrédéricHenri已经指出的内容,因为这是正确答案。)

您需要Vagrant VMware插件许可证才能将VMware与Vagrant一​​起使用,请参阅 Vagrant + VMware