Discussion:
[fedora-arm] 32 bit ARM guest on aarch64 host
Richard W.M. Jones
2016-02-27 13:33:26 UTC
Permalink
I've been trying to get a 32 bit Fedora/armv7hl guest to boot on a
64 bit Fedora/aarch64 host.

Host: Fedora Rawhide, aarch64 on Mustang

Guest: Fedora 22 disk image from:

$ virt-builder --arch armv7l fedora-22

I should say that:

(1) I can boot this guest using an external <kernel> and <initrd> and
some hand written libvirt XML. However external kernel is not very
flexible, since it means you have to do a dance on the host each time
you update the guest.

(2) I can boot this guest on x86-64 host using external kernel.

(3) It doesn't boot with UEFI in the guest, but that is expected since
the guest doesn't contain a UEFI bootloader, and I'm not even sure if
there is such a thing as UEFI for 32 bit ARM.

Anyway, I attempted to boot this disk image without the external
kernel hack using:

$ virt-install --arch armv7l --import --name test3 --ram 2048 --disk path=/var/tmp/test3.qcow2,format=qcow2 --os-variant fedora22

but it just hangs with a blank console, and with qemu-system-aarch64 [sic]
using 100% CPU. I poked around inside the disk image, and there seems
to be no evidence that it booted, eg. no logs, no updated timestamps.

Should I try a newer guest? I am going to try updating to Fedora 23.

Is it even possible to boot a 32 bit disk image without external
kernel?

Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
Richard W.M. Jones
2016-02-27 15:44:04 UTC
Permalink
Post by Richard W.M. Jones
Should I try a newer guest? I am going to try updating to Fedora 23.
Same thing.

Attached is the qemu command line. In this run I'm using some
hand-constructed XML, not 'virt-install --import' as before, but AFAIK
all important options are the same.

Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
Dennis Gilmore
2016-02-27 16:45:55 UTC
Permalink
Post by Richard W.M. Jones
Post by Richard W.M. Jones
Should I try a newer guest? I am going to try updating to Fedora 23.
Same thing.
Attached is the qemu command line. In this run I'm using some
hand-constructed XML, not 'virt-install --import' as before, but AFAIK
all important options are the same.
Rich.
It is currently not possible to boot a 32 bit arm vm without an external
kernel and initrd. I have played with having a u-boot that will work. But
right now you would need to construct the guest to match the specs hardcoded
into u-boot. It is a problem that needs to be solved

Dennis
Richard W.M. Jones
2016-02-27 17:59:19 UTC
Permalink
Post by Dennis Gilmore
Post by Richard W.M. Jones
Post by Richard W.M. Jones
Should I try a newer guest? I am going to try updating to Fedora 23.
Same thing.
Attached is the qemu command line. In this run I'm using some
hand-constructed XML, not 'virt-install --import' as before, but AFAIK
all important options are the same.
Rich.
It is currently not possible to boot a 32 bit arm vm without an external
kernel and initrd. I have played with having a u-boot that will work. But
right now you would need to construct the guest to match the specs hardcoded
into u-boot. It is a problem that needs to be solved
Thanks Dennis. When you say you've played with u-boot, does that mean
booting with an external u-boot binary? That would be a considerable
improvement over external kernel.

Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
Dennis Gilmore
2016-02-29 04:38:45 UTC
Permalink
Post by Richard W.M. Jones
Post by Dennis Gilmore
Post by Richard W.M. Jones
Post by Richard W.M. Jones
Should I try a newer guest? I am going to try updating to Fedora 23.
Same thing.
Attached is the qemu command line. In this run I'm using some
hand-constructed XML, not 'virt-install --import' as before, but AFAIK
all important options are the same.
Rich.
It is currently not possible to boot a 32 bit arm vm without an external
kernel and initrd. I have played with having a u-boot that will work. But
right now you would need to construct the guest to match the specs hardcoded
into u-boot. It is a problem that needs to be solved
Thanks Dennis. When you say you've played with u-boot, does that mean
booting with an external u-boot binary? That would be a considerable
improvement over external kernel.
Rich.
Yes I have used u-boot as a kernel. its very rough and not really a good
experience, at least in that you have to configure the vm the same as
u-boot was built.
Cole Robinson
2016-02-29 14:02:48 UTC
Permalink
Post by Dennis Gilmore
Post by Richard W.M. Jones
Post by Dennis Gilmore
Post by Richard W.M. Jones
Post by Richard W.M. Jones
Should I try a newer guest? I am going to try updating to Fedora 23.
Same thing.
Attached is the qemu command line. In this run I'm using some
hand-constructed XML, not 'virt-install --import' as before, but AFAIK
all important options are the same.
Rich.
It is currently not possible to boot a 32 bit arm vm without an external
kernel and initrd. I have played with having a u-boot that will work. But
right now you would need to construct the guest to match the specs hardcoded
into u-boot. It is a problem that needs to be solved
Thanks Dennis. When you say you've played with u-boot, does that mean
booting with an external u-boot binary? That would be a considerable
improvement over external kernel.
Rich.
Yes I have used u-boot as a kernel. its very rough and not really a good
experience, at least in that you have to configure the vm the same as u-boot
was built.
There's uboot builds that work with qemu + arm vexpress, courtesy of Gerd:

http://blog.wikichoon.com/2014/11/booting-fedora-21-arm-with-qemu-and-u.html

But uboot isn't going to work with qemu-system-arm -M virt because uboot
doesn't have any virtio support

- Cole

Marcin Juszkiewicz
2016-02-28 08:37:04 UTC
Permalink
Post by Richard W.M. Jones
I've been trying to get a 32 bit Fedora/armv7hl guest to boot on a
64 bit Fedora/aarch64 host.
Host: Fedora Rawhide, aarch64 on Mustang
$ virt-builder --arch armv7l fedora-22
I used virt-manager for it:

https://marcin.juszkiewicz.com.pl/2016/01/17/running-32-bit-arm-virtual-machine-on-aarch64-hardware/
Loading...