[Arm-dev] Boot Raspberry Pi image in KVM on CentOS 7

Wed Aug 22 13:36:03 UTC 2018
Gordan Bobic <gordan at redsleeve.org>

Short answer: No, you cannot run virtual ARM using KVM on physical x86.

Long answer: You typically need qemu emulator build specifically for the
hardware of which you are trying to run the image from as a lot of the time
the kernel isn't generic enough for a different board. Last I checked there
was no specific qemu r-pi emulator, but there may be one now.

I hardly ever use VMs these days, I use a custom build kernel (for 4KB
pages), and use containers instead if I only need to test/configure the
userspace part.


On Wed, 22 Aug 2018, 15:19 Brenton Earl, <brent at exitstatusone.com> wrote:

> On Wed, 2018-08-22 at 09:10 +0200, Fabian Arrotin wrote:
> > On 21/08/18 21:53, Brenton Earl wrote:
> > > Hello,
> > >
> > > I am trying to boot the Raspberry Pi image in qemu KVM on
> > > CentOS7.  I
> > > converted the image to a qcow2 file system, extracted the /boot
> > > directory and tried to boot.
> > >
> > > I am using the following command:
> > >
> > > $ sudo virt-install --name centos7_armhfp \
> > >  --memory 4096  \
> > >  --boot kernel=/var/lib/libvirt/armhfp-boot/boot/vmlinuz-4.14.28-
> > > 201.el7.centos.armv7hl,initrd=/var/lib/libvirt/armhfp-
> > > boot/boot/initramfs-4.14.28-
> > > 201.el7.centos.armv7hl.img,kernel_args="console=ttyAMA0 rw
> > > root=/dev/sda3" \
> > >  --disk /var/lib/libvirt/images/CentOS-Userland-7-armv7hl-Generic-
> > > Minimal-1708-guest.qcow2 \
> > >  --import \
> > >  --arch armv7l \
> > >  --machine virt \
> > >  --os-variant centos7.0
> > >
> > > I get the following error:
> > >
> > > Starting install...
> > > ERROR    unsupported configuration: qemu-xhci not supported in this
> > > QEMU binary
> > > Domain installation does not appear to have been successful.
> > > If it was, you can restart your domain by running:
> > >   virsh --connect qemu:///system start centos7_armhfp
> > > otherwise, please restart your installation.
> > >
> > >
> > > I am following this tutorial that should technically work on all
> > > architectures if modified to fit:
> > >
> > > https://arrfab.net/posts/2017/Sep/29/using-centos-7-armhfp-vm-on-ce
> > > ntos
> > > -7-aarch64/
> > >
> > >
> > > What am I doing wrong?  I searched the web a bit but found no
> > > significant results.
> > >
> > > I tried to boot with the generic and the pi images with the same
> > > error
> > > output.  I feel like I am missing something simple because I am
> > > used to
> > > using virt-manager instead of the command line to install virtual
> > > machines.
> > >
> > > Thanks,
> > >
> >
> > Just to be sure : you're trying that on a aarch64 kvm host, not on a
> > x86_64 one, right ? (I prefer asking the obvious thing first)
>
> I am trying to do so on a x86_64 Centos 7 host.  Is there not a way to
> run Centos ARM on this architecture within a virtual machine?  I
> skipped the relevant parts of the how to in order to get KVM working.
> For example, I skipped installing AAVMF and used qemu-system-arm
> instead.
>
> >
> > _______________________________________________
> > Arm-dev mailing list
> > Arm-dev at centos.org
> > https://lists.centos.org/mailman/listinfo/arm-dev
> --
> Brenton Earl <brent at exitstatusone.com
> >_______________________________________________
> Arm-dev mailing list
> Arm-dev at centos.org
> https://lists.centos.org/mailman/listinfo/arm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/arm-dev/attachments/20180822/f3d73870/attachment-0006.html>