QEMU Guest 尚未初始化显示(尚未)| Ubuntu 21.10 arm64

QEMU Guest 尚未初始化显示(尚未)| Ubuntu 21.10 arm64

实际上,我在 Windows 10 上使用 qemu 构建 Ubuntu arm64 映像时遇到了问题。我使用打包程序创建了 qemu VM,它运行正常,但输入启动参数后它仍然挂起。

启动我的 Packer 后,出现弹出 qemu 显示,并显示以下错误:

-> Guest has not initialied the display (yet) <-

我尝试了一些 Quemu 参数来进行显示设置,但仍然不起作用,希望能够得到帮助。

My Packer Version : 1.7.8
Ubuntu Version : 21.10 live server arm64 | 20.04 live server arm64 (test both)
qemu version : 6.2

我的打包机配置:

source "qemu" "ubuntu-server" {
  boot_command           = ["<esc><wait>", "<esc><wait>", "<enter><wait>", "/install/vmlinuz<wait>", " initrd=/install/initrd.gz", " auto-install/enable=true", " debconf/priority=critical", " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg<wait>", " -- <wait>", "<enter><wait>"]
  http_directory         = "../config/http"
  iso_checksum           = "${UBUNTU_ISO_CHECKSUM}"
  iso_urls               = ["${UBUNTU_ISO_NAME}"]
  output_directory       = "output/live-server"
  shutdown_command       = "sudo shutdown -P now"
  disk_size              = "60000"
  format                 = "qcow2"
  ssh_handshake_attempts = "20"
  ssh_password           = "XXXX"
  ssh_pty                = "true"
  ssh_timeout            = "245m"
  ssh_username           = "XXXXX"
  vm_name                = "${VM_NAME}"
  net_device             = "virtio-net"
  disk_interface         = "virtio"
  boot_wait              = "15s"
  headless               = "false"
  cpus                   = 4
  memory                 = 8192
  qemu_binary            = "qemu-system-arm.exe"
  qemuargs = [
    [ "-machine", "virt" ],
    [ "-device", "virtio-gpu-pci" ],
    [ "-boot", "strict=off" ],
    [ "-cpu", "max" ],
    [ "-m", "8192M" ],    
    [ "-smp", "4" ],
    [ "-device", "qemu-xhci" ],
    [ "-display", "sdl" ],
    [ "-vga", "std" ]
  ]
}

相关内容