John Frye
John Frye

Reputation: 255

QEMU Run ARM Ubuntu Unsupported Machine Type

I am trying to run a basic virtual Ubuntu on an ARM machine.

My QEMU command looks something like this:

$: qemu-system-aarch64 -machine virt-2.6 -machine type=virtual -kernel /home/projects/projects/transfer/jfrye/QemuTestImages/ubuntu-16.04.3-server-arm64.iso

However, I am getting an error:

qemu-system-aarch64: -machine virt-2.6: unsupported machine type

Now, I have listed the supported machine types for aarch64 and looked them up here:

https://wiki.qemu.org/Documentation/Platforms/ARM

[jfrye@cserh4 ~]$ qemu-system-aarch64 -M help
Supported machines are:
akita                Sharp SL-C1000 (Akita) PDA (PXA270)
arm-generic-fdt      ARM device tree driven machine model
arm-generic-fdt-plnx ARM device tree driven machine model for PetaLinux Zynq
borzoi               Sharp SL-C3100 (Borzoi) PDA (PXA270)
canon-a1100          Canon PowerShot A1100 IS
cheetah              Palm Tungsten|E aka. Cheetah PDA (OMAP310)
collie               Sharp SL-5500 (Collie) PDA (SA-1110)
connex               Gumstix Connex (PXA255)
cubieboard           cubietech cubieboard
highbank             Calxeda Highbank (ECX-1000)
imx25-pdk            ARM i.MX25 PDK board (ARM926)
integratorcp         ARM Integrator/CP (ARM926EJ-S)
kzm                  ARM KZM Emulation Baseboard (ARM1136)
lm3s6965evb          Stellaris LM3S6965EVB
lm3s811evb           Stellaris LM3S811EVB
mainstone            Mainstone II (PXA27x)
midway               Calxeda Midway (ECX-2000)
musicpal             Marvell 88w8618 / MusicPal (ARM926EJ-S)
n800                 Nokia N800 tablet aka. RX-34 (OMAP2420)
n810                 Nokia N810 tablet aka. RX-44 (OMAP2420)
netduino2            Netduino 2 Machine
none                 empty machine
nuri                 Samsung NURI board (Exynos4210)
palmetto-bmc         OpenPOWER Palmetto BMC
raspi2               Raspberry Pi 2
realview-eb          ARM RealView Emulation Baseboard (ARM926EJ-S)
realview-eb-mpcore   ARM RealView Emulation Baseboard (ARM11MPCore)
realview-pb-a8       ARM RealView Platform Baseboard for Cortex-A8
realview-pbx-a9      ARM RealView Platform Baseboard Explore for Cortex-A9
smdkc210             Samsung SMDKC210 board (Exynos4210)
spitz                Sharp SL-C3000 (Spitz) PDA (PXA270)
sx1                  Siemens SX1 (OMAP310) V2
sx1-v1               Siemens SX1 (OMAP310) V1
terrier              Sharp SL-C3200 (Terrier) PDA (PXA270)
tosa                 Sharp SL-6000 (Tosa) PDA (PXA255)
verdex               Gumstix Verdex (PXA270)
versatileab          ARM Versatile/AB (ARM926EJ-S)
versatilepb          ARM Versatile/PB (ARM926EJ-S)
vexpress-a15         ARM Versatile Express for Cortex-A15
vexpress-a9          ARM Versatile Express for Cortex-A9
virt                 QEMU 2.6 ARM Virtual Machine (alias of virt-2.6)
virt-2.6             QEMU 2.6 ARM Virtual Machine
xilinx-zynq-a9       Xilinx Zynq Platform Baseboard for Cortex-A9
xlnx-ep108           Xilinx ZynqMP EP108 board
z2                   Zipit Z2 (PXA27x)

Why is virt-2.6 failing? I have successfully used arm-generic-fdt and supplied a device tree to test my Zynq.

Upvotes: 1

Views: 6112

Answers (1)

Peter Maydell
Peter Maydell

Reputation: 11383

Your problem is that your command line is specifying the machine type twice: "-machine virt-2.6" says "set the machine type to 'virt-2.6'", but "-machine type=virtual" says "set the machine type to 'virtual'".

QEMU is complaining because it uses the last machine type you give on the command line, which in this case is "virtual", and that doesn't exist.

Unfortunately a bug in our error message printing means that the error message displays the first machine type if you passed the argument more than once, which is exceedingly misleading.

What we ought to do is forbid setting the machine type more than once, but QEMU's argument parsing code is extremely baroque and that's quite possibly hard to fix...

When you fix that part of your command line you will find that the next problem is that you've tried to pass a .iso file to -kernel. That won't work (it doesn't work on x86 QEMU either -- -kernel wants a kernel file). You can either (a) use -kernel/-initrd to pass a kernel and initrd, which are booted and then can read the disk image; or (b) use -bios to pass a UEFI image which is capable of reading a kernel out of a disk image.

My overall advice is that you should find and follow a good tutorial, because you're unlikely to get something working by trial and error -- a command line for a working QEMU 'virt' setup with networking and a hard disk can get pretty complicated.

Upvotes: 2

Related Questions