[英]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.