From Fedora Project Wiki

No edit summary
m (Crobinso moved page QA:Testcase Virt x86 on ARM to QA:Testcase Virt ARM on x86: Misleading title)
(2 intermediate revisions by the same user not shown)
Line 19: Line 19:
* Install virt-copy-out: <code>sudo yum install libguestfs-tools-c</code>
* Install virt-copy-out: <code>sudo yum install libguestfs-tools-c</code>
* Copy /boot out of the disk image:  <code>virt-copy-out -a Fedora-Minimal-armhfp-20-Alpha-4-sda.raw /boot .</code>
* Copy /boot out of the disk image:  <code>virt-copy-out -a Fedora-Minimal-armhfp-20-Alpha-4-sda.raw /boot .</code>
* Copy kernel, initrd, and dtb to the default libvirt image location: <code>sudo mv boot/vmlinuz-3.11.0-300.fc20.armv7hl+lpae boot/initramfs-3.11.0-300.fc20.armv7hl.img boot/dtb-3.11.0-300.fc20.armv7hl/vexpress-v2p-ca9.dtb /var/lib/libvirt/images</code>
* Copy kernel, initrd, and dtb to the default libvirt image location: <code>sudo mv boot/vmlinuz-3.11.0-300.fc20.armv7hl boot/initramfs-3.11.0-300.fc20.armv7hl.img boot/dtb-3.11.0-300.fc20.armv7hl/vexpress-v2p-ca9.dtb /var/lib/libvirt/images</code>
* Delete the extracted 'boot' directory
* Delete the extracted 'boot' directory
* Move the extracted disk image to the default libvirt image location: <code>sudo mv Fedora-Minimal-armhfp-20-Alpha-4-sda.raw /var/lib/libvirt/images</code>
* Move the extracted disk image to the default libvirt image location: <code>sudo mv Fedora-Minimal-armhfp-20-Alpha-4-sda.raw /var/lib/libvirt/images</code>
Line 30: Line 30:
* Select the 'Import install' option, go to the next page
* Select the 'Import install' option, go to the next page
* Browse to the disk image, kernel, initrd, and dtb file we moved in the previous step.
* Browse to the disk image, kernel, initrd, and dtb file we moved in the previous step.
* Set kernel args as: <code>console=ttyAMA0 rw root=/dev/vda3</code>
* Set kernel args as: <code>console=ttyAMA0 rw root=/dev/vda3 rootwait</code>
* Set the OS as Fedora 20.
* Set the OS as Fedora 20.
* Continue with the OS defaults, complete the install.
* Continue with the OS defaults, complete the install.
Line 43: Line 43:
--name fedora20-arm --ram 1024 \
--name fedora20-arm --ram 1024 \
--arch armv7l --machine vexpress-a9 \
--arch armv7l --machine vexpress-a9 \
--boot kernel=/var/lib/libvirt/images/vmlinuz-3.11.0-300.fc20.armv7hl,initrd=/var/lib/libvirt/images/initramfs-3.11.0-300.fc20.armv7hl.img,dtb=/var/lib/libvirt/images/vexpress-v2p-ca9.dtb,kernel_args="console=ttyAMA0 rw root=/dev/vda3" \
--boot kernel=/var/lib/libvirt/images/vmlinuz-3.11.0-300.fc20.armv7hl,initrd=/var/lib/libvirt/images/initramfs-3.11.0-300.fc20.armv7hl.img,dtb=/var/lib/libvirt/images/vexpress-v2p-ca9.dtb,kernel_args="console=ttyAMA0 rw root=/dev/vda3 rootwait" \
--disk /var/lib/libvirt/images/Fedora-Minimal-armhfp-20-Alpha-4-sda.raw \
--disk /var/lib/libvirt/images/Fedora-Minimal-armhfp-20-Alpha-4-sda.raw \
--os-variant fedora20 --nographics
--os-variant fedora20 --nographics

Revision as of 15:50, 10 February 2014

Description

Run Fedora ARM VM on your x86 machine via libvirt + KVM.

This is for the F20 feature: https://fedoraproject.org/wiki/Changes/Virt_ARM_on_x86

Setup

Functioning Fedora virt host.

How to test

Get the media

This is one way to do it and the paths are only relevant for F20 alpha media. For some more info, see: Architectures/ARM/F19/Installation#For_Versatile_Express_Emulation_with_QEMU

  • Download the F20 alpha minimal ARM image to $HOME
  • Extract the disk image: unar Fedora-Minimal-armhfp-20-Alpha-4-sda.raw.xz. Delete the original compressed image
  • Install virt-copy-out: sudo yum install libguestfs-tools-c
  • Copy /boot out of the disk image: virt-copy-out -a Fedora-Minimal-armhfp-20-Alpha-4-sda.raw /boot .
  • Copy kernel, initrd, and dtb to the default libvirt image location: sudo mv boot/vmlinuz-3.11.0-300.fc20.armv7hl boot/initramfs-3.11.0-300.fc20.armv7hl.img boot/dtb-3.11.0-300.fc20.armv7hl/vexpress-v2p-ca9.dtb /var/lib/libvirt/images
  • Delete the extracted 'boot' directory
  • Move the extracted disk image to the default libvirt image location: sudo mv Fedora-Minimal-armhfp-20-Alpha-4-sda.raw /var/lib/libvirt/images

Create the VM with virt-manager

  • Ensure qemu-system-arm is installed: sudo yum install qemu-system-arm
  • Start virt-manager, connect to 'QEMU', click the 'New VM' icon
  • On the first page, under 'Architecture Options' select 'arm'. For machine type, select 'vexpress-a9'
  • Select the 'Import install' option, go to the next page
  • Browse to the disk image, kernel, initrd, and dtb file we moved in the previous step.
  • Set kernel args as: console=ttyAMA0 rw root=/dev/vda3 rootwait
  • Set the OS as Fedora 20.
  • Continue with the OS defaults, complete the install.
  • The guest should shortly start booting, and you should see text console output. After a bit of a wait, it should hit a text mode 'initial setup' where you can set a root password.

Create the VM with virt-install

Here's the relevant virt-install command:

sudo virt-install \
--name fedora20-arm --ram 1024 \
--arch armv7l --machine vexpress-a9 \
--boot kernel=/var/lib/libvirt/images/vmlinuz-3.11.0-300.fc20.armv7hl,initrd=/var/lib/libvirt/images/initramfs-3.11.0-300.fc20.armv7hl.img,dtb=/var/lib/libvirt/images/vexpress-v2p-ca9.dtb,kernel_args="console=ttyAMA0 rw root=/dev/vda3 rootwait" \
--disk /var/lib/libvirt/images/Fedora-Minimal-armhfp-20-Alpha-4-sda.raw \
--os-variant fedora20 --nographics

Expected Results

No obvious errors occur.

More info