UNIT II TOPIC 1
virtual Machine Basics
virtual machine defined
A VM is a virtualized instance of a computer that can perform almost all of the same
functions as a computer, including running applications and operating systems.
How does a virtual machine work?
Virtualization is the process of creating a software-based, or "virtual" version of a
computer, with dedicated amounts of CPU, memory, and storage that are "borrowed" from
a physical host computer—such as your personal computer— and/or a remote server—such
as a server in a cloud provider's datacenter.
A virtual machine is a computer file, typically called an image, that behaves like an actual
computer.
It can run in a window as a separate computing environment, often to run a different
operating system—or even to function as the user's entire computer experience—as is
common on many people's work computers.
The virtual machine is partitioned from the rest of the system, meaning that the software
inside a VM can't interfere with the host computer's primary operating system.
A VM provides an isolated environment for running its own OS and applications,
independent from the underlying host system or other VMs on that host.
A VM's OS, commonly referred to as the guest OS, can be the same as or different from the
host OS and the OSes of other VMs on the host.
A single computer can host multiple VMs running different OSes and applications without
affecting or interfering with each other.
Although the VM is still dependent on the host's physical resources, those resources are
virtualized and distributed across the VMs and can be reassigned as necessary. This makes it
possible to run different environments simultaneously and accommodate fluctuating
workloads.
Why should businesses use virtual machines?
1. Saving on hardware and energy costs by reducing the number of physical servers
required to run and maintain.
2. Rapid scalability without having to purchase additional hardware each time more
capacity or capability is needed.
3. Increased security and reliability compared to traditional physical infrastructure
setups due to multiple isolated operating systems running within one server.
4. Greater redundancy, with data stored on VMs remaining accessible even if a single
instance fails due to internal issues.
5. Easier management of IT environments with administrators only needing to
manage one larger system that contains all necessary components for operation,
simplifying routine maintenance tasks such as software updates.
6. More efficient management is possible as updates can be done simultaneously
across multiple platforms at once instead of manually addressing individual needs
per device type, reducing potential downtime caused by human error during manual
configuration processes.
How do virtual machines work?
1. 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.
2. 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.
3. 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.
4. 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.
Additional tip
You must be confused between a guest and a host machine. The host machine is the one
where the guest machine is installed. Assume you have Windows 10 installed on your
computer, and you want to create a virtual machine running Linux (guest) within that host
operating system. For that you may need VMware software to install Linux on the that host
operating system (windows 10).
Virtual machine in cloud computing
In cloud computing, a virtual machine (VM) is a software emulation of a physical
computer that runs on a remote server in the cloud. A cloud VM typically includes a
virtualized set of hardware resources, such as CPU, memory, storage, and networking,
which can be allocated to multiple users on demand.
In Cloud computing VMs can be accessed from any location with an internet connection to
run applications, databases, and services in the cloud. Cloud VMs allow users to scale their
resources up or down as needed, reducing the need for physical hardware and infrastructure.
Cloud providers like Microsoft Azure, Amazon Web Services (AWS), and Google Cloud
Platform allow users to choose the best fit for their needs and also offer a range of virtual
machines with different configurations and pricing models.
Azure Virtual Machine is a cloud-based virtual machine (VM) service provided by Microsoft
Azure. It allows users to create and manage virtual machines in the cloud, which can be used
for a variety of purposes, such as running applications, hosting websites, and storing data.
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. Snapshots:
Virtual machines can be easily backed up and restored on local machines or in cloud
environments, providing greater flexibility in terms of deployment and scaling. Snapshots:
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
1. Compatibility issue
Migrating existing systems into VM environments can be difficult due to compatibility issues
between software versions used across different platforms. Furthermore, even with the
advanced automation technologies available in most modern hypervisor products today,
managing complex networks involving various types of interconnected devices can be
difficult.
2. Performance overhead
Virtualization can introduce performance overhead as it requires additional resources to
emulate the underlying hardware. This overhead is usually minimal, but can be significant if
the host computer is already running at or near maximum capacity.
3. Hardware limitations
Virtualization may be limited by the hardware resources available on the host computer. For
example, if the host machine has limited memory or disc space, it can affect VM
performance.
3. Complexity
Virtualization can be complex to set up and manage, especially when multiple VMs are
involved. It may also require additional configuration and maintenance.
4. Security risks
Virtualization can introduce additional security risks, especially if VMs are not properly
isolated from each other and from the host machine. Malicious code running in a VM can
compromise other VMs and the host machine.
5. License cost
Some software licenses may not allow installation on virtual machines or require an
additional license fee per VM.
6. Single point of failure
If the host computer fails, all VMs running on the host computer will also fail unless backup
and redundancy mechanisms are in place.
Conclusion
Although virtual machines come with many benefits, including cost savings, efficiency gains,
and enhanced security measures, they also present some challenges that must be taken into
account before deciding whether this technology is right for your business needs. If this
article helped a bit also, please consider liking it and sharing with your friends.