Cloud Computing - Practical No. 02
Cloud Computing - Practical No. 02
02
Theory:
Virtualization
There are many reasons why people utilize virtualization in computing. To desktop users, the
most common use is to be able to run applications meant for a different operating system without
having to switch computers or reboot into a different system. For administrators of servers,
virtualization also offers the ability to run different operating systems, but perhaps, more
importantly, it offers a way to segment a large system into many smaller parts, allowing the server
to be used more efficiently by a number of different users or applications with different needs. It
also allows for isolation, keeping programs running inside of a virtual machine safe from the
processes taking place in another virtual machine on the same host.
KVM
KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86
hardware containing virtualization extensions (Intel VT or AMD-V). 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.
Using KVM, one can run multiple virtual machines running unmodified Linux or Windows images.
Each virtual machine has private virtualized hardware: a network card, disk, graphics adapter, etc.
TYCS SEM VI - CC - 41 – Swarali Patil
Demonstration:
Step 1: Installation
First of all KVM, QEMU, the VM Manager and some dependencies for networking etc. need
to be installed like follows:
To create a new virtual machine start “Virtual Machine Manager”, which opens up a simple
GUI. Click on the upper left button to open the New VM window.
The first thing you have to do is to select how you would like to install the operating system.
In this case we use a Windows 10 ISO image. Select the option Local install media and choose the
Windows 10 ISO.
Step 3: Storage
The next step is to select the storage of the virtual machine, which also means where the
VM’s image should be stored. We are going to create a custom storage by clicking on Manage.
A new window Choose Storage Volume will pop up. The window mainly consists of two parts
- Storage pools on the left and the storage volumes on the left side. The first thing to do here is to
create a new storage pool. To do so, click on the plus button on the bottom left.
After the storage pool is created, select it on the left side of the window and klick on
the plus button above the right table to create a new storage volume.
After you’ve finished your storage volume you can give name to the new virtual machine.
Select Customize configuration before install, because we need to tweak a few other things, before
we start the installation process.
If you selected the Customize configuration before install option in the last step, the
customization window should have opened automatically. If, for whatever reason, this isn’t the
case, you can open the customization windows by double clicking the vms name in the Virtual
Machine Manager and click on the info button - 2nd top left icon.
TYCS SEM VI - CC - 41 – Swarali Patil
Step 6: Make sure the windows img is mounted
Sometimes the Windows img you’ve selected in the initial setup isn’t correctly connected.
Make sure, that it is connected in IDECDROM 1. If not, connect it by clicking connect and set the
image location to the according windows 10 .img file.
We’ll use the VirtIO storage and network windows drivers later. We need them while
installing windows, thus we need to mount them via a ISO file. First of all get the VirtIO drivers
ISO direct_link_stable Fedora Documentation, other versions.
This will open the Choose Storage Volume dialog. Add the VirtIO iso via Browse Local and
afterwards choose the volume. This will add a new virtual CDROM drive with the mounted VirtIO
Drivers ISO.
For best performance I set the network interface controller (NIC) to VirtIO by selecting the
corresponding entry for the Device model. Optionally you can change the source mode by selecting
a given host device. I usually use the bridged mode, which enables me to assign a own IP address to
the VM and make it accessible via the network.
To get the best performance on the VM the storage disks bus must be set to VirtIO. This can
be done by selecting VirtIO under IDE Disk 1 -> Advanced options -> Disk bus. Additionally the Cache
mode should be set to writeback for best performance. With this cache mode you may loose data
on power outage. More about cache modes is nicely described at proxmox.
TYCS SEM VI - CC - 41 – Swarali Patil
Step 10 (optional): Enable the boot menu
I usually enable the boot menu in my VMs, if i need to select a specific boot device or so.
After you’ve finished the customization steps above click Begin Installation in the top left
corner of the customization window. This will launch the VM and should automatically boot the
Windows installer. The following images are from a german windows installer, but I think the
following steps are understandable in every language. When you come to the point where you
need to select where you want to install windows you’ll notice, that no volumes are found. This is
because the storage driver is missing. To load the storage and the NIC drivers click on Load
driver (bottom left of the second row).
After you’ve installed windows you should install spice guest tools. On the SPICE website It is
described as follows:
This installer contains some optional drivers and services that can be installed in Windows
guest to improve SPICE performance and integration. This includes the qxl video driver and the
SPICE guest agent (for copy and paste, automatic resolution switching …)
The most important parts here are the video driver as well as the SPICE guest agent which
enables e.g. to copy and paste between host and guest.
Final Output:
Conclusion: