Virtual machines
Virtual machines (VMs) are software emulations of physical computers. They provide the functionality of a physical computer and can run an operating system and applications like a physical machine. VMs operate based on the concept of virtualization, which allows one physical server to host multiple virtual environments.
Why Virtual Machines are needed:
Resource Efficiency: Multiple VMs can run on a single physical server, allowing for better utilization of the server's computing resources.
Isolation: Each VM operates independently of others, providing a secure and isolated environment for applications. If one VM crashes, it doesn't affect the others.
Cost Savings: Virtualization reduces the need for physical hardware, saving on hardware costs and the associated maintenance, power, and cooling expenses.
Flexibility and Scalability: VMs can be easily created, duplicated, modified, and moved between host servers, making them highly scalable and adaptable to changing needs.
Testing and Development: Developers use VMs to create and test applications in different environments without the need for multiple physical machines.
. Legacy Systems: VMs can emulate older hardware and run legacy applications that may not be supported by newer systems.
How Virtual Machines work:
1. Hypervisor: This is the software layer that enables virtualization. It sits between the hardware and the virtual machines and is responsible for managing the system's resources so they can be properly distributed among VMs.
2. Virtual Hardware: The hypervisor presents virtual hardware to the VM, which includes a virtual CPU, memory, disks, and network interfaces. This hardware is actually mapped to the real, physical resources on the host machine.
3. Guest Operating System: Each VM runs its own guest operating system, which is oblivious to the fact that it is running on virtualized hardware.
4. Applications: On top of the guest operating system, applications can be installed and used as if they were operating on a physical machine.
In operation, when a VM is started, the hypervisor allocates the necessary computing resources to it. The VM then boots up its guest operating system and becomes ready to execute applications. The hypervisor manages the VMs' requests for CPU, memory, and I/O resources, translating these requests to the underlying physical hardware.
The main types of hypervisors are:
Type 1
Also known as "bare-metal hypervisors," they run directly on the host's hardware to control the hardware and to manage guest operating systems. Examples include VMware ESXi, Microsoft Hyper-V, and Xen.
Type 2
These run on a conventional operating system just like other computer programs. Examples include VMware Workstation and Oracle VirtualBox.
Virtual machines have become an integral part of computing infrastructure, from personal use to enterprise data centers, due to their flexibility, efficiency, and the abstraction they provide from physical hardware.