Difference between revisions of "Winter 2010 Presentations/VMs+Emulation"

From CDOT Wiki
Jump to: navigation, search
(Created page with '=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 o...')
 
(Images)
 
(48 intermediate revisions by 3 users not shown)
Line 5: Line 5:
  
 
=Introduction=
 
=Introduction=
 +
--Slide*********************: <br />
 +
Is Virtualization what we need?
  
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
+
* Cost
viable developement solution. Some issues taken into consideration:
+
* Setup
 +
* Performance
 +
 
 +
 
 +
--What I'll be saying**************: <br />
 +
The goal was to attempt to install a hypervisor, a piece of emulation software that's used to run guest operating systems, on an already existing hongkong machine for our koji build farm and determine whether or not this would be a viable developement solution. Some issues taken into consideration:
  
 
* Cost
 
* Cost
 
* Setup
 
* Setup
 
* Performance
 
* Performance
 
=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.
Line 22: Line 27:
 
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 />
 
<br />
 +
 +
 +
-Slide***************************************: <br />
 +
What is Virtualization?
 +
http://www.ok-labs.com/_assets/image_library/diagram-virtualization-stack-thumb.png [picture]
 +
 +
 +
--What I'll be saying**************: <br />
 +
 +
Virtualization is technology for supporting execution of computer program code, from applications to entire operating systems, in a software-controlled environment.  Such a Virtual Machine (VM) environment  abstracts available system resources (memory, storage, CPU core(s), I/O, etc.) and presents them in a regular fashion, such that “guest” software cannot distinguish VM-based execution from running on bare physical hardware.
  
 
=Process=
 
=Process=
 
==Cost==
 
==Cost==
OpenRD-Base: 149.99 <br />
+
Slide *************:
OpenRD-Client: 249.99 <br />
+
OpenRD-Base: 149.00 - http://www.globalscaletechnologies.com/images/Product/icon/20.gif [picture] <br />
Q6600 Existing Machine: apprx, $700 CAD <br />
+
OpenRD-Client: 249.00 - http://www.open-rd.org/images/teaser/openrd_product_sm.png [picture]  <br />
 
+
SheevaPlug: 99.00 - http://www.twine.com/_b/12y98tf35-2rn/b0kw7kcd088fsf3n6v140p8prw5plhcvjwqpr7h077/12/y9/8t/f3/5-/2r/n/b0kw7kcd088fsf3n6v140p8prw5plhcvjwqpr7h077/marvell_sheevaplug_1-480x425.jpeg [picture]<br />
 +
Q6600 Existing Machine: apprx, $700 CAD - http://www.cty.ca/image/image250/250-2009.jpg [picture] <br />
  
 
==Installation==
 
==Installation==
  
 +
-Slide **********: <br />
 
<strong>Arm Emulation</strong>
 
<strong>Arm Emulation</strong>
 +
http://blog.laptopmag.com/wpress/wp-content/uploads/2009/03/arm-processor.jpg [picture]<br /><br />
 +
 +
-What I will be saying ***********: <br />
 +
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.
 +
After installing QEMU, and libvirt the ARM root file system and an xml file that contains instructions on how to install the fedora arm operating system. There was an issue involving SELinux, in order to solve this we had to HonkKong to permissive mode. After this point The virtual machine was able to boot.
  
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 /><br /><br />Slide **************:<br /> <strong>Performance</strong> <br />http://www.aykew.com/images/aboutwork/speed.jpg [picture]<br />
<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 />
 
<br />
yum groupinstall virtualization <br />
+
-What I will be saying************:<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 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
 
in koji as this is the intended purpose of the machines and virtual machines. I selected a package and built it multiple times
Line 82: Line 66:
  
 
=Discovery=
 
=Discovery=
 +
-Slide**************:<br />
 +
<strong>Discovery</strong>
 +
http://www.phillyist.com/attachments/philly_jill/exclamation-mark-yellow.gif [ picture ] <br />
 +
<br />-What I will be saying***********: <br />
 +
The ARM virtual machines are not a viable solution for our Fedora-Arm Koji Farm. The additional compilation times from the virtual machines can amount to ten times slower than that of the OpenRD client, which can really come into affect when compiling large packages which is not acceptable. The OpenRD clients were inexpensive and almost three OpenRD clients can be purchased at the cost of one of the existing machines. Another solution would be a SheevaPlug, which is generally cheaper than the OpenRD client. The SheevaPlug hardware is identical to the OpenRD, so similar performance should be expected. The SheevaPlug, however has less ports such as video or sata. Though, the OpenRD client out performs the virtual machines they do have a practical use. If an individual or organization could not afford to buy additional hardware and wishes to develop applications or is required to support them and performance is not an issue, virtualization for ARM would be a viable solution.
  
What did you discover and learn during the process -- about the technology, the open source process, the community, yourself and your abilities, collaboration?
+
=Images=
 
+
http://www.twine.com/_b/12y98tf35-2rn/b0kw7kcd088fsf3n6v140p8prw5plhcvjwqpr7h077/12/y9/8t/f3/5-/2r/n/b0kw7kcd088fsf3n6v140p8prw5plhcvjwqpr7h077/marvell_sheevaplug_1-480x425.jpeg - SheevaPlug<br />
=Results=
+
http://www.newit.co.uk/store/images/OpenRD3.jpg - OpenRD client showing available ports<br />
 +
http://www.phillyist.com/attachments/philly_jill/exclamation-mark-yellow.gif - exclaimation mark<br />
 +
http://www.aykew.com/images/aboutwork/speed.jpg - speedometer<br />
 +
http://blog.laptopmag.com/wpress/wp-content/uploads/2009/03/arm-processor.jpg - arm processor<br />
 +
http://www.cty.ca/image/image250/250-2009.jpg - pc case<br />
 +
http://www.ok-labs.com/_assets/image_library/diagram-virtualization-stack-thumb.png - simplified virtualization stack diagram<br />

Latest revision as of 20:31, 21 April 2010

Title

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

Introduction

--Slide*********************:
Is Virtualization what we need?

  • Cost
  • Setup
  • Performance


--What I'll be saying**************:
The goal was to attempt to install a hypervisor, a piece of emulation software that's used to run guest operating systems, on an already existing hongkong 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

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.


-Slide***************************************:
What is Virtualization? http://www.ok-labs.com/_assets/image_library/diagram-virtualization-stack-thumb.png [picture]


--What I'll be saying**************:

Virtualization is technology for supporting execution of computer program code, from applications to entire operating systems, in a software-controlled environment. Such a Virtual Machine (VM) environment abstracts available system resources (memory, storage, CPU core(s), I/O, etc.) and presents them in a regular fashion, such that “guest” software cannot distinguish VM-based execution from running on bare physical hardware.

Process

Cost

Slide *************: OpenRD-Base: 149.00 - http://www.globalscaletechnologies.com/images/Product/icon/20.gif [picture]
OpenRD-Client: 249.00 - http://www.open-rd.org/images/teaser/openrd_product_sm.png [picture]
SheevaPlug: 99.00 - http://www.twine.com/_b/12y98tf35-2rn/b0kw7kcd088fsf3n6v140p8prw5plhcvjwqpr7h077/12/y9/8t/f3/5-/2r/n/b0kw7kcd088fsf3n6v140p8prw5plhcvjwqpr7h077/marvell_sheevaplug_1-480x425.jpeg [picture]
Q6600 Existing Machine: apprx, $700 CAD - http://www.cty.ca/image/image250/250-2009.jpg [picture]

Installation

-Slide **********:
Arm Emulation http://blog.laptopmag.com/wpress/wp-content/uploads/2009/03/arm-processor.jpg [picture]

-What I will be saying ***********:
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. After installing QEMU, and libvirt the ARM root file system and an xml file that contains instructions on how to install the fedora arm operating system. There was an issue involving SELinux, in order to solve this we had to HonkKong to permissive mode. After this point The virtual machine was able to boot.




Slide **************:
Performance
http://www.aykew.com/images/aboutwork/speed.jpg [picture]

-What I will be saying************:
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

-Slide**************:
Discovery http://www.phillyist.com/attachments/philly_jill/exclamation-mark-yellow.gif [ picture ]

-What I will be saying***********:
The ARM virtual machines are not a viable solution for our Fedora-Arm Koji Farm. The additional compilation times from the virtual machines can amount to ten times slower than that of the OpenRD client, which can really come into affect when compiling large packages which is not acceptable. The OpenRD clients were inexpensive and almost three OpenRD clients can be purchased at the cost of one of the existing machines. Another solution would be a SheevaPlug, which is generally cheaper than the OpenRD client. The SheevaPlug hardware is identical to the OpenRD, so similar performance should be expected. The SheevaPlug, however has less ports such as video or sata. Though, the OpenRD client out performs the virtual machines they do have a practical use. If an individual or organization could not afford to buy additional hardware and wishes to develop applications or is required to support them and performance is not an issue, virtualization for ARM would be a viable solution.

Images

http://www.twine.com/_b/12y98tf35-2rn/b0kw7kcd088fsf3n6v140p8prw5plhcvjwqpr7h077/12/y9/8t/f3/5-/2r/n/b0kw7kcd088fsf3n6v140p8prw5plhcvjwqpr7h077/marvell_sheevaplug_1-480x425.jpeg - SheevaPlug
http://www.newit.co.uk/store/images/OpenRD3.jpg - OpenRD client showing available ports
http://www.phillyist.com/attachments/philly_jill/exclamation-mark-yellow.gif - exclaimation mark
http://www.aykew.com/images/aboutwork/speed.jpg - speedometer
http://blog.laptopmag.com/wpress/wp-content/uploads/2009/03/arm-processor.jpg - arm processor
http://www.cty.ca/image/image250/250-2009.jpg - pc case
http://www.ok-labs.com/_assets/image_library/diagram-virtualization-stack-thumb.png - simplified virtualization stack diagram