[英]packer is hanging here “vmware-iso: waiting for ssh to become available”
我正在嘗試使用packer
在VMware上創建機器映像。
在構建時,它一直在等待ssh可用。 這是我的json:
{
"builders": [
{
"type": "vmware-iso",
"boot_command": [
"<esc><esc><enter><wait>",
"/install/vmlinuz noapic preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
"debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
"hostname={{ .Name }} ",
"fb=false debconf/frontend=noninteractive ",
"keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ",
"initrd=/install/initrd.gz -- <enter>"
],
"boot_wait": "10s",
"disk_size": 40960,
"guest_os_type": "Ubuntu-64",
"http_directory": "http",
"iso_url": "http://releases.ubuntu.com/12.04/ubuntu-12.04.5-server-i386.iso",
"iso_checksum": "1214cd22448338b60bb24f583dd8741a",
"iso_checksum_type": "md5",
"ssh_username": "ubuntu",
"ssh_password": "root123",
"remote_datastore": "aaa",
"vm_name": "aaa",
"format": "vmx",
"ssh_pty": "true",
"ssh_port": "22",
"headless": false,
"remote_type": "esx5",
"remote_host": "aaa",
"remote_username": "aaa",
"remote_password": "aaa",
"remote_port": "22",
"ssh_wait_timeout": "10000s",
"shutdown_command": "shutdown -P now"
}
]
}
此設置有任何問題嗎?
這是我的preceed.cfg:
di debian-installer / locale字符串en_US
di console-setup / ask_detect布爾值false
di console-setup / layoutcode字符串我們
di netcfg / get_hostname字符串未分配的主機名
di netcfg / get_domain字符串未分配域
di netcfg / choose_interface選擇自動
di netcfg / wireless_wep字符串
di netcfg / disable_autoconfig布爾值true
di netcfg / dhcp_failed注意
di netcfg / dhcp_options選擇手動配置網絡
di netcfg / get_ipaddress字符串172.22.1.74
di netcfg / get_netmask字符串255.255.252.0
di netcfg / get_gateway字符串172.22.64.1
di netcfg / get_nameservers字符串172.22.64.1
di netcfg / confirm_static布爾值true
di base-installer / kernel / override-image字符串linux服務器
di clock-setup / utc-auto布爾值true
di clock-setup / utc布爾值true
時區/時區字符串US / Pacific
di clock-setup / ntp布爾值true
di鏡子/國家/地區字符串US
di mirror / http /代理字符串
di pkgsel / install-language-support布爾值false
taskel taskel /第一個多選標准,ubuntu服務器
di partman-auto / method字符串常規
di partman-auto / purge_lvm_from_device布爾值true
di partman-lvm / confirm布爾值true
di partman-auto / choose_recipe選擇原子
di partman / confirm_write_new_label布爾值true
di partman / choose_partition選擇完成
di partman / confirm boolean true
di passwd / user-fullname字符串Ubuntu用戶
di passwd / username字符串ubuntu
di passwd / user-password密碼root123
再次輸入密碼passwd / user-password root123
di grub-installer / only_debian布爾值true
di grub-installer / with_other_os布爾值true
di finish-install / reboot_in_progress注釋
首先,您需要為VNC打開防火牆。
第二個A:您需要配置dhcp服務器,或者必須使用在ssh_host的preseed.cfg和打包程序模板中都需要配置的靜態IP地址。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.