0% found this document useful (0 votes)
10 views

3.virtualization

The document discusses virtualization in the IT industry, highlighting its benefits and the role of VMware in enabling multiple operating systems and applications to run on a single physical server. It explains the concept of virtual machines (VMs), their key properties, and the types of hypervisors, focusing on Type 2 hypervisors like Oracle VirtualBox for DevOps purposes. Additionally, it covers the installation and configuration of VirtualBox, including creating VMs, installing operating systems, and using snapshots and cloning for efficient VM management.

Uploaded by

Aslam Ansari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

3.virtualization

The document discusses virtualization in the IT industry, highlighting its benefits and the role of VMware in enabling multiple operating systems and applications to run on a single physical server. It explains the concept of virtual machines (VMs), their key properties, and the types of hypervisors, focusing on Type 2 hypervisors like Oracle VirtualBox for DevOps purposes. Additionally, it covers the installation and configuration of VirtualBox, including creating VMs, installing operating systems, and using snapshots and cloning for efficient VM management.

Uploaded by

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

III.

Virtualization
Virtualization is not a new thing in IT industry. Virtualization gained huge momentum because of
Vmware as it has solved the problem of running multiple OS and apps on one physical computer.
But that is just the tip of the iceberg, Vmware and other virtualization vendors has given great
features like Clustering of Virtualized Physical machines, pooling compute resources, storage
pooling, High availability, Live migration of virtual machine and so much more.

In this chapter we will understand virtualization, its benefits and how to use it for our DevOps day
to day operations.

1. Life without virtualization


In software industry, we create and deliver softwares or as we say nowadays Applications.
Application runs businesses or vice versa. If application don’t run or underperform, business will
suffer.

Applications runs on servers. We deploy one application per server because we want our
applications to be isolated. For example, if we need web app, db app and few backend apps.
We may end up having multiple physical system each running a single instance of that app.

So, every time we need a new app to run we buy servers, install OS and setup our app on that.
And most of the time nobody knew the performance requirements of the new application!
This meant IT had to make guesses when choosing the model and size of
servers to buy.
As a result, IT did the only reasonable thing - it bought big fast servers with lots of resiliency.
After all, the last thing anyone wanted - including the business - was under-powered servers.
Most part of the time these physical server’s computer resource will be underutilized as low as 5-
10% of their potential capacity. A tragic waste of company capital and resources.

Visualpath Training & Consulting.


Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
2. Enter the Vmware
Amid all of this, VMware, Inc. gave the world the virtual machine (VM). And almost overnight the
world changed into a much better place! Finally, we had a technology that would let us run multiple
business applications on a single server safely and securely.

3.The Virtual Machine


A virtual computer system is known as a “virtual machine” (VM): a tightly isolated software
container with an operating system and application inside. Each self-contained VM is completely
independent. Putting multiple VMs on a single computer enables several operating systems and
applications to run on just one physical server, or “host”.

4. Key Properties of Virtual Machines


VMs have the following characteristics, which offer several benefits.

• Partitioning

• Run multiple operating systems on one physical machine

• Divide system resources between virtual machines

• Isolation

• Provide fault and security isolation at the hardware level

• Preserve performance with advanced resource controls

• Encapsulation

• Save the entire state of a virtual machine to files

• Move and copy virtual machines as easily as moving and copying files

• Hardware Independence

• Provision or migrate any virtual machine to any physical server

Visualpath Training & Consulting.


Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
5. Hypervisors
As generally we install OS on the physical server and then install our apps on that. By setting up
Hypervisor on the physical server we can create multiple VMs each with their own OS.

There are two types of hypervisors:


Type 1
Type 1 hypervisors run directly on the system hardware. They are often referred to as a "native" or
"bare metal” hypervisors.
They get installed on a physical computer like an OS. So instead of installing OS we install
Hypervisor to achieve virtualization.
Example:

• Microsoft Hyper-V

• VMware ESX/ESXi.

• Xen Hypervisors
These hypervisors are used to run production grade virtual machines that gives great performance.
Type 1 hypervisors can be grouped together(clustered) and manged centrally by a software like
Vmware Vcenter for Esxi.

Visualpath Training & Consulting.


Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
Type 2.
Type 2 hypervisors run on a host operating system.
In this kind, we install hypervisor on the OS like Linux or windows.
Example

• Vmware server/workstation/player

• Oracle virtualbox

6. Your choice of hypervisor.


Type 1 hypervisors are great and gives you amazing features like Clustering of Virtualized Physical
machines, pooling compute resources, storage pooling, High availability, Live migration of virtual
machine and so much more.
It’s used generally to virtualize entire datacentres or pool of servers. This is managed by very
expensive softwares like Vmware Vcenter. As the focus of these tutorials is on DevOps tools we
will not go into type 1 hypervisors. Our focus is going to be on type 2 hypervisors like oracle
virtualbox which we can install on our Laptops/desktops and get going with VMs.
We will need to run multiple VMs on our system to test/run our tools and scripts. We also need to
setup web application softwares on multiple OS and we will do it by using Oracle virtualnox
Hypervisor.

Visualpath Training & Consulting.


Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
7. Some terminologies
When dealing with virtualization (and also for understanding the following chapters of this
documentation), it helps to acquaint oneself with a bit of crucial terminology, especially the
following terms:

Host operating system (host OS).


This is the operating system of the physical computer on which VirtualBox was installed. There are
versions of VirtualBox for Windows, Mac OS X, Linux and Solaris hosts.

