Difference between revisions of "VMs+Emulation"

From CDOT Wiki
Jump to: navigation, search
(Created page with '<h2>Title</h2> Storage Performance By: Daniel Gilloch (dgilloch@learn.senecac.on.ca) <h2>Introduction</h2> The goal was to attempt to install a hypervisor on an already exist...')
 
(Installation)
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<h2>Title</h2>
+
=Title=
  
Storage Performance
+
Virtual Machines
 
By: Daniel Gilloch  (dgilloch@learn.senecac.on.ca)
 
By: Daniel Gilloch  (dgilloch@learn.senecac.on.ca)
  
<h2>Introduction</h2>
+
=Introduction=
  
 
The goal was to attempt to install a hypervisor on an already existing machine for our koji build farm and determine whether or not this would be a
 
The goal was to attempt to install a hypervisor on an already existing machine for our koji build farm and determine whether or not this would be a
Line 13: Line 13:
 
* Performance
 
* Performance
  
<h2>Approach</h2>
+
=Approach=
  
 
Determining and comparing the cost of buying arm machines, vs utilizing already existing hardware.
 
Determining and comparing the cost of buying arm machines, vs utilizing already existing hardware.
 
+
<br />
 
Determining the process of setting up virtual machines and the setup of an arm machine.
 
Determining the process of setting up virtual machines and the setup of an arm machine.
 
+
<br />
 
A Performance benchmark using koji build as this is a real world example of the exact type of developement that will be done on the machines.
 
A Performance benchmark using koji build as this is a real world example of the exact type of developement that will be done on the machines.
 
Also taken into consideration is if other environmental effects on the machine could interfer with build times.
 
Also taken into consideration is if other environmental effects on the machine could interfer with build times.
 +
<br />
  
 
+
=Process=
<h2>Process</h2>
+
==Cost==
 
+
OpenRD-Base: 149.99 <br />
What happened while you worked on the problem? You had multiple iterations -- what happened at each milestone? Did you go down the wrong path and have to start over? What barriers did you encounter?
+
OpenRD-Client: 249.99 <br />
 +
Q6600 Existing Machine: apprx, $700 CAD <br />
  
  
 +
==Installation==
  
 +
<strong>Arm Emulation</strong>
  
 +
The chosen hypervisor 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 />
 +
In order to benchmark the virtual machines and the openrd client the most ideal situation was to run time along with building
 +
in koji as this is the intended purpose of the machines and virtual machines. I selected a package and built it multiple times
 +
on both the virtual machine and the openrd client to ensure consistancy. The Openrd client's results were very consistant at a build
 +
time of about 17 minutes, however the virtual machine's build times were sparatic. They ranged from 25 minutes to an hour depending
 +
on the work being done.
  
<h2>Discovery</h2>
+
=Discovery=
  
 
What did you discover and learn during the process -- about the technology, the open source process, the community, yourself and your abilities, collaboration?
 
What did you discover and learn during the process -- about the technology, the open source process, the community, yourself and your abilities, collaboration?
  
<h2>Results</h2>
+
=Results=

Latest revision as of 22:54, 18 April 2010

Title

Virtual Machines By: Daniel Gilloch (dgilloch@learn.senecac.on.ca)

Introduction

The goal was to attempt to install a hypervisor on an already existing machine for our koji build farm and determine whether or not this would be a viable developement solution. Some issues taken into consideration:

  • Cost
  • Setup
  • Performance

Approach

Determining and comparing the cost of buying arm machines, vs utilizing already existing hardware.
Determining the process of setting up virtual machines and the setup of an arm machine.
A Performance benchmark using koji build as this is a real world example of the exact type of developement that will be done on the machines. Also taken into consideration is if other environmental effects on the machine could interfer with build times.

Process

Cost

OpenRD-Base: 149.99
OpenRD-Client: 249.99
Q6600 Existing Machine: apprx, $700 CAD


Installation

Arm Emulation

The chosen hypervisor 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.
Libvirt
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
manipulates the command-line virtual machine management tools.

Installing and starting the virtualization software

yum groupinstall virtualization
yum install qemu-system-arm
service libvirtd start

Installing the ARM root filesystem and XML

cd /var/lib/libvirt/images
wget http://ftp.linux.org.uk/pub/linux/arm/fedora/qemu/zImage-versatile-2.6.24-rc7.armv5tel \
http://cdot.senecac.on.ca/arm/arm1.xml \
http://cdot.senecac.on.ca/arm/arm1.img.gz
gunzip arm1.img.gz
restorecon *
virsh define arm1.xml

Booting the Virtual Machine
Currently there seems to be an issue while running SELinux and Arm emulation under libvirt management. To bypass this problem, issue the command
“setenforce 0”.

The virtual machine should now be bootable and can be accessed using the virt-manager tool located (Applications>System Tools>Virtual Machine Manager)

Or from the command line: virsh start arm1

Alternatively, you can access the graphical display using the virt-viewer command: virt-viewer arm1

Creating Additional ARM Virtual Machines

In order to create additional ARM virtual machines:
Make a new copy of the arm1.img file under a different name in /var/lib/libvirt/images
Edit the XML, making the following changes:
1. Change the UUID (you can use uuidgen to generate a new one)
2. Change the image filename (in the source tag in the devices section) to point to the new image file you just created.
Use virsh define nameOfXMLFile to define the new VM from the modified XML file.

Performance
In order to benchmark the virtual machines and the openrd client the most ideal situation was to run time along with building in koji as this is the intended purpose of the machines and virtual machines. I selected a package and built it multiple times on both the virtual machine and the openrd client to ensure consistancy. The Openrd client's results were very consistant at a build time of about 17 minutes, however the virtual machine's build times were sparatic. They ranged from 25 minutes to an hour depending on the work being done.

Discovery

What did you discover and learn during the process -- about the technology, the open source process, the community, yourself and your abilities, collaboration?

Results