我使用ESXi 6.0主机测试打包程序,我一直在努力让vmware-iso远程ESXi构建器正常工作。使用打包器1.0。我到达了这样一个地步:packer试图用" esxcli --formatter csv network vm port list -w #######"来检索来宾IP。但错误说它无法找到ip。
包装工日志:https://pastebin.com/0TU3HBhQ
杰森-文件:
{
"builders": [
{
"boot_command": [
"<enter><wait><f6><esc><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"<bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs><bs>",
"/install/vmlinuz<wait>",
" auto<wait>",
" console-setup/ask_detect=false<wait>",
" console-setup/layoutcode=us<wait>",
" console-setup/modelcode=pc105<wait>",
" debconf/frontend=noninteractive<wait>",
" debian-installer=en_US<wait>",
" fb=false<wait>",
" initrd=/install/initrd.gz<wait>",
" kbd-chooser/method=us<wait>",
" keyboard-configuration/layout=USA<wait>",
" keyboard-configuration/variant=USA<wait>",
" locale=en_US<wait>",
" netcfg/get_domain=vm<wait>",
" netcfg/get_hostname=vagrant<wait>",
" grub-installer/bootdev=/dev/sda<wait>",
" noapic<wait>",
" preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg",
" -- <wait>",
"<enter><wait>"
],
"communicator": "ssh",
"disk_size": "{{user `disk_size`}}",
"guest_os_type": "ubuntu-64",
"http_directory": ".",
"http_port_max": "9001",
"http_port_min": "8000",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "sha256",
"iso_url": "{{user `iso_url`}}",
"keep_registered": true,
"remote_cache_directory": "../packer_cache",
"remote_datastore": "{{user `host_datastore`}}",
"remote_host": "{{user `host`}}",
"remote_password": "{{user `host_password`}}",
"remote_type": "{{user `host_type`}}",
"remote_username": "{{user `host_user`}}",
"shutdown_command": "shutdown",
"ssh_password": "user",
"ssh_port": 22,
"ssh_username": "user",
"ssh_wait_timeout": "10000s",
"type": "vmware-iso",
"vm_name": "{{user `name`}}",
"vmx_data": {
"RemoteDisplay.vnc.webSocket.port": "5900",
"cpuid.coresPerSocket": "{{user `cores`}}",
"ethernet0.networkName": "{{user `netname`}}",
"ethernet0.present": "true",
"ethernet0.startConnected": "true",
"ethernet0.virtualDev": "e1000",
"memsize": "{{user `memsize`}}",
"numvcpus": "{{user `numvcpus`}}"
}
}
]
}
和
{
"wait_90":
"<wait10><wait10><wait10><wait10><wait10><wait10><wait10><wait10><wait10>",
"type": "vmware-iso",
"name": "ubuntu",
"host_type": "esx5",
"host": "***",
"host_datastore": "***/ubuntu",
"host_user": "root",
"host_password": "user",
"guest_root_password": "user",
"disk_size": "7000",
"iso_url": "http://mirror.yandex.ru/ubuntu-releases/16.04.2/ubuntu-16.04.2-server-amd64.iso",
"iso_checksum": "737ae7041212c628de5751d15c3016058b0e833fdc32e7420209b76ca3d0a535",
"cores": "1",
"memsize": "512",
"numvcpus": "1",
"netname": "***",
"guest_hostname": "ubuntu"
}
preseed-file:https://pastebin.com/JCCEMs1v
有什么想法吗?
答案 0 :(得分:0)
标准的故障排除程序: