1 Virtualization and Hypervisors
Learn how virtualization and hypervisors create isolated virtual machines, allocate shared hardware resources, and affect workload performance.
Virtualization and virtual machines
Virtualization abstracts physical computing hardware so that multiple isolated computing environments can share one physical computer. Each environment is a , with its own guest operating system and applications, and virtual processors, memory, storage, and network devices.
The physical computer that runs VMs is the host; the operating systems inside the VMs are guests. The creates and manages the VMs, providing each guest with a consistent, separate view of a computer while sharing the host’s physical resources underneath.
For example, one server might run a Linux VM for a web application and a Windows VM for a business application. They can operate independently while using the same physical processor, memory, storage system, and network hardware. Virtualization can improve hardware utilization and make separate workloads easier to run or manage, but it does not create additional physical capacity. The must control access to shared resources and preserve isolation among VMs.
types
The main distinction between types is where the runs in the software stack. Both types provide virtual hardware to guests and coordinate access to physical resources.
: Runs directly on the computer’s hardware and manages guest VMs. It is commonly used for server virtualization; Microsoft Hyper-V and VMware ESXi are examples. Hyper-V has a root partition that manages hardware services and child partitions that host VMs. This supporting operating-system partition does not change its Type 1 classification.
: Runs as software on top of a conventional host operating system. The host operating system manages the physical hardware, and the runs as an additional layer to provide VMs. Oracle VirtualBox is an example. This arrangement is often convenient for desktop use, testing, or running another operating system on a personal computer.
Processor and memory allocation
A VM is configured with virtual resources, which the maps and schedules onto the host’s actual hardware. An allocation setting describes what a guest can see or use; it does not necessarily mean an equivalent physical resource is permanently reserved for that VM.
Processor
A VM receives one or more virtual CPUs (vCPUs). When the guest needs processor time, the schedules its vCPUs onto host physical or logical processors. If multiple VMs need CPU time at once, they share it according to the ’s scheduling rules and configured controls, such as a reserve, limit, or relative weight. A vCPU is not automatically a dedicated physical CPU core.
A host with eight logical processors could run several VMs, each configured with multiple vCPUs, so their combined configured vCPU count may exceed the host’s logical processor count. This can work when workloads do not all need peak CPU time simultaneously; heavy concurrent demand can cause delays as VMs wait for processor time.
Memory
A VM’s is treated by its guest operating system as its own RAM. The must back that memory with host resources and retain enough capacity for the host itself. Depending on the platform and VM configuration, memory may be fixed or dynamically adjusted within configured limits. Dynamic allocation can help share available memory among workloads, but it cannot guarantee that every VM receives its maximum requested amount at the same time. If the host is short of memory, performance may fall or a VM may be unable to start.
Storage and network resources
A VM sees virtual disks backed by storage on the host or by a connected storage system. A virtual disk may be represented by a file or another virtualized storage resource. The guest uses it as though it were a physical drive, while the host’s storage system supplies the actual capacity and handles the underlying input and output. VMs share storage performance, so heavy disk activity can affect other workloads.
A VM also receives a virtual network interface. A can connect that interface to other VMs, the host, or an external physical network. The routes VM traffic through the virtual networking layer and, when needed, the host’s physical network adapter. Network bandwidth is shared with other traffic using the same connection.
Planning resource allocations
Effective allocation balances VM needs with host capacity. Administrators consider typical and peak demand, leave capacity for the host, and monitor whether processor, memory, storage, or network activity is becoming a bottleneck.
Assigning more virtual resources than a workload needs can increase competition without improving performance. Assigning too few can constrain the guest even when the host has spare capacity. Virtualization allows flexible sharing, but good performance depends on matching virtual allocations to available physical resources and accounting for workload demand and contention.