Virtualization with KVM – Helper Scripts

This will be the final article on “Virtualization with KVM” topic. Up till now I covered the topics on how to install and configure KVM, how to customize it a bit more and finally how to create a first guest machines. In this article I will present a set of BASH scripts one can use to ease up the general management of your virtual infrastructure built on top of KVM.

Prerequisites

Opting for a “quick start” method will actually install KVM hypervisor on your computer. Be absolutely sure this is what you want, because KVM can be resource intensive.

You should have your virtualization platform ready. If this is not the case, please skip to the first article in this series and get yourself familiar with the topic at hand. If you are lazy and don’t want to read, well here is a quick start method if you are using a Debain based Linux distribution. Open your terminal and download and execute my KVM Auto-Install script:

# wget -c http://www.zacks.eu/wp-content/uploads/files/kvm_autoinstall/kvm_autoinstall.tar.gz
# ./kvm-autoinstall.sh

Please use sudo command if you’re not using a root user. This will set you up with KVM virtualization infrastructure in a minute or two. Once ready, you can try my super duper simple scripts I’m about to present in this article. Continue reading “Virtualization with KVM – Helper Scripts”

Virtualization with KVM – Creating Guest Machines

This is the third article on topic of virtualization with KVM, and in this one attention will be on how to create first guest machines (virtual machines). So far I covered an installation of KVM core infrastructure virtualization itself and I talked a bit about post-install settings and configuration. Please check those two articles to introduce yourself with the topic at hand.

Prerequisites

Now that we have a KVM core virtualization infrastructure installed and configured, we can start building our first guest machines. Ubuntu wise, there are several tools that can help us with that task. Most common is virt-install, a python-based script developed by RedHat. If you opted for desktop setup, and prefer a GUI over CLI, you can use virt-manager. There is also an ubuntu-vm-builder CLI tool developed by Canonical, and to be honest I never used it, so I will skip it in this guide. If you followed my previous guides, all tools should be in place. Let us get started and build our first guest machine. Continue reading “Virtualization with KVM – Creating Guest Machines”

Virtualization with KVM – Extended Customization

In my previous article I wrote how to prepare your machine for KVM core virtualization infrastructure. Certain checks were performed and if passed, a KVM hypervisor was installed. In this article we will dig in a bit further and customize a few more setting like external listener, KVM networks and storage settings.

Prerequisites

For this virtualization guide, of course, a KVM hypervisor needs to be installed. As you noticed, there is a link to an article in opening paragraph which describes how to do it. Also this is the only prerequisite required for you to continue with this guide. If you have a KVM in place and running lets start with customization. Continue reading “Virtualization with KVM – Extended Customization”

Virtualization with KVM – Installation and configuration

Virtualization is a technology that let’s you run multiple simulated virtual machines (guests) on top of a single physical hardware machine (host). Physical machine (host) is equipped with the hypervisor which handles physical resources like CPU, memory and storage and then distributes them to the virtual machines (guests). Guests are receiving resources they need when they need them, and everything is handled by hypervisor operators. This article will guide you trough setup of a Kernel-based Virtual Machine hypervisor, better known as KVM.

Prerequisites

Before you start, I strongly recommend reading the following “Best Practices” document by IBM. It will give you a nice insight in KVM virtualization features.

Virtualization is a pretty old concept in computing world dating back to 1960’s, while it’s breakthrough to mainstream waters came in late 1990’s with the release of first “software emulator” programs like SoftPC and Virtual PC. At the same time a company named VMWare was established, which further more improved a mainstream popularity of virtualization and currently holds the position of a global market leader in virtualization domain. KVM on the other hand came a bit later. It is specifically developed for Linux on x86 hardware and it  consists of a loadable kernel module, kvm.ko, that provides the core virtualization infrastructure and a processor specific module, kvm-intel.ko or kvm-amd.ko. This article will describe how to set it up on your computer, so let’s get started. Continue reading “Virtualization with KVM – Installation and configuration”