packer 挂在这里 "vmware-iso: waiting for ssh to become available"
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:
d-i debian-installer/locale 字符串 en_US
d-i console-setup/ask_detect 布尔值 false
d-i console-setup/layoutcode 字符串 us
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain 字符串未分配域
d-i netcfg/choose_interface select 自动
d-i netcfg/wireless_wep 字符串
d-i netcfg/disable_autoconfig 布尔值 true
d-i netcfg/dhcp_failed 笔记
d-i netcfg/dhcp_options select 手动配置网络
d-i netcfg/get_ipaddress 字符串 172.22.1.74
d-i netcfg/get_netmask 字符串 255.255.252.0
d-i netcfg/get_gateway 字符串 172.22.64.1
d-i netcfg/get_nameservers 字符串 172.22.64.1
d-i netcfg/confirm_static 布尔值 true
d-i base-installer/kernel/override-image 字符串 linux-服务器
d-i clock-setup/utc-auto 布尔值 true
d-i clock-setup/utc 布尔值 true
d-i time/zone 字符串 US/Pacific
d-i clock-setup/ntp 布尔值 true
d-i mirror/country 字符串美国
d-i mirror/http/proxy 字符串
d-i pkgsel/install-language-support 布尔值 false
tasksel tasksel/first multiselect 标准,ubuntu-server
d-i partman-auto/method 正则字符串
d-i partman-auto/purge_lvm_from_device 布尔值 true
d-i partman-lvm/confirm 布尔值 true
d-i partman-auto/choose_recipe select 原子
d-i partman/confirm_write_new_label 布尔值 true
d-i partman/choose_partition select 完成
d-i partman/confirm 布尔值 true
d-i passwd/user-fullname 字符串 Ubuntu 用户
d-i passwd/username 字符串 ubuntu
d-i passwd/user-password密码root123
d-i passwd/user-password-再次密码root123
d-i grub-installer/only_debian 布尔值 true
d-i grub-installer/with_other_os 布尔值 true
d-i finish-install/reboot_in_progress 笔记
首先A:您需要为VNC打开防火墙。
第二个 A:您要么需要配置 dhcp 服务器,要么必须使用静态 IP 地址,需要在 preseed.cfg 和带有 [的加壳模板中进行配置=17=]。
我正在尝试使用 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:
d-i debian-installer/locale 字符串 en_US
d-i console-setup/ask_detect 布尔值 false
d-i console-setup/layoutcode 字符串 us
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain 字符串未分配域
d-i netcfg/choose_interface select 自动
d-i netcfg/wireless_wep 字符串
d-i netcfg/disable_autoconfig 布尔值 true
d-i netcfg/dhcp_failed 笔记
d-i netcfg/dhcp_options select 手动配置网络
d-i netcfg/get_ipaddress 字符串 172.22.1.74
d-i netcfg/get_netmask 字符串 255.255.252.0
d-i netcfg/get_gateway 字符串 172.22.64.1
d-i netcfg/get_nameservers 字符串 172.22.64.1
d-i netcfg/confirm_static 布尔值 true
d-i base-installer/kernel/override-image 字符串 linux-服务器
d-i clock-setup/utc-auto 布尔值 true
d-i clock-setup/utc 布尔值 true
d-i time/zone 字符串 US/Pacific
d-i clock-setup/ntp 布尔值 true
d-i mirror/country 字符串美国
d-i mirror/http/proxy 字符串
d-i pkgsel/install-language-support 布尔值 false
tasksel tasksel/first multiselect 标准,ubuntu-server
d-i partman-auto/method 正则字符串
d-i partman-auto/purge_lvm_from_device 布尔值 true
d-i partman-lvm/confirm 布尔值 true
d-i partman-auto/choose_recipe select 原子
d-i partman/confirm_write_new_label 布尔值 true
d-i partman/choose_partition select 完成
d-i partman/confirm 布尔值 true
d-i passwd/user-fullname 字符串 Ubuntu 用户
d-i passwd/username 字符串 ubuntu
d-i passwd/user-password密码root123
d-i passwd/user-password-再次密码root123
d-i grub-installer/only_debian 布尔值 true
d-i grub-installer/with_other_os 布尔值 true
d-i finish-install/reboot_in_progress 笔记
首先A:您需要为VNC打开防火墙。
第二个 A:您要么需要配置 dhcp 服务器,要么必须使用静态 IP 地址,需要在 preseed.cfg 和带有 [的加壳模板中进行配置=17=]。