UNIT 2-VIRTUALIZATION BASICS-2
UNIT 2-VIRTUALIZATION BASICS-2
Hypervisor: This is the software that creates and runs virtual machines. It allows multiple
operating systems to run on a single physical machine.
Virtual CPU: Each virtual machine is allocated a portion of the physical CPU's processing
power.
Virtual Memory: The hypervisor allocates a portion of the physical memory to each virtual
machine.
Virtual Network Interface: Virtual machines have their own virtual network interfaces,
allowing them to communicate with other virtual machines and the physical network.
Virtual Disk: Virtual machines have virtual disks that are stored as files on the physical
machine's storage. These virtual disks act as the hard drive for the virtual machine.
These components work together to create a fully functional virtual machine that can run its
own operating system and applications.
How do virtual machines work? https://youtu.be/Wb68Exu6jtU?si=5ALJQV4i8J9v8_w3
• Physical hardware and virtual machines are managed by a layer called the hypervisor.
• It assigns and manages physical resources to virtual machines and provides virtual hardware
to each virtual machine, such as CPU, memory, storage, and network devices.
• Each virtual machine runs its own operating system, known as the guest operating system.
• The guest operating system interacts with the virtual hardware provided by the hypervisor,
just as it would with physical hardware on a physical machine.
• The virtual hardware provided to the guest operating system includes virtual CPU, memory,
storage, and network devices.
• The virtual hardware is mapped to physical hardware by the hypervisor.
• The physical hardware consists of the actual physical components of the computer, such as
the CPU, memory, storage, and network devices.
• These physical components are managed by the hypervisor and allocated to the virtual
machines as needed.
Advantages of a virtual machine
1. Different operating systems are running simultaneously
VM is that it allows for multiple operating systems to run simultaneously on one physical machine without
requiring additional hardware resources or interfering with each other’s operations. This means businesses can
save money by running multiple applications on one server instead of having separate servers for each
application or task they need to accomplish.
2. Separate memory
VMs are completely self-contained environments with their own memory and disc space allocation capabilities.
3. Security
They provide users with greater security than traditional shared hosting solutions by isolating different processes
from one another, preventing malicious actors from accessing all of them at once if security protocols within the
network infrastructure are breached.
4. Resource sharing
Virtual machines can share the resources of the host system, such as the CPU, memory, and disc space, among
multiple guest operating systems. Multiple operating systems can be run on a single physical machine, making
more efficient use of your hardware resources.
5. Portability
Virtual machines can be easily moved between different physical machines or cloud environments, providing
greater flexibility in terms of deployment and scaling. Virtual machines can be easily backed up and restored.
This not only enables faster recovery from system failures and other problems, but it also makes it easier to test
new configurations.
6. Compatibility
Virtual machines can run multiple operating systems on a single physical machine, allowing you to run older
applications that are incompatible with newer operating systems.
Disadvantages of virtual machines
For example, if the host machine has limited
1. Compatibility issue memory or disc space, it can affect VM
Migrating existing systems into VM performance.
environments can be difficult due to 3. Complexity
compatibility issues between software versions
Virtualization can be complex to set up and manage,
used across different platforms. Furthermore, especially when multiple VMs are involved. It may
even with the advanced automation technologies also require additional configuration and
available in most modern hypervisor products maintenance.
today, managing complex networks involving 4. Security risks
various types of interconnected devices can be
Virtualization can introduce additional security
difficult.
risks, especially if VMs are not properly isolated
2. Performance overhead from each other and from the host machine.
Virtualization can introduce performance Malicious code running in a VM can compromise
overhead as it requires additional resources to other VMs and the host machine.
emulate the underlying hardware. This overhead 5. License cost
is usually minimal, but can be significant if the Some software licenses may not allow installation
host computer is already running at or near on virtual machines or require an additional license
maximum capacity. fee per VM.
3. Hardware limitations 6. Single point of failure
Virtualization may be limited by the hardware If the host computer fails, all VMs running on the
resources available on the host computer. host computer will also fail unless backup and
redundancy mechanisms are in place.
VIRTUALIZATION BASICS
VIRTUALIZATION BASICS
Virtualization is mainly used to emulate execution environments, storage, and
networks.
Among these categories, execution virtualization constitutes the oldest, most
popular, and most developed area. Therefore, it deserves major investigation and a
further categorization.
We can divide these execution virtualization techniques into two major categories
by considering the type of host they require.
Process-level techniques are implemented on top of an existing operating system,
which has full control of the hardware.
System-level techniques are implemented directly on hardware and do not require
- or require a minimum of support from - an existing operating system
Within these two categories we can list various techniques that offer the guest a
different type of virtual computation environment:
• bare hardware
• operating system resources
• low-level programming language
• application libraries.
Types of Virtual Machines : You can classify virtual machines into two types:
System Virtual Machine: These types of virtual machines gives us complete system
platform and gives the execution of the complete virtual operating system.
Just like virtual box, system virtual machine is providing an environment for an OS to be
installed completely.
We can see in below image that our hardware of Real Machine is being distributed between
two simulated operating systems by Virtual machine monitor.
And then some programs, processes are going on in that distributed hardware of simulated
machines separately.
Process Virtual Machine : While process virtual machines, unlike system virtual machine,
does not provide us with the facility to install the virtual operating system completely.
Rather it creates virtual environment of that OS while using some app or program and this
environment will be destroyed as soon as we exit from that app.
Like in below image, there are some apps running on main OS as well some virtual
machines are created to run other apps.
This shows that as those programs required different OS, process virtual machine provided
them with that for the time being those programs are running.
Example – Wine software in Linux helps to run Windows applications.