2017-10-19 169 views
0

我正在使用ESXi 6.0主機來測試打包程序,我一直在嘗試使vmware-iso遠程ESXi生成器正常工作。隨着封裝1.0。我到了打包程序嘗試使用「esxcli --formatter csv網絡vm端口列表-w #######」檢索訪客IP的地步,但錯誤顯示它找不到IP。遠程ESXi構建器無法檢索虛擬機IP。 ESXi 6.0,打包程序

帕克日誌: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" 
} 

裏面預置文件:https://pastebin.com/JCCEMs1v

任何想法?此

+0

由於Stack Overflow隱藏了您的緊密原因:*尋求調試幫助的問題(「爲什麼不是這個代碼工作?」)必須包含所需的行爲,特定的問題或錯誤以及重現所需的最短代碼它在問題本身。沒有明確問題陳述的問題對其他讀者無益。請參閱:[如何創建最小,完整和可驗證的示例](http://stackoverflow.com/help/mcve)。* – jww

回答

0

標準故障排除過程:

  1. 確認您的preseed正確配置DHCP。
  2. 打開VM的vSphere/ESXi嵌入式控制檯並查看錯誤消息或其卡住的位置。
相關問題