How to run:

https://cloud.debian.org/images/cloud/trixie/latest/debian-13-nocloud-arm64.qcow2

in Virtual Machine Manager on a Debian 13 GNOME x86-64 host?
Yesterday 9:17pm

To run the Debian 13 (Trixie) ARM64 cloud image (debian-13-nocloud-arm64.qcow2) on a Debian 13 GNOME x86-64 host using Virtual Machine Manager (virt-manager), you need to use QEMU/KVM with full emulation because your host is x86-64 and the guest image is ARM64. Native KVM acceleration won’t work for cross-architecture emulation, so you’ll rely on QEMU’s TCG (Tiny Code Generator) mode.

Here’s a step-by-step guide:


1. Install Required Packages

Ensure QEMU, libvirt, and virt-manager are installed:

bash
sudo apt update
sudo apt install qemu-system-arm qemu-utils libvirt-daemon-system libvirt-clients bridge-utils virt-manager

Add your user to the libvirt and kvm groups:

bash
sudo usermod -aG libvirt,kvm $USER
newgrp libvirt

Restart your session or log out/in for group changes to take effect.


2. Download the Debian 13 ARM64 Cloud Image

Download the image to a directory of your choice (e.g., ~/vm-images/):

bash
mkdir -p ~/vm-images
cd ~/vm-images
wget https://cloud.debian.org/images/cloud/trixie/latest/debian-13-nocloud-arm64.qcow2

3. Create a Virtual Machine for ARM64 Emulation

Option A: Using virt-manager GUI

  1. Open Virtual Machine Manager (virt-manager).
  2. Click Create a new virtual machine.
  3. Select Import existing disk image and browse to the downloaded debian-13-nocloud-arm64.qcow2 file.
  4. Choose Generic ARM64 machine (aarch64) as the OS type.
  5. Allocate at least 2 GiB RAM and 2 vCPUs (adjust as needed).
  6. Before finishing, go to Customize configuration before install and check:
    • CPU: Set to host or cortex-a57 (or another ARM64 CPU model).
    • Firmware: Ensure it’s set to UEFI (if available for ARM64).
    • Boot options: Enable Customize boot arguments and add:
      text
      root=/dev/vda console=ttyAMA0
    • Virtualization: Disable KVM (since you’re emulating, not using hardware acceleration).
  7. Finish and start the VM.

Option B: Using virt-install (CLI)

Run the following command to create the VM:

bash
virt-install \
  --name debian13-arm64 \
  --ram 2048 \
  --vcpus 2 \
  --disk path=~/vm-images/debian-13-nocloud-arm64.qcow2,format=qcow2,bus=virtio \
  --os-type linux \
  --os-variant generic-aarch64 \
  --machine virt,accel=tcg \
  --cpu cortex-a57 \
  --boot uefi \
  --import \
  --noautoconsole \
  --network bridge=virbr0

Note:

  • --accel=tcg forces QEMU to use emulation (no KVM).
  • --cpu cortex-a57 specifies an ARM64 CPU model.
  • --boot uefi uses UEFI for ARM64 (required for most modern ARM64 images).

4. Configure the VM for Cloud-Init (Optional)

The nocloud image expects cloud-init metadata. To enable SSH access or set a password:

  1. Create a user-data file (e.g., ~/vm-images/user-data) with:
    yaml
    #cloud-config
    user: debian
    password: yourpassword
    chpasswd: { expire: False }
    ssh_pwauth: True
  2. Create a meta-data file (e.g., ~/vm-images/meta-data) with:
    yaml
    instance-id: debian13-arm64
    local-hostname: debian13-arm64
  3. Create a seed ISO:
    bash
    genisoimage -output ~/vm-images/seed.iso -volid cidata -joliet -rock user-data meta-data
  4. Attach the seed ISO as a second drive in virt-manager or via virt-install:
    bash
    virt-install \
      ... \
      --disk path=~/vm-images/debian-13-nocloud-arm64.qcow2,format=qcow2,bus=virtio \
      --disk path=~/vm-images/seed.iso,device=cdrom,bus=sata \
      ...

5. Start the VM

  • In virt-manager, double-click the VM and start it.
  • If using virt-install, the VM will start automatically. Connect to the console with:
    bash
    virt-viewer debian13-arm64
    or use virsh console debian13-arm64.

6. Log In

  • If you configured cloud-init, log in with the user and password from user-data.
  • If not, the default user for Debian cloud images is usually debian with no password (or use the serial console).

7. Performance Considerations

  • Emulation is slow: ARM64 on x86-64 via TCG will be much slower than native or KVM-accelerated VMs.
  • Allocate resources: Use at least 2 vCPUs and 2 GiB RAM for a usable experience.
  • Networking: Use virtio for network and disk for better performance.

8. Troubleshooting

  • VM fails to start: Ensure qemu-system-aarch64 is installed and the CPU is set to an ARM64 model.
  • No console output: Try adding -nographic to the QEMU command or use the serial console.
  • Cloud-init not working: Double-check the seed ISO and metadata files.

Summary

  • Use QEMU TCG emulation for ARM64 on x86-64.
  • Configure the VM with ARM64 CPU, UEFI, and cloud-init (if needed).
  • Expect slower performance due to emulation.
Yesterday 9:17pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Le Chat can make mistakes. Check answers. Learn more