0% found this document useful (0 votes)
185 views10 pages

Cloud Computing - Practical No. 02

Virtualization allows running virtual machines that emulate hardware. KVM is a Linux kernel module that provides virtualization. This document outlines installing and configuring KVM to virtualize Windows 10 by [1] installing KVM and related software, [2] creating a virtual machine and storage, [3] customizing settings like RAM, disk, and network, [4] installing Windows while loading VirtIO drivers, and [5] installing VirtIO guest tools for performance. The Windows 10 virtual machine installation and configuration using KVM was successful.

Uploaded by

41 SWARALI PATIL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
185 views10 pages

Cloud Computing - Practical No. 02

Virtualization allows running virtual machines that emulate hardware. KVM is a Linux kernel module that provides virtualization. This document outlines installing and configuring KVM to virtualize Windows 10 by [1] installing KVM and related software, [2] creating a virtual machine and storage, [3] customizing settings like RAM, disk, and network, [4] installing Windows while loading VirtIO drivers, and [5] installing VirtIO guest tools for performance. The Windows 10 virtual machine installation and configuration using KVM was successful.

Uploaded by

41 SWARALI PATIL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Practical No.

02

Aim: Installation and Configuration of virtualization using KVM.

Hardware / Software Required: Ubuntu OS, Windows 10.iso, Internet

Video Demonstration Link: https://youtu.be/ip0HqeMK5yo

Theory:

Virtualization

In computing, virtualization or virtualisation (sometimes abbreviated v12n, a numeronym) is the


act of creating a virtual (rather than actual) version of something, including virtual computer
hardware platforms, storage devices, and computer network resources.

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:

sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager qemu virt-viewer


spice-vdagent

Step 2: Initial setup

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.

TYCS SEM VI - CC - 41 – Swarali Patil


In the Above step you need to select how much RAM and how many CPU cores the VM
should have. It shows the hosts resources as little gray text under the input fields.

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.

TYCS SEM VI - CC - 41 – Swarali Patil


Here you can select all kinds of storage pool types. The simples one is the Filesystem
Directory, which I’ll use. You need to give it a name - in my case kvm_storage.

Now just select the path to the directory.

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.

TYCS SEM VI - CC - 41 – Swarali Patil


For best performance choose the raw format. The qcow2 format offers some advanced
features such as copy on write and live snapshots (Source: proxmox). I don’t need this features for
my use case, so I choose performance over features. In addition you need to decide the capacity as
well as how much of this capacity should be already allocated at the hosts system. At the end give
the storage a name, this name will be used as a filename. So in my case I would have a win10.img in
my kvm_storage.

Step 4: Finish the initial setup

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.

Step 5 (optional): Open configuration

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.

Step 7: Mount the VirtIO Drivers ISO

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.

After downloading the ISO click on Add Hardware -> Storage -> Select or create custom


storage -> Manage.

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.

TYCS SEM VI - CC - 41 – Swarali Patil


Last, select the Device type: CDROM device.

Step 8: Set the NIC

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.

Step 9: Set the disk bus and cache mode

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.

Step 11: Windows installation

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).

TYCS SEM VI - CC - 41 – Swarali Patil


In the next window you need to select the drivers location. Open the VirtIO CDROM Drive.

First of all select the storage driver. It is located in VirtIO drive/viostor/w10/amd64.

TYCS SEM VI - CC - 41 – Swarali Patil


Click ok and load the driver. Now you should see the volume you’ve created and be able to
install windows on it. Before installing click again on Load driver and load the VirtIO network driver.
It is located unter VirtIO drive/NetKVM/w10/amd64.

Now you can just install windows as usual.

Step 11: Install VirtIO guest tools

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:

Installation and Configuration of Windows 10 in virtualization using KVM was Successful.

TYCS SEM VI - CC - 41 – Swarali Patil

You might also like