Installing ARM64 Debian 10 ( Buster ) in a virtual Machine

If you run Proxmox VE > 5.3 and want to test an ARM64 virtual machine, it’s kind of easy.
drop by the Debian Buster iso download site,
 
I’ll be using the debian-10.3.0-arm64-netinst.iso, the same process might work with Debian 9 but I didn’t tested it.

If you just want the working configuration click here
 
With that out of the way let’s explain the needed steps to get a vm up and running.
First create a generic machine with the following configuration, remember to check the “Advanced” box.
keep note the ID of the machine, you will need it to edit the configuration file.

Store your UEFI disk in a non thin pool and as a raw device, as we will need to expand it from the default 1MB.
Don’t bother with the CPU, as ARM64 is not in the list we will need to add it to the virtual machine configuration file later.
On the “OS” tab:


Type: Linux
Version: 5.x - 2.6 Kernel

 
On the “System” tab:


BIOS: OVMF ( UEFI )
Machine: i440fx

 
On the “Hard Disk” tab:


Bus/Device: SCSI

 
The file that you need to edit that proxmox create is in the format: /etc/pve/nodes/<host_name>/qemu-server/<vm_id>.conf
 
If it exist remove the line that starts with:


cpu:

 
Insert at the end:


arch: aarch64

 
Remove the line that starts with:


vmgenid:

 
Change your cd-rom type of disk from ide2 to scsi2, changing the line


ide2: none,media=cdrom

 
To


scsi2: none,media=cdrom

 
Change the boot order to boot the cd-rom, changing the line
 


bootdisk: ide2

 
To


bootdisk: scsi2

 
Add a new serial port:


serial0: socket

 
Change the output to the created serial port by adding the line :


vga: serial0

 
Follow the installation as normal, the emulation probably will be really slow, Caveat emptor.
After installation you can change your Display back to VGA
If you have problems booting, enter the bios and add a new boot option to load grub

DEBUGGING:

If you get this message:


qemu-system-aarch64: Initialization of device cfi.pflash01 failed: device requires 67108864 bytes, block backend provides 131072 bytes

You need to expand your EFI disk to 64mb
 
 
If you get this message:


qemu-system-aarch64: -drive if=pflash,unit=1,format=qcow2,id=drive-efidisk0,file=/store/pve/images/101/vm-101-disk-0.qcow2: Image is not in qcow2 format

Remove the disk and create a disk in the raw format.
 
 
If you get this message:


qemu-system-aarch64: -device vmgenid,guid=00000000-0000-0000-0000-000000000000: 'vmgenid' is not a valid device model name

Remove the vmgenid line.
 
 
If you get this message:


qemu-system-aarch64: -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200: Bus 'ide.1' not found

Change your disks to scsi.
 
 

Config Example:

Remember to fill in the information on the marked lines.


arch: aarch64
balloon: 0
bios: ovmf
bootdisk: scsi1
cores: 2
hotplug: 0
memory: 2048
name: Debian-arm
net0: virtio=00:00:00:00:00:00,bridge=vmbr0
numa: 0
ostype: l26
efidisk0: local:100/vm-3007-disk-0.raw,size=64M
scsi0: local:100/vm-100-disk-1.qcow2,size=32G
scsi1: local:iso/debian-10.3.0-arm64-netinst.iso,media=cdrom,size=256300K
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=00000000-0000-0000-0000-000000000000
sockets: 1
vga: serial0

 

Sources:

https://forum.proxmox.com/threads/arm64-vm-emulation-on-proxmox-5-3-amd64.49699/

https://wiki.debian.org/Arm64Port#Initial_setup/

https://forum.proxmox.com/threads/unable-to-boot-arm64-aarch64-freebsd.66123//

https://progress.opensuse.org/issues/15142/