Brian Jackson - Fotolia
A virtual machine is a logical representation of a physical computer. There are many benefits of VMs, but before getting into that list, it's important to look at how VMs are created and how they work. To create a VM, a hypervisor is first installed on the physical computer. There are numerous hypervisors available in today's marketplace, but VMware ESXi -- part of vSphere -- and Microsoft Hyper-V are the two most commonly used commercial products, while KVM is frequently employed as a hypervisor in Linux distributions.
The hypervisor provides a layer of software abstraction -- a virtualization layer -- between the underlying hardware and the software above it. The hypervisor is then able to use computing resources from the underlying hardware to create a completely isolated logical instance that behaves as if it was a separate computer. For example, hypervisor management tools provision the memory space and processor cores used to operate the VM. Once created, each VM instance can support its own OS and applications.
There are basically two types of hypervisors. A Type 1 hypervisor installs directly onto physical hardware, called a bare-metal hypervisor. A Type 2 hypervisor installs onto an existing host OS, called a hosted hypervisor. Type 1 hypervisors are typically far more commonly used because direct access to underlying hardware generally yields the best performance and allows the largest number of VMs to reside on the physical system. When a Type 2 hypervisor operates through a host OS, the compute overhead needed by the host OS often reduces available compute performance and effectively limits the number of VMs supported by the physical system. However, the VMs created and operated by both hypervisors are essentially identical.
Benefits of VMs
There are several benefits of VMs. First, VMs fundamentally allow multiple independent instances to coexist simultaneously on the same physical server. This allows vastly increased utilization of the physical server's resources, requiring fewer physical systems to operate the same number of business workloads, resulting in lower system maintenance costs, less power consumption and reduced cooling demands for the enterprise. This typical usage is known as server consolidation, where the workloads from two or more physical servers are deployed on VMs that are then relocated to the same physical server.
Workload mobility is another one of the many benefits of VMs. OSes and applications installed directly onto physical hardware are generally tied to specific attributes of the hardware, such as a particular device driver. The abstraction provided by a hypervisor presents computing resources as virtualized representations that are independent of the underlying hardware. This allows a VM to be migrated across the LAN from one physical system to another, usually with little -- if any -- interruption to the VM. The only migration requirements are a compatible hypervisor and adequate computing resources on the destination server to support the VM. This process is commonly called live migration.
Also included in the benefits of VMs list is fast duplication. VMs are basically code and data instances running inside allocated memory space. This means a complete VM is easily represented as a disk file, usually with a .vmdk or .vhdx extension. An entire VM, with its OS, drivers, applications and associated data, can be encapsulated in a disk file that can be loaded quickly to startup a VM -- and readily duplicated to create clone VMs in volume, as long as OS and application licenses allow. In addition, the changing state of a VM can be captured as disk files called snapshots, allowing the VM's state to be preserved to storage at regular intervals and quickly restored to a known point in time if the need arises, such as a VM crash. VMs can also be backed up in a more traditional manner using virtualization-aware backup tools.
Disadvantages of virtual machines
The only significant disadvantages of VMs are related to performance and resource use. Virtualization allows the physical server's resources to be shared -- a feat almost impossible for traditional nonvirtualized systems. This potentially allows more resources to be provisioned to VMs than are physically present on the system -- a practice known as oversubscription. A relatively small amount of oversubscription rarely impacts VM performance because most workloads don't operate in a steady-state manner; instead their compute demands fluctuate over time and the hypervisor can shuffle some resources to accommodate changing demands. However, excessive oversubscription can seriously impair the performance of some VMs and perhaps even cause workload instability. IT administrators must allocate resources in a well-considered manner to avoid excessive oversubscription.
The second major disadvantage of VMs is the unavoidable risk that is present in server consolidation. When a traditional server fails, its resident workload fails, but other servers and workloads can continue unaffected. When a virtualized server fails, all of the resident VMs running on the system can become unavailable, resulting in far greater potential disruption for the enterprise. For example, if a virtualized server hosts 10 VMs, all 10 workloads may fail if a server fault occurs. IT administrators usually employ a combination of protection and availability tactics to mitigate disruption and speed recovery.
Learn why a bare-metal server could be the next best option
Are you an expert on hypervisor types?
Security requirements for Type 1 and Type 2 hypervisors
Three ways to use VM snapshots
The best strategy for backing up and recovering VMs