Open main menu

CDOT Wiki β

Changes

Winter 2010 Presentations/VMs+Emulation

1,835 bytes removed, 15:54, 20 April 2010
Installation
<strong>Arm Emulation</strong>
The hypervisor that was chosen was QEMU because it supported the ARM architecture and was already available for Fedora.Although QEMU can be run directly from the command line, there are advantages to using the libvirt management layer provided by Fedora, such as automatic start of virtual machines when the system boots, the ability to disconnect and later reconnect to a virtual machine, and a graphical mangement and monitoring tool, libvirt.    
//The hypervisor that was chosen to run Fedora-ARM under Fedora was QEMU. QEMU was chosen //over other hypervisors as it is a well known emulator that supports ARM platforms.
<br />
<strong>Libvirt</strong>
<br />
Libvirt is a virtualization management framework and is full of useful tools. Libvirt provides tools such as “virsh” virtualization shell, as well as the “virt-manager” GUI tool that <br />manipulates the command-line virtual machine management tools.
<br />
<br />Installing and starting the virtualization software <br />
<br />
yum groupinstall virtualization <br />
yum install qemu-system-arm <br />
service libvirtd start <br />
<br />
Installing the ARM root filesystem and XML<br />
<br />
cd /var/lib/libvirt/images <br />
wget http://ftp.linux.org.uk/pub/linux/arm/fedora/qemu/zImage-versatile-2.6.24-rc7.armv5tel \ <br />
http://cdot.senecac.on.ca/arm/arm1.xml \<br />
http://cdot.senecac.on.ca/arm/arm1.img.gz <br />
gunzip arm1.img.gz <br />
restorecon * <br />
virsh define arm1.xml <br />
<br />
<strong>Booting the Virtual Machine</strong><br />
Currently there seems to be an issue while running SELinux and Arm emulation under libvirt management. To bypass this problem, issue the command<br /> “setenforce 0”.<br />
<br />
The virtual machine should now be bootable and can be accessed using the virt-manager tool located (Applications>System Tools>Virtual Machine Manager)<br />
<br />
Or from the command line: virsh start arm1<br />
<br />
Alternatively, you can access the graphical display using the virt-viewer command: virt-viewer arm1<br />
<br />
<strong>Creating Additional ARM Virtual Machines</strong><br />
<br />
In order to create additional ARM virtual machines: <br />
Make a new copy of the arm1.img file under a different name in /var/lib/libvirt/images <br />
Edit the XML, making the following changes: <br />
1. Change the UUID (you can use uuidgen to generate a new one)<br/>
2. Change the image filename (in the source tag in the devices section) to point to the new image file you just created.<br />
Use virsh define nameOfXMLFile to define the new VM from the modified XML file.<br />
<strong>Performance</strong> <br />
1
edit