[英]packer is hanging here “vmware-iso: waiting for ssh to become available”
I am trying to create machine image on VMware using packer
. 我正在尝试使用packer
在VMware上创建机器映像。
While building it keeps on waiting for ssh to become available. 在构建时,它一直在等待ssh可用。 This is my json: 这是我的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"
}
]
}
Any problems with this setup? 此设置有任何问题吗?
this is my preceed.cfg: 这是我的preceed.cfg:
di debian-installer/locale string en_US di debian-installer / locale字符串en_US
di console-setup/ask_detect boolean false di console-setup / ask_detect布尔值false
di console-setup/layoutcode string us di console-setup / layoutcode字符串我们
di netcfg/get_hostname string unassigned-hostname di netcfg / get_hostname字符串未分配的主机名
di netcfg/get_domain string unassigned-domain di netcfg / get_domain字符串未分配域
di netcfg/choose_interface select auto di netcfg / choose_interface选择自动
di netcfg/wireless_wep string di netcfg / wireless_wep字符串
di netcfg/disable_autoconfig boolean true di netcfg / disable_autoconfig布尔值true
di netcfg/dhcp_failed note di netcfg / dhcp_failed注意
di netcfg/dhcp_options select Configure network manually di netcfg / dhcp_options选择手动配置网络
di netcfg/get_ipaddress string 172.22.1.74 di netcfg / get_ipaddress字符串172.22.1.74
di netcfg/get_netmask string 255.255.252.0 di netcfg / get_netmask字符串255.255.252.0
di netcfg/get_gateway string 172.22.64.1 di netcfg / get_gateway字符串172.22.64.1
di netcfg/get_nameservers string 172.22.64.1 di netcfg / get_nameservers字符串172.22.64.1
di netcfg/confirm_static boolean true di netcfg / confirm_static布尔值true
di base-installer/kernel/override-image string linux-server di base-installer / kernel / override-image字符串linux服务器
di clock-setup/utc-auto boolean true di clock-setup / utc-auto布尔值true
di clock-setup/utc boolean true di clock-setup / utc布尔值true
di time/zone string US/Pacific 时区/时区字符串US / Pacific
di clock-setup/ntp boolean true di clock-setup / ntp布尔值true
di mirror/country string US di镜子/国家/地区字符串US
di mirror/http/proxy string di mirror / http /代理字符串
di pkgsel/install-language-support boolean false di pkgsel / install-language-support布尔值false
tasksel tasksel/first multiselect standard, ubuntu-server taskel taskel /第一个多选标准,ubuntu服务器
di partman-auto/method string regular di partman-auto / method字符串常规
di partman-auto/purge_lvm_from_device boolean true di partman-auto / purge_lvm_from_device布尔值true
di partman-lvm/confirm boolean true di partman-lvm / confirm布尔值true
di partman-auto/choose_recipe select atomic di partman-auto / choose_recipe选择原子
di partman/confirm_write_new_label boolean true di partman / confirm_write_new_label布尔值true
di partman/choose_partition select finish di partman / choose_partition选择完成
di partman/confirm boolean true di partman / confirm boolean true
di passwd/user-fullname string Ubuntu User di passwd / user-fullname字符串Ubuntu用户
di passwd/username string ubuntu di passwd / username字符串ubuntu
di passwd/user-password password root123 di passwd / user-password密码root123
di passwd/user-password-again password root123 再次输入密码passwd / user-password root123
di grub-installer/only_debian boolean true di grub-installer / only_debian布尔值true
di grub-installer/with_other_os boolean true di grub-installer / with_other_os布尔值true
di finish-install/reboot_in_progress note di finish-install / reboot_in_progress注释
First A: You need to open your firewall for VNC. 首先,您需要为VNC打开防火墙。
Second A: You either need to configure a dhcp server or you have to use a static IP address which needs to be configured both in the preseed.cfg and in the packer template with ssh_host . 第二个A:您需要配置dhcp服务器,或者必须使用在ssh_host的preseed.cfg和打包程序模板中都需要配置的静态IP地址。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.