Previous: Build QEMU.

Guest kernel and rootfs

First, build a kernel and rootfs as specified here:

Run guest under KVM

Just copy the arm-trusty.img and the kernel zImage into the KVM host's filesystem (that's under /srv/arm-trusty-root/ if you've been following these howto documents). Then start the model (as described in the KVM host setup howto). Once the KVM host has booted, you can run exactly the same command as the x86 host example in, but with an extra -enable-kvm. (If you forget that it will actually work but much more slowly:

./qemu-system-arm \
  -cpu cortex-a15 \
  -machine type=virt \
  -enable-kvm \
  -m 2048 \
  -kernel zImage \
  -append 'console=ttyAMA0 root=/dev/vda rw' \
  -serial mon:stdio \
  -display none \
  -drive index=0,id=rootfs,file=arm-trusty.img \
  -device virtio-blk-device,drive=rootfs \
  -netdev user,id=mynet \
  -device virtio-net-device,netdev=mynet

This should make it to a guest login prompt. Since we've piled so many layers on top of each other, the result is not very fast, so be patient...

You can change your config to user bridged guest networking (working pings, etc.), but that requires you to have configured tun/tap networking on your host. See the following guides on how to do this:

Core/Virtualization/HowTo/Kvm32GuestSetup (last modified 2014-12-07 21:21:42)