Guest operating system (guest OS).


This is the operating system that is running inside the virtual machine.

8. Installing virtualbox on windows.

 Go to Virtualbox Download page, Click Windows hosts.

 Open VirtualBox exe file and follow below screenshots.

Visualpath Training & Consulting.


Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
Visualpath Training & Consulting.
Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
Visualpath Training & Consulting.
Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
 When you start VirtualBox for the first time, a window like the following should come up:

T
o

g
i
v
e

y
o
u

a
n

Just to give you an idea, what VirtualBox might look like later, after you have created many
machines, here's another example:

Visualpath Training & Consulting.


Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
 Click on the "New" button at the top of the VirtualBox Manager window. A wizard will pop
up to guide you through setting up a new virtual machine
(VM):
 On the following pages, the wizard will ask you for the bare minimum of information that is
needed to create a VM, in particular:

1. The VM name will later be shown in the VM list of the VirtualBox Manager window, and it
will be used for the VM's files on disk. Even though any name could be used, keep in mind
that once you have created a few VMs, you will appreciate if you have given your VMs
rather informative names; "ubuntu" would thus be less useful than "Windows XP SP2 with
OpenOffice".
2. For “Operating System Type”, select the operating system that you want to install later.
3. On the next page, select the memory (RAM)that VirtualBox should allocate every time the
virtual machine is started. The amount of memory given here will be taken away from your
host machine and presented to the guest operating system, which will report this size as the
(virtual) computer's installed RAM.

Visualpath Training & Consulting.


Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
Next, you must specify a virtual hard disk for your VM.
Here you have the following options:

Visualpath Training & Consulting.


Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
• To create a new, empty virtual hard disk, press the"New"button.

• You can pick an existing disk image file.

• The drop-down list presented in the window contains all disk images which are currently
remembered by VirtualBox, probably because they are currently attached to a virtual
machine (or have been in the past).

• Alternatively, you can click on the small folder button next to the drop-down list to bring up
a standard file dialog, which allows you to pick any disk image file on your host disk.

• Most probably, if you are using VirtualBox for the first time, you will want to create a new
disk image. Hence, press the "New" button.

• This brings up another window, the “Create New Virtual Disk Wizard”, which helps you
create a new disk image file in the new virtual machine's folder.
VirtualBox supports two types of image files:

• Dynamically allocated file will only grow in size when the guest actually stores data on
its virtual hard disk. It will therefore initially be small on the host hard drive and only
later grow to the size specified as it is filled with data.

• A fixed-size file will immediately occupy the file specified, even if only a fraction of
the virtual hard disk space is actually in use. While occupying much more space, a
fixed-size file incurs less overhead and is therefore slightly faster than a dynamically
allocated file.

Visualpath Training & Consulting.


Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
After clicking on “Finish", your new virtual machine will be created. You will then see it in the list
on the left side of the Manager window, with the name you entered initially.

Visualpath Training & Consulting.


Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
9. Installing OS on the newly created VM.
As we are experimenting with ubuntu os vm, we need to download an ubuntu ISO image from
ubuntu website, attach the iso file to the vm and start installation.
https://www.ubuntu.com/download/server
Once you have ISO downloaded, select your vm and click on settings.
Go to storage pane, click on Empty optical drive, browse your ISO and attach it to the vm.

Visualpath Training & Consulting.


Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
 Once the ISO is attached power on your vm by double clicking it or click on start button.

Visualpath Training & Consulting.


Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
 Follow the installation procedure and setup the vm.

Snapshots
With snapshots, you can save a particular state of a virtual machine for later use. At any later time,
you can revert to that state, even though you may have changed the VM considerably since then.
To take snapshot of a machine right click on the vm and click on snapshot.
When you want to restore machine from snapshot, find the snapshot location on your filesystem and
simply double click on it.

Virtual Machine configuration


When you select a virtual machine from the list in the Manager window, you will see a summary of
that machine's settings on the right.

Right click on the vm and open settings window.


You can configure various configuration of the vm’s like RAM size, number of CPU’s, Network
etc.

Visualpath Training & Consulting.


Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.
Cloning virtual machines
To experiment with a VM configuration, test different guest OS levels or to simply backup a VM,
VirtualBox can create a full or a linked copy of an existing VM. [5]
A wizard will guide you through the clone process:

Full clone: In this mode, all depending disk images are copied to the new VM folder. The clone can
fully operate without the source VM.
Linked clone: In this mode, new differencing disk images are created where the parent disk images
are the source disk images. If you selected the current state of the source VM as clone point, a new
snapshot will be created implicitly.
Virtualbox gives you many more features which is out of the scope of this tutorial to cover.
Creating one single vm with the OS and application setup is time consuming process. You may not
have great deal of issue with it if we are talking about one or two vm’s but being a devops you may
need to setup lot of vm’s on regular basis. You may test your script or automation tool execution on
variety of applications and for that you may have to setup multiple vm’s. One of your job is to
research on tools, lots of tools and to learn and implement those tools you would be setting up lot of
vm’s and even share the same setup with your team.
To get around this very problem of setting up vm’s manually we can automate vm setup and
management process. This is the place where I introduce to a VM lifecycle automation tool known
as Vagrant.
Visualpath Training & Consulting.
Flat no: 205, Nilgiri Block,Aditya Enclave, Ameerpet, Hyderabad, Phone No: - +91-970 445 5959, 961 824 5689 E-
Mail ID : online.visualpath@gmail.com, Website : www.visualpath.in.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy