Fundamentals of Virtualization · Lessons 9–11

Fundamentals of Virtualization Study Guide: Final Exam

Exam-focused review of virtual storage, virtual networking, VM cloning, templates, snapshots, and virtual-disk file management.

  • study-guide
  • virtualization
  • storage
  • networking
  • virtual-switches
  • cloning
  • snapshots

How to use this guide

This guide combines the Lessons 9–11 chapter material. It is organized by lesson so you can connect storage and networking abstractions to the files and tools used to copy and protect virtual machines.

Study in this order:

  1. Learn the vocabulary and comparisons in the lesson summaries.
  2. Trace each virtual storage or network request from the guest through the hypervisor to the physical resource.
  3. Revisit the high-yield distinctions and the final checklist in the lesson summaries without looking at the source notes.

The ideas that connect Lessons 9–11

These lessons follow a virtual machine beyond its initial installation. Storage and networking determine how a VM communicates with the outside world and how well it performs. VM files, templates, clones, and snapshots determine how it can be repeated, moved, tested, and recovered.

The four ideas below connect the lessons:

  • Abstraction: the guest uses virtual disks and NICs while the hypervisor maps requests to physical or network-backed resources.
  • Performance and contention: capacity, latency, queueing, and bandwidth matter in addition to the amount of storage or the speed of a link.
  • Isolation: virtual switches, storage paths, and copy-on-write protect workloads while allowing controlled sharing.
  • Lifecycle management: templates, clones, snapshots, and consolidation are different tools with different purposes and risks.

Lesson 9 — Managing Storage for a Virtual Machine

Virtual storage paths

Virtual machines connect to storage in much the same way physical servers do, but the hypervisor abstracts the physical path. The guest uses a virtual storage controller or disk driver; the hypervisor or a privileged service maps the request to a physical interface, storage array, file system, volume, or network storage resource.

A storage pipe is the capacity available for data throughput. A narrow or congested pipe can limit performance even when the VM has adequate CPU and memory. Evaluate throughput, latency, queue depth, contention, and I/O patterns rather than looking only at disk capacity.

Common storage connections include:

  • DAS: Direct-attached storage connected to a server. It is internal to the host, unlike SAN and NAS, which connect through a dedicated storage network or NIC.
  • NAS: Network-attached storage presented as file-based storage over a network. It lets a server access disk storage that is not part of its own hardware configuration.
  • SAN: Storage-area network that provides block storage through a dedicated storage network.
  • HBA: Host-bus adapter used to connect a server to specialized storage, commonly Fibre Channel. It is a specialized controller that a SAN or NAS uses for communication.
  • SSD: Solid-state storage with no spinning platters or moving heads; typically much faster than magnetic disks. An SSD can read information in about 0.1 ms where a hard disk takes about 5 ms. SSDs offer less capacity than hard disks, so they are the fastest place to stage a desktop template and cut deployment (instantiation) time.

The Fibre Channel controller, host-bus adapter, network-attached storage, direct-attached storage, network interface controller, and storage-area network all use drivers that the operating system uses to communicate with them; the virtual machine monitor is not one of these devices. VMware’s major difference from other hypervisor technologies is its I/O throughput architecture.

Storage traffic can share network paths with user traffic, but isolating storage I/O with separate virtual and physical paths can improve predictability and security.

Optimization techniques

Data deduplication locates identical chunks at the byte, block, or file level, retains one copy, and replaces duplicates with pointers to the original. It can reclaim substantial space when many VMs contain identical operating-system or application data. The steps are: locate the identical chunks of data, flag the original data, and replace the duplicates with pointers to the original. Deduplication is the storage analogue of page sharing.

Thin provisioning does not reserve all maximum disk space when a file system or virtual disk is created. The storage grows as data is written. Thin provisioning improves utilization but creates risk if multiple file systems grow until the underlying storage is full. Thick provisioning reserves the space up front. With thin provisioning, each file system believes it has more space available than actually exists.

Tiered storage combines storage classes with different performance, cost, and availability characteristics. Data can be migrated between tiers based on need. SSDs are commonly used for higher-performance tiers; magnetic disks may provide lower-cost capacity. The tiers have different performance and availability properties but are all part of the same data storage array, and data can migrate from one tier to another.

Storage I/O control applies quality-of-service policies to a VM, group of VMs, or class of traffic. It helps protect business-critical workloads during I/O contention.

Data mirroring is RAID level 1, and disk striping uses multiple drives to reduce throughput time. Combining mirroring and striping increases both data availability and performance, but it doubles the number of disk drives. Ballooning is not a storage technique; it is a memory-optimization technique.

RAID comparisons are useful for recall:

Technique Main idea Typical benefit
Mirroring / RAID 1 Keep duplicate copies on separate disks Availability and read resilience
Striping / RAID 0 Spread blocks across disks Performance and throughput, no redundancy
Mirroring plus striping / RAID 10 Combine duplicate copies with distributed blocks Performance plus availability

Virtual-disk maintenance

Defragment rearranges the data files in a virtual disk into a more compact configuration but does not reclaim emptied space. Compact reclaims the emptied space, shrinking the virtual disk file on the host. Expanding a virtual disk is a separate operation that increases its capacity.

Lesson 9 terms to know

storage pipe, DAS, NAS, SAN, HBA, SSD, thin provisioning, thick provisioning, data deduplication, tiered storage, storage I/O control, RAID, compact, defragment, and I/O throughput architecture.

Lesson 10 — Managing Networking for a Virtual Machine

From virtual NIC to physical network

The guest operating system communicates with a virtual NIC through a driver. The hypervisor provides the virtual NIC or emulator and manages traffic between the VM, virtual switch, host, and physical NIC. A virtual switch connects VMs to one another and, when configured, connects them to physical networks. A virtual switch creates a network inside the host on which the VMs on that host connect, and it helps isolate network segments from each other; a virtual adapter, a NAT device, and a DHCP server do not. The hypervisor manages the network traffic in and out of each VM and the host.

Virtual networks extend physical networking practices into the host. Network isolation, bandwidth planning, monitoring, and quality of service remain important because consolidation places many workloads on one physical system.

An internal virtual switch can keep traffic entirely within the physical host. VM-to-VM traffic on the same host may be handled in memory and can be very fast, but external monitoring tools may not see it because the traffic never reaches the physical network. Because the traffic never leaves the physical host, an internal switch gives very fast communication with the shortest network latency, but standard monitoring tools cannot see it.

Network connection types

Connection type VM visibility and reachability
Internal VM-to-VM traffic on the same host; no host or external-network access unless separately configured
Host-only VM communicates with the host and other VMs on the isolated network; not directly reachable from the physical network
NAT VM reaches outside networks through host address translation; outside systems normally cannot initiate a connection directly to the VM
Bridged VM appears as a separate device on the physical network with an address reachable from outside the host

DHCP assigns an IP address to a requesting computer or device. In VMware Workstation, common virtual-network mappings include VMnet0 for bridged networking, VMnet1 for host-only networking, and VMnet8 for NAT. A host-only network’s address range is configured through its subnet IP field, and local DHCP can distribute addresses within that range. In the Virtual Network Editor, highlighting VMnet1 shows the host-only network’s configuration settings, and the Subnet IP field sets the address of the isolated host-only network. Host-only and NAT networks both give a VM an IP address that is isolated from the physical network; a bridged network gives each VM an address reachable from outside the host. A LAN segment is a private network shared between VMs. NAT is the default network setting when a VM is created in VMware Workstation Player: it protects the new operating system from the outside world until security software is installed and hides the network topology from unwanted probing.

Virtual switches and traffic management

There are three types of virtual switch: internal, external, and storage. An internal switch connects VMs inside the physical host and provides an isolated virtual segment; an external switch connects the virtual NIC to the physical NIC and the network outside the host; a storage switch connects to the physical NICs and the network storage devices. The three types are identical in construction and operation but have different functions. A virtual switch can isolate network segments from one another and control which interfaces or VLAN paths are available.

Storage traffic should be isolated from user traffic when possible. Network I/O control and comparable quality-of-service tools can protect bandwidth for individual VMs, groups, or classes of traffic during contention. Distributed or centrally managed switch technologies propagate configuration consistently across the appropriate virtual switches; check the specific hypervisor and switch product for the supported behavior. Switches that propagate changes to all appropriate switches on a virtualization host include the Hyper-V Virtual Switch, Cisco Nexus 1000V, Open vSwitch, and the VMware Distributed Switch; the VMware Standard Virtual Switch works within a single host only.

Lesson 10 terms to know

virtual NIC, virtual switch, internal network, host-only network, NAT, bridged networking, DHCP, VMnet0, VMnet1, VMnet8, LAN segment, storage virtual switch, and network I/O control.

Lesson 11 — Copying a Virtual Machine

VM composition and cloning

A VM is composed of files. In VMware terminology:

  • .vmx describes virtual hardware and configuration.
  • .vmdk contains virtual-disk data or references the disk backing files.
  • .vmsn records snapshot state information.
  • .vmsd stores snapshot metadata and the snapshot hierarchy.
  • .vmem stores the VM’s memory state when a snapshot captures it.
  • Log files record runtime and diagnostic information.

Copying the configuration and disk files can duplicate the VM, but the new VM must receive a unique identity. Duplicate IP addresses, hostnames, machine identifiers, or virtual network identities can cause network and management problems. Vendor management tools are safer than manually editing files because they automate registration and customization. Sysprep is a Windows-specific utility that can help customize a cloned Windows VM. It customizes each Windows installation from a standard image into a unique copy of the OS and can add device drivers and applications; each Windows version has its own version of Sysprep, and it is not a security feature.

After cloning, compare the clone with the original (for example, with ipconfig) and change the IP address if it is identical, because two identically addressed systems cause network problems; the number and type of adapters and connections can match the original.

The .vmx configuration file and the .vmdk virtual-disk file are the two files critically required to copy a VM. The .vmsn file is used to return to the VM state at the time of a snapshot, .vmsd holds the snapshot information, and .vmem holds the memory state after a snapshot. Hidden file extensions can be shown in Windows Explorer by choosing View, selecting Preview pane, and checking the File name extensions box. A cloned VM may fail to boot if changes to the .vmx file were incorrect, if the edited names do not match the .vmdk disk file names, or if the virtual disk was not stored as a single file.

Templates and clone types

A template is a validated, approved “golden image” containing an operating system, patches, approved utilities, and sometimes applications. Templates are normally read-only or prevented from normal operation so that the baseline is not changed accidentally.

Two common clone types are:

  • Full clone: Independent replica of the original VM; requires comparable storage for the copied data.
  • Linked clone: Uses the original VM as a reference and stores changes in a delta disk; saves space but depends on the parent and can introduce performance or availability considerations.

Many VMs can be cloned at the same time, but the operation depends heavily on storage I/O bandwidth. If a VM is in template mode, a snapshot is used as the clone. VMware Workstation Player does not clone from a template; VMware Workstation Pro does. If the directory of an existing VM cannot be located, in Workstation Player open the player and pick the VM, edit the hardware settings of the selected VM, and use the Options tab to create the clone in a new directory.

Templates are molds for creating standardized VMs. A clone is a new VM identity based on an existing VM or template. Do not confuse a template, clone, and snapshot.

Snapshots and sparse disks

A snapshot captures a VM’s state at a point in time so changes can be tested and later undone. It is not a backup solution. When a snapshot is taken, the original parent disk is locked for writes and a sparse child or delta disk receives changed blocks. The sparse disk is the child disk of the snapshot (a .vmdk file): the active VM reads from the sparse disk and the original parent disk but writes only to the child. Sparse disks prevent the need to create a full clone for a snapshot. This is a form of copy-on-write: unchanged blocks remain in the parent while new or changed blocks are written to the child.

Snapshot memory state is stored separately when included. Reverting to a snapshot discards or resets the child-disk changes and returns the VM to the captured state. Deleting a snapshot removes or merges the child changes according to the selected operation and eventually allows the parent disk to accept writes again. In other words, when the snapshot file is removed the parent disk is unlocked for writes.

With multiple snapshots, the disks form a parent-child chain. Consolidation collapses the chain by merging changed blocks from a child into its parent, then continuing until the desired state is represented in the original VM. With two child disks, the data blocks unique to the second child disk are merged into the first child disk, and then the first child disk is collapsed into the parent disk. Long-lived or numerous snapshots can consume space and reduce performance, so remove or consolidate them after testing.

Lesson 11 terms to know

.vmx, .vmdk, .vmsn, .vmsd, .vmem, template, full clone, linked clone, snapshot, sparse disk, delta disk, copy-on-write, Sysprep, consolidation, and Workstation Pro.