From Fedora Project Wiki
m (Crobinso moved page QA:Testcase Virt x86 on ARM to QA:Testcase Virt ARM on x86: Misleading title) |
(Update for Fedora 21) |
||
Line 2: | Line 2: | ||
|description= | |description= | ||
Run Fedora ARM VM on your x86 machine via libvirt + | Run Fedora ARM VM on your x86 machine via libvirt + QEMU. | ||
|setup= | |setup= | ||
Line 13: | Line 11: | ||
=== Get the media === | === Get the media === | ||
This is one way to do it and the paths are only relevant for | This is one way to do it and the paths are only relevant for F21 alpha media. For some more info, see: [[Architectures/ARM/F21/Installation#For_Versatile_Express_Emulation_with_QEMU]] | ||
* Download the [ | * Download the [https://dl.fedoraproject.org/pub/fedora/linux/releases/test/21-Alpha/Images/armhfp/Fedora-Minimal-armhfp-21_Alpha-1-sda.raw.xz F20 alpha minimal ARM image] to $HOME | ||
* Extract the disk image: <code>unar Fedora-Minimal-armhfp- | * Extract the disk image: <code>unar Fedora-Minimal-armhfp-21_Alpha-1-sda.raw.xz</code>. Delete the original compressed image | ||
* Install virt- | * Install virt-builder: <code>sudo yum install libguestfs-tools-c</code> | ||
* | * Extract the kernel/initrd from the disk image: <code>virt-builder --get-kernel Fedora-Minimal-armhfp-21_Alpha-1-sda.raw</code> | ||
* Copy | * Copy the media to the the default libvirt image location: <code>sudo mv Fedora-Minimal-armhfp-21_Alpha-1-sda.raw vmlinuz-3.16.1-301.fc21.armv7hl initramfs-3.16.1-301.fc21.armv7hl.img /var/lib/libvirt/images</code> | ||
=== Create the VM with virt-manager === | === Create the VM with virt-manager === | ||
Line 27: | Line 23: | ||
* Ensure qemu-system-arm is installed: <code>sudo yum install qemu-system-arm</code> | * Ensure qemu-system-arm is installed: <code>sudo yum install qemu-system-arm</code> | ||
* Start virt-manager, connect to 'QEMU', click the 'New VM' icon | * Start virt-manager, connect to 'QEMU', click the 'New VM' icon | ||
* On the first page, under 'Architecture Options' select 'arm'. | * On the first page, under 'Architecture Options' select 'arm'. The 'virt' machine type should be selected automatically | ||
* 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 | * Browse to the disk image, kernel, and initrd we moved in the previous step. | ||
* Set kernel args as: <code>console=ttyAMA0 rw root=/dev/vda3 rootwait</code> | * Set kernel args as: <code>console=ttyAMA0 rw root=/dev/vda3 rootwait</code> | ||
* Set the OS as Fedora | * Set the OS as Fedora 21. | ||
* Continue with the OS defaults, complete the install. | * 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. | * 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. | ||
Line 40: | Line 36: | ||
<pre> | <pre> | ||
sudo virt-install \ | sudo ./virt-install \ | ||
--name | --name f21-arm32 --ram 1024 --arch armv7l --import \ | ||
-- | --disk /var/lib/libvirt/images/Fedora-Minimal-armhfp-21_Alpha-1-sda.raw | ||
--boot kernel=/var/lib/libvirt/images/vmlinuz-3. | --boot kernel=/var/lib/libvirt/images/vmlinuz-3.16.1-301.fc21.armv7hl,initrd=/var/lib/libvirt/images/initramfs-3.16.1-301.fc21.armv7hl.img,kernel_args="console=ttyAMA0 rw root=/dev/vda3 rootwait" | ||
</pre> | </pre> | ||
|results= | |results= | ||
No obvious errors occur. | No obvious errors occur. | ||
}} | }} | ||
[[Category:Virtualization Test Cases]] | [[Category:Virtualization Test Cases]] |
Revision as of 20:56, 23 September 2014
Description
Run Fedora ARM VM on your x86 machine via libvirt + QEMU.
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 F21 alpha media. For some more info, see: Architectures/ARM/F21/Installation#For_Versatile_Express_Emulation_with_QEMU
- Download the F20 alpha minimal ARM image to $HOME
- Extract the disk image:
unar Fedora-Minimal-armhfp-21_Alpha-1-sda.raw.xz
. Delete the original compressed image - Install virt-builder:
sudo yum install libguestfs-tools-c
- Extract the kernel/initrd from the disk image:
virt-builder --get-kernel Fedora-Minimal-armhfp-21_Alpha-1-sda.raw
- Copy the media to the the default libvirt image location:
sudo mv Fedora-Minimal-armhfp-21_Alpha-1-sda.raw vmlinuz-3.16.1-301.fc21.armv7hl initramfs-3.16.1-301.fc21.armv7hl.img /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'. The 'virt' machine type should be selected automatically
- Select the 'Import install' option, go to the next page
- Browse to the disk image, kernel, and initrd we moved in the previous step.
- Set kernel args as:
console=ttyAMA0 rw root=/dev/vda3 rootwait
- Set the OS as Fedora 21.
- 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 f21-arm32 --ram 1024 --arch armv7l --import \ --disk /var/lib/libvirt/images/Fedora-Minimal-armhfp-21_Alpha-1-sda.raw --boot kernel=/var/lib/libvirt/images/vmlinuz-3.16.1-301.fc21.armv7hl,initrd=/var/lib/libvirt/images/initramfs-3.16.1-301.fc21.armv7hl.img,kernel_args="console=ttyAMA0 rw root=/dev/vda3 rootwait"
Expected Results
No obvious errors occur.