Changes

From Amahi Wiki
Jump to: navigation, search
289 bytes removed ,  22:45, 14 September 2015
no edit summary
==KVM Virtualization=={{NeedsUpdate}} 
==Intro==
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.
There are also the problems. The guis GUIs can be a bit buggy and not always work correctly. Of course support is not going to be possible so you will have to live with the problems until the next update. With Vmware and Virtual Box there are also some packages that need to be installed in the guest to make them work "properly". This is usually some form of driver that makes the Virtual Machine aware its being virtualized or presents a layer to trick the Virtual Machine into thinking its on some real hardware.
I am not knocking these products. There are quite a few out there now and its really amazing how far they have come. I actually remember around the year 2000 when Vmware was giving away its product for free with Suse Linux. They were the only one in the space at that time. Now there are dozens of products and most of them work pretty well. At this point in time virtualization is just a fact so the various OS vendors are now building vitualization into thier product. Microsoft has Hyper-V, Oracle has Virtual Box and Solaris Zones, and all Linux distros have the ablility to run either Xen, or KVM based virtual machines. Xen is on the decline in favor of KVM now.
#*su -c yum -y update
#Install the needed Packages
#*su -c yum -y install kvm virt-manager qemu-kvm.x86_64 qemu-kvm-tools.x86_64 qemu.x86_64 }}qemu-common.x86_64 qemu-kvm.x86_64 qemu-kvm-tools.x86_64 sheepdog.x86_64 virt-v2v.x86_64 mc nmap
#*This might take some time so take a break or something
#Your Drive ID or model number.
#*You can get this by installing the "sdparm" package
#*sdparm /dev/sdb
#*Copy down the model number
#*In my case: sudo -c sdparm /dev/sdb
If you have used Vmware or Virtual Box or others you probably are familiar with the VM being stored in a big file. Usually its a vmdk or somthing. While these are fine and work well when using this method you sacrifice some performance because of all the layers being presented to the hypervisor. As a matter of fact the biggest problems with VM perforance can be traced back to how the disk is accessed. Simpler is always better and is almost always more direct. KVM offers direct disk access. In other words it is possible to connect directly to a physical disk in the host to install and run the guest. This offers the best performance because well its the most direct and native way to interact with any block device.
What I will try to describe is a fairly advanced concept called LVM (Logical Volume Manager). There are many methods to create a volume group in Linux but as far as I know it is nessasary to use the KVM gui or cli tools to integrate them properly into KVM. I am not going to describe all the details of LVM because its just so much. Just know that it works well and is very well developed. KVM utilizes LVM and has some built in tools to create and use volume groups. KVM calls them storage pools for some reason, probably to make it easier for people migrating from ESX or others. It makes sense but it can get confusing when all these terms are being tossed around.
==Here We Go==
==VM integration==
Your VM will be assigned a private network address by KVM. Normally its 192.168.22122.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. It rounds things out nicely. This setup 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==
Cheers
Jackjackpal
Other guides on this Wiki regarding Virtualization:
*http://wiki.amahi.org/index.php/[[KVM]]*http[[Virtualization]] [[category://wiki.amahi.org/index.php/Virtualizationvirtualization]]
12,424

edits