简体   繁体   English

在等待SSH可用时,packer vmware-iso本地ubuntu构建挂起

[英]packer vmware-iso local ubuntu build hangs when waiting for SSH to become available

Packer version: Packer v1.3.3 Packer版本: Packer v1.3.3

Host Platform: MacOS Mojave 10.14.2 (18C54) 主机平台: MacOS Mojave 10.14.2(18C54)

Hello, I'm trying to build a really simple vmware-iso (local not remote). 您好,我正在尝试构建一个非常简单的vmware-iso(本地而非远程)。 The build starts, gets through the first couple of steps but then hangs on ==> vmware-iso: Waiting for SSH to become available... until the shh_wait timeout is reached (I've tried several different wait times). 构建开始,经过前几步,然后挂起==> vmware-iso: Waiting for SSH to become available...直到达到shh_wait超时(我尝试了几种不同的等待时间)。 If running with headless set to false, the ubuntu provisioning vm shows a screen in which it's setting up the drives and is about to format them. 如果在将headless设置为false的情况下运行,那么ubuntu Provisioning vm将显示一个屏幕,在其中设置驱动器并即将对其进行格式化。 Any ideas what would cause ssh availability to hang even though it looks as though it worked fine in a previous step? 有什么想法会导致ssh可用性挂起,即使它看起来像在上一步中正常工作一样?

{
  "variables": {},
  "builders": [
    {
      "type": "vmware-iso",
      "iso_url": "http://releases.ubuntu.com/bionic/ubuntu-18.04.1.0-live-server-amd64.iso",
      "iso_checksum": "188741f61c23d112a2564b0a864e25a3",
      "iso_checksum_type": "MD5",
      "guest_os_type": "ubuntu-64",
      "ssh_username": "dev",
      "ssh_password": "dev",
      "vm_name": "sqldb-vmware",
      "ssh_port": 22,
      "ssh_wait_timeout": "10m",
      "vmx_data": {
        "numvcpus": "2",
        "memsize": "2048"
      },
      "http_directory" : "http",
      "boot_command": [
        "<esc><wait>",
        "<esc><wait>",
        "<enter><wait>",
        "/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=ubuntubase<wait>",
        " grub-installer/bootdev=/dev/sda<wait>",        
        " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>",
        " -- <wait>",
        "<enter><wait>"
      ],
      "boot_wait": "20s",
      "shutdown_command": "echo 'packer' | sudo -S shutdown -P now"
    }
  ]
}

Packer Debug Log: https://gist.github.com/spstratis/73f4d662fd93917fb7e4a2278a5854f5 Packer调试日志: https : //gist.github.com/spstratis/73f4d662fd93917fb7e4a2278a5854f5

This is what is displayed on the builder VM while waiting for SSH to become available. 这是在等待SSH可用时在构建器VM上显示的内容。 等待SSH时在VM上显示

您需要在http目录中包含preseed.cfg ,其中包含有关如何安装Ubuntu的安装程序的说明,有关Preseed的更多信息,请参见Preseed Wiki

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从 Ubuntu 到 RaspberryPi 创建 Docker 机器时卡在“等待 SSH 可用” - Stuck on "Waiting for SSH to be available" when creating Docker Machine from Ubuntu to RaspberryPi VMware Fusion 11上的Ubuntu 18.04.1导致Packer出现内核崩溃 - Ubuntu 18.04.1 on VMware Fusion 11 results in kernel panic with Packer 用打包程序创建iso ubuntu映像系统文件(中间配置几个) - create a iso ubuntu image system file with packer (with intermediate few provisionning) 在 VMware Ubuntu 22.04 客户机上通过 Packer 和 Terraform 运行 cloud-init 两次 - Running cloud-init twice via Packer & Terraform on VMware Ubuntu 22.04 guest Cygwin SSH到Amazon EC2 Ubuntu的挂起 - Cygwin SSH to Amazon EC2 Ubuntu hangs 使用Packer下载ubuntu-14.04.5-server-amd64.iso的校验和错误 - Checksum error for ubuntu-14.04.5-server-amd64.iso download with Packer 系统在ubuntu中的构建过程中挂断 - system hangs up during a build procedure in ubuntu 如何使用 Mac 终端通过 SSH 连接到本地 Ubuntu 服务器? - How to SSH into a local Ubuntu Server with Mac terminal? 在Ubuntu上启动Firefox时,Selenium挂起 - Selenium hangs when launching Firefox on Ubuntu Packer构建中的Vagrant Provisioning - vagrant provisionning in packer build
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM