Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aarch64 (ARM64) unavailable due to lack of IDE drivers for the architecture. CDROM driver should be set via scsi or virtio. #263

Closed
derekjhunt opened this issue May 9, 2024 · 0 comments · Fixed by #267

Comments

@derekjhunt
Copy link

When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.

Overview of the Issue

When attempting to create a virtual machine using aarch64 as the architecture, the packer script fails:

kvm: -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2: Bus 'ide.1' not found
TASK ERROR: start failed: QEMU exited with code 1

The same build process works under x86_64. These builds are using the UEFI firmware, not BIOS. It appears for aarch64, there needs to be an option to set the bus for the that device in order to accommodate native, non-x86_64 architectures. This is not using aarch64 emulation under x86_64.

Reproduction Steps

Run packer script on an aarch64 machine (not emulated). The current build is meant to run packer to provision a template and use a kickstart script to install and configure a Rocky Linux 9.3 VM/template.

Plugin and Packer version

  • Packer v1.10.3
  • Proxmox plugin v1.1.7 (packer-plugin-proxmox_v1.1.7_x5.0_darwin_amd64)

Simplified Packer Buildfile

source "proxmox-iso" "rocky9-kickstart" {
  <enter><wait><enter>"]
  # For UEFI
  boot_command = [
    "<up>",
    "e",
    "<down><down><end><wait>",
    "text inst.ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/inst.ks",
    "<enter><wait><leftCtrlOn>x<leftCtrlOff>"
  ]
  boot_wait    = "3s"
  cores        = "2"
  cpu_type     = "host"
  bios         = "ovmf"
  boot         = "order=virtio0;virtio1"
  disks {
    disk_size         = "128G"
    format            = "${var.proxmox_storage_format}"
    storage_pool      = "${var.proxmox_storage_pool}"
    type              = "virtio"
  }
  efi_config {
    efi_storage_pool        = "local"
    efi_type                      = "4m"
    pre_enrolled_keys      = false
  } 
  http_directory           = "packer/rocky9-aarch64"
  insecure_skip_tls_verify = true
  iso_file                 = "${var.proxmox_iso_pool}/${var.rocky_image}"
  memory                   = "2048"
  network_adapters {
    bridge = "vmbr0"
    model  = "virtio"
  }
  node                 = "${var.proxmox_node}"
  os                   = "l26"
  password             = "${var.proxmox_password}"
  proxmox_url          = "${var.proxmox_url}"
  qemu_agent           = true
  scsi_controller      = "virtio-scsi-pci"
  ssh_password         = "Packer"
  ssh_port             = 22
  ssh_timeout          = "30m"
  ssh_username         = "root"
  template_description = "${var.template_description}"
  template_name        = "${var.template_name}"
  unmount_iso          = true
  cloud_init           = true
  cloud_init_storage_pool = "${var.proxmox_storage_pool}"
  username             = "${var.proxmox_username}"
}

build {
  sources = ["source.proxmox-iso.rocky9-kickstart"]
  name = "proxmox-rl9-aarch64"
  provisioner "shell" {
    inline = ["yum install -y cloud-init qemu-guest-agent cloud-utils-growpart gdisk", "systemctl enable qemu-guest-agent", "shred -u /etc/ssh/*_key /etc/ssh/*_key.pub", "rm -f /var/run/utmp", ">/var/log/lastlog", ">/var/log/wtmp", ">/var/log/btmp", "rm -rf /tmp/* /var/tmp/*", "unset HISTFILE; rm -rf /home/*/.*history /root/.*history", "rm -f /root/*ks", "passwd -d root", "passwd -l root", "rm -f /etc/ssh/ssh_config.d/allow-root-ssh.conf"]
  }
}

To reproduced the error

packer init packer/rocky9-aarch64/packer.pkr.hcl
packer build -var-file variables-aarch64.pkrvars.hcl packer/rocky9-aarch64/packer.pkr.hcl

In the shell console, this is the result:

proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: output will be in this color.

==> proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: Creating VM
==> proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: No VM ID given, getting next free from Proxmox
==> proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: Starting VM
==> proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: Error starting VM: start failed: QEMU exited with code 1
==> proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: Stopping VM
==> proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: Deleting VM
Build 'proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart' errored after 24 seconds 741 milliseconds: Error starting VM: start failed: QEMU exited with code 1

In the proxmox console, the build fails, and shows that the CDROM is trying to be mounted on an ide bus:

kvm: -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2: Bus 'ide.1' not found
TASK ERROR: start failed: QEMU exited with code 1

Operating system and Environment details

CPU(s): Cortex-A72 (also tested under ARMv8 (M128-26))
System: SolidRun CEX7 Platform (Also tested on Ampere Altra)
Kernel Version: 6.8.9-1.el9.elrepo.aarch64 and Linux 6.1.0-20-arm64 (2024-04-11)
Proxmox version: pve-manager/8.1.7/ee1c3736ef6a6541

Log Fragments and crash.log files

Relevant log information:

proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: output will be in this color.

2024/05/09 10:17:52 Build debug mode: false
2024/05/09 10:17:52 Force build: false
2024/05/09 10:17:52 On error:
2024/05/09 10:17:52 Waiting on builds to complete...
2024/05/09 10:17:52 Starting build run: proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart
2024/05/09 10:17:52 Running builder: proxmox-iso
2024/05/09 10:17:52 [INFO] (telemetry) Starting builder proxmox-iso.rocky9-kickstart
2024/05/09 10:17:52 packer-plugin-proxmox_v1.1.7_x5.0_darwin_amd64 plugin: 2024/05/09 10:17:52 using password auth
2024/05/09 10:17:52 packer-plugin-proxmox_v1.1.7_x5.0_darwin_amd64 plugin: 2024/05/09 10:17:52 No URLs were provided to Step Download. Continuing...
==> proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: Creating VM
==> proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: No VM ID given, getting next free from Proxmox
==> proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: Starting VM
==> proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: Error starting VM: start failed: QEMU exited with code 1
==> proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: Stopping VM
==> proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: Deleting VM
2024/05/09 10:18:15 [INFO] (telemetry) ending proxmox-iso.rocky9-kickstart
Build 'proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart' errored after 22 seconds 753 milliseconds: Error starting VM: start failed: QEMU exited with code 1
==> Wait completed after 22 seconds 754 milliseconds

2024/05/09 10:18:15 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
==> Wait completed after 22 seconds 754 milliseconds

2024/05/09 10:18:15 machine readable: proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart,error []string{"Error starting VM: start failed: QEMU exited with code 1"}
==> Some builds didn't complete successfully and had errors:
==> Builds finished but no artifacts were created.
--> proxmox-rl9-aarch64.proxmox-iso.rocky9-kickstart: Error starting VM: start failed: QEMU exited with code 1

==> Builds finished but no artifacts were created.
2024/05/09 10:18:15 [INFO] (telemetry) Finalizing.
2024/05/09 10:18:15 waiting for all plugin processes to complete...
2024/05/09 10:18:15 /usr/local/bin/packer: plugin process exited
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants