exec:" vmware":$ PATH中找不到可执行文件

时间:2017-01-11 05:59:33

标签: ubuntu centos vmware packer

我正在尝试使用打包器拉出centos图像。下面是我构建它时收到的错误消息。我是否需要将vmware下载到我的基本机器(Ubuntu 16.04)中。我从下面的网站复制了以下代码。 https://selfieblue.wordpress.com/2015/08/17/step-by-step-building-vargant-centos7-image-from-packer-by-using-vmware-10-on-windows-8-1/

错误讯息 -

root@sonatapack:~# packer build packer.json
vmware-iso output will be in this color.

Build 'vmware-iso' errored: Failed creating VMware driver: Unable to initialize any driver for this platform. The errors
from each driver are shown below. Please fix at least one driver
to continue:
* exec: "vmware": executable file not found in $PATH
* exec: "vmware": executable file not found in $PATH
* exec: "vmplayer": executable file not found in $PATH
* exec: "vmplayer": executable file not found in $PATH


==> Some builds didn't complete successfully and had errors:
--> vmware-iso: Failed creating VMware driver: Unable to initialize any driver for this platform. The errors
from each driver are shown below. Please fix at least one driver
to continue:
* exec: "vmware": executable file not found in $PATH
* exec: "vmware": executable file not found in $PATH
* exec: "vmplayer": executable file not found in $PATH
* exec: "vmplayer": executable file not found in $PATH


==> Builds finished but no artifacts were created.

下面是我的json文件。

    {
  "variables": {
    "ssh_name": "packer",
    "ssh_pass": "admin123"
  },
  "builders": [{
     "type": "vmware-iso",
     "iso_url": "http://vault.centos.org/6.5/isos/x86_64/CentOS-6.5-x86_64-bin-DVD1.iso",
     "iso_checksum_type" : "md5",
     "iso_checksum" : "83221db52687c7b857e65bfe60787838",
     "disk_size" : 30720,
     "ssh_username" : "vagrant",
     "ssh_password" : "vagrant",
     "ssh_wait_timeout" : "30m",
     "shutdown_command" : "sudo shutdown -P now",
     "vmx_data": {
        "memsize": "4096",
        "numvcpus": "2"
        }
  }],
  "provisioners": [{
    "type": "shell",
    "inline": [
      "sleep 30",
      "echo Congratulation!",
      "echo Next process is exporting image in Vargrant format"
    ]
  }],
  "post-processors": [{
    "type" : "vagrant"
  }]
}

1 个答案:

答案 0 :(得分:0)

是的,您需要安装VMware Workstation或VMware Player(包含一些黑客),请参阅docs