Changes

From Amahi Wiki
Jump to: navigation, search
945 bytes added ,  05:47, 26 October 2011
m
no edit summary
==KVM Virtualization==
 
==Intro==
The following tutorial is a pretty advanced topic. I will attemmpt attempt to do my best in being as clear as possible but you need to be warned that if you have not worked with Linux for very long you might get lost.
For a few years now the Linux kernel has had the ability to run virtual machines natively. Most people think of Vmware or Virtual Box when they want to run virtual machines. These are good products and have come a long way in making virtualization a reality. While it is possible to get these products for "free" and use them there are drawbacks to using these products. For the most part these mainstream products are streamlined and present a nice gui to an end user. These usually do a good job in making the complex task of virtualizing a machine simple but there are drawbacks. The "free" versions usually disable some really nice features like "snapshots" or they might restrict the amount of resources that can be assigned to a Virtual Machine.
*80 gb OS drive (Fedora 15 X64 Installed)
*160 gb drive (to be used for the VM images)
**The entire 160gb drive is dedicated to the VMs
**'''To follow this example make sure to use a dedicated drive that has no data you wish to loose. This proceedure will wipe out the whole drive. You have been warned'''
Nothing special about it right, but to take advantage of the 4gb or RAM you need 64 bit, especially if you have more RAM than I have here. As I mentioned I am using Fedora which is what Amahi users are used to so this will be biased towards Fedora.
==Here We Go==
Please make sure to follow these steps because you can blow away your system. I have a space spare PC I am using for this so I am not worried about any data.
* First you have to fire up virt-manager. This is a gui based tool and the following steps will all utilize the gui. There are a ''ton'' more options in the cli but we are going to keep in simple here.
#*[https://lh5.googleusercontent.com/-6BlV30CaNLw/Tqd-V6ikVzI/AAAAAAAADA0/AsiEOpqx7Ng/s912/7disk_by_id.png Image7]
#*This is where you need that ID. Hit the browse button by '''"source path"'''and navigate to /dev/disk/by-id From there pick the one with the filename that matches your number ID. '''Don't screw this up or you can blow your host system away!!'''
#*'''My system has the 160gb drive dedicated to the VMs. By following this proceedure you will blow away all data on the secondary drive. BE CAREFUL!!YOU ARE IN CHARGE OF YOUR SYSTEM, NOT ME!!!'''
#*[https://lh3.googleusercontent.com/-9gk8Mbm4f4U/Tqd-WEc_4SI/AAAAAAAADBI/SpApMvZ-1sU/s912/8storage_final.png Image8]
#*Once you pick the correct device you should have this. Check the "build pool" box so the Volume group gets created on the device.
==VM integration==
Your VM will be assigned a private network address by KVM. Normally its 192.168.22.X This address will be NATed by default to the network the host is attached to. In my case my host machine called KVM is on my network with my Amahi HDA as well as alot of other devices. I assigned KVM a static address in the Amahi control panel just because its a server. You don't have to if you don't want to. Whats cool is that the VM uses all the network information from the Host. This means that your new VM is effectivly on your network and will resolve all the home devices via the DNS server in Amahi. You can also create an alias in the Amahi networking panel so its possible to reach the VM from anyplace. It rounds things out nicely. This is especially usefull if you are running another Amahi HDA for development because the separation of the networks means that the dev HDA will not interfere with the normal workings of the "production" home network. I see this alot on IRC where guys are hesitant to test because it interferes with their setup. ==Development==Once your VM is ready you can bootstrap it for further Amahi development. Go [http://wiki.amahi.org/index.php/Fedora_16 here] for Fedora 16 bootstraping instructions.
==Conclusions==