User:Barnet.Herts/Sandbox
Virtual Machine Disk Images
[edit]A virtual disk image is a file on a physical disk, which has a well-defned, published or proprietary, format and is interpreted by a Virtual Machine Monitor as a hard disk. In terms of naming, a virtual disk image for a certain Virtual Machine monitor has a specific file type extension, e.g., .vmdk for VMware VMDK, .vhd for Xen and Microsoft Hyper-V, .vdi for Oracle VM VirtualBox, etc.
Storage Allocation
[edit]There are two schemes pre-dominant across all Virtual Machine Monitor implementations, namely,
- Pre-allocate the entire storage for the virtual disk upon creation, or,
- Dynamically grow the storage on demand
Pre-Allocated Storage
[edit]The virtual disk is implemented as either split over a collection of flat files, typically each one is 2GB in size, collectively called a split flat file, or as a single, large monolithic flat file. The pre-allocated storage scheme is also referred to as a thick provisioning [1] scheme.
Dynamic Storage Growth
[edit]The virtual disk can again be implemented using split or monolithic files, except that storage is allocated on demand. Several Virtual Machine Monitor implementations initialize the storage with zeros before providing it to the virtual machine that is in operation. The dynamic growth storage scheme is also referred to as a thin provisioning [1] scheme.
Raw Disk Mapping
[edit]There are two modes in which a raw disk can be mapped for use by a virtual machine
Virtual mode
[edit]The mapped disk is presented as if it is a logical volume, or a virtual disk file, to the guest operating system and its real hardware characteristics are hidden. In this mode, file locking provides data protection through isolation for concurrent updates; the copy on write operation enables snapshots. Virtual mode also offers portability across storage hardware because it presents the consistent behavior as a virtual disk file.
Physical mode
[edit]In this mode, also called the pass through mode, the Virtual Machine Monitor bypasses the I/O virtualization layer and passes all I/O commands directly to the device. All physical characteristics of the underlying hardware are exposed to the guest operating system. There is no file locking to provide data protection.
Survey of Storage Allocation Policies and Raw Disk Mapping Support
[edit]This section intends to survey the storage allocation policies supported by several commercial Virtual Machine Monitors for creating virtual disks, and the support for raw device mappings. "Native" indicates that the capability is natively built-in to the product, "Import" indicates that a format conversion is necessary before the Virtual Machine Monitor can employ it.
Operation | Create Virtual Disk and Allocate Storage | Raw Disk Mappings | ||||
---|---|---|---|---|---|---|
Policy | Pre-allocate | Allocate On Demand | ||||
File / Disk Type | Split File Flat | Monolithic File Flat | Split File Sparse | Monolithic File Sparse | Virtual Mode | Physical Mode (Passthru) |
Commercial Products | ||||||
VMware ESX Server [2] [1] | Import | Native | Native | Native | Native | Native (SCSI) |
VMware Workstation [3] | Native | Native | Native | Native | Native (IDE) | |
VMware Fusion [4] | Native | Native | Native | Native | ||
VMware Server [5] | Native | Native | Native | Native | ||
Xen [6] | Native | Native | Native | Native | Native | |
Microsoft Windows Server 2008 R2 [7] | Native | Native | Native | |||
Microsoft Virtual PC 2007 [8] | Native | Native | ||||
Microsoft Virtual Server 2005 | Native | Native | ||||
VirtualBox [9] | Import | Native | Import | Native | Native | |
Parallels Desktop [10] | Native | Native | Native | Native | ||
Parallels Workstation [11] | Native | Native | Native | Native | ||
Parallels Server Bare Metal [12] | Native | Native | Native | Native |
Virtual Disk Formats
[edit]The following table provides a compatibility matrix that shows which particular virtual disk format is supported by a Virtual Machine Monitor. The term Native represents that the Virtual Machine Monitor inherently supports a particular virtual disk format, whereas, the term Import indicates that a conversion tool should be used to convert that format to another natively supported format.
Commercial Products | VMDK | VHD | Virtual Desktop Image | Oracle VM Image | Parallels hdd | qcow qcow2 |
---|---|---|---|---|---|---|
VMware ESX Server | Native | Import | ||||
VMware Workstation | Native | |||||
VMware Fusion | Native | |||||
VMware Server | Native | |||||
Xen | Native | Native | ||||
Microsoft Windows Server 2008 R2 | Native | |||||
Microsoft Virtual PC 2007 | Native | |||||
Microsoft Virtual Server 2005 R2 | Native | |||||
Oracle VM VirtualBox | Native | Native | Native | |||
Oracle VM | Import | Import | Native | |||
Parallels Desktop | Native | |||||
Parallels Workstation | Native | |||||
Parallels Server Bare Metal | Native | |||||
QEMU | Native | Native | Native |
Note that QEMU is strictly not a Virtual Machine Monitor. However, given that it is an integral component of key open source implementations, e.g., Xen, KVM, it is referenced here for completeness.
Offline Virtual Image Operations and Tools
[edit]This section surveys the tools offered by Virtual Machine Monitor and third-party vendors for some of the common operations performed on virtual disk images. The tools are offered either as,
- A packaged suite for a given product line, e.g., vmkfstools [1] for VMware ESX, vmware-viskmanager [13] for VMware Workstation, Fusion and Server; vboxmanage [9] for VirtualBox, or,
- Discrete tools supporting one or more operations on virtual disk files of a given format, e.g., VHD Tool[14], or across one or more product lines, e.g., SCVMM [15], or,
- Built-in menu items in the user interface of the product, e.g, create (new) virtual disk, in VMware Workstation, Fusion, and Server; VirtualBox; Parallels Dekstop and Workstation.
Each tool requires that the virtual disk image should be offline, i.e., no virtual machine that uses this virtual disk image should be executing when the operation is performed.
Note that the extension / expansion / enlargement is meaningful only for those virtual disk images that have pre-allocated storage. The shrink and defragment operations are supported only for virtual disk images that grow dynamically by allocating storage on demand. The latter operations are performed on the disk blocks belonging to the virtual disk image; a subsequent OS-level defragmentation is necessary to return blocks freed by them to the unallocated list.
The table below lists the virtual disk image operations and the tools available for performing them per commercial product.
Virtual Disk Image Operation | Create | Convert (Import) | Export | Clone | Extend / Expand / Enlarge | Shrink | Defragment | Live Migrate |
---|---|---|---|---|---|---|---|---|
Disk Type | All | All | All | All | Pre-Allocated | Dynamic Growth | Dynamic Growth | All |
Commercial Products | ||||||||
VMware ESX Server [2] [1] | vmkfstools [1] | vmkfstools [1] | vmkfstools [1] | vmotion [16] | ||||
VMware Workstation [3] | vdiskmanager [13] | vdiskmanager [13] | vdiskmanager [13] | vdiskmanager [13] fatVM [17] |
vdiskmanager [13] | vdiskmanager [13] contig [18] |
||
VMware Fusion [4] | ||||||||
VMware Server [5] | ||||||||
Xen [6] | ||||||||
Microsoft Windows Server 2008 R2 [7] | Hyper-V Manager [19] | Hyper-V Manager [19] SCVMM [15] |
Sysprep [20] | Hyper-V Manager [19] | Hyper-V Manager [19] SCVMM [15] |
|||
Microsoft Virtual PC 2007 [8] | vhdtool [14] | SCVMM [15] vmdk2vhd [21] StarWind [22] WinImage [23] SmartVDK [24] |
vhdtool [14] VHD Utility [25] VHD Resizer [26] EASEUS [27] eXPander [28] |
SCVMM [15] VHD Resizer [26] |
contig [18] | |||
Microsoft Virtual Server 2005 | ||||||||
VirtualBox [9] | vboxmanage [9] | vboxmanage [9] | vboxmanage [9] | vboxmanage [9] | vboxmanage [9] | contig [18] | vboxmanage [9] | |
Parallels Desktop [10] | File Menu [10] | Transporter [29] | Transporter [29] | Clone VM Assistant [10] | Image Tool [30] | Compressor [31] | ||
Parallels Workstation [11] | File Menu [11] | Clone VM Wizard [11] | Image Tool [30] | |||||
Parallels Server Bare Metal [12] | New VM Assistant [12] | Clone VM Assistant [12] |
There is a cluster of third party tools available for Microsoft Virtual PC and Virtual Server product lines for converting non-Microsoft virtual disk image formats to the VHD format, and for resizing (expanding or shrinking) virtual disk images in the VHD format.
References
[edit]- ^ a b c d e f g h [1], VMWare ESX Configuration Guide
- ^ a b [2],VMware vSphere Basic System Administration.
- ^ a b [3], VMware Workstation User's Manual
- ^ a b [4], Getting Started with VMware Fusion.
- ^ a b [5], VMware Server User's Guide.
- ^ a b [6],Xen Users' Manual.
- ^ a b [7], Storage options for Windows Server 2008 Hyper-V.
- ^ a b [8], VIrtual hard Disk Image Format Specification. Cite error: The named reference "msftvhd" was defined multiple times with different content (see the help page).
- ^ a b c d e f g h i [9], VirtualBox User Manual. Cite error: The named reference "vbox" was defined multiple times with different content (see the help page).
- ^ a b c d [10], Parallels Desktop User's Guide.
- ^ a b c d [11], Parallels Workstation User's Guide.
- ^ a b c d [12], Parallels Server Bare Metal User's Guide.
- ^ a b c d e f g [13], VMWare Virtual Disk Manager User's Guide
- ^ a b c [14],VHD Tool
- ^ a b c d e [15], System Center Virtual Machine Manager Cite error: The named reference "scvmm" was defined multiple times with different content (see the help page).
- ^ [16], VMware VMotion datasheet
- ^ [17], fatVM
- ^ a b c [http://technet.microsoft.com/en-us/sysinternals/bb897428.aspx, Windows Sysinternals Contig Cite error: The named reference "contig" was defined multiple times with different content (see the help page).
- ^ a b c d [18], Hyper-V Manager. Cite error: The named reference "hypervmgr" was defined multiple times with different content (see the help page).
- ^ [19], How to use Sysprep: An Introduction.
- ^ [20], VMDK(VMware) to VHD Converter
- ^ [21], StarWind V2V Converter
- ^ [22], WinImage
- ^ [23], SmartDeploy
- ^ [24], VHD Utility
- ^ a b [25], VHD Resizer
- ^ [26], EASEUS Partition Master
- ^ [27], eXPander
- ^ a b [28], Parallels Transporter User Guide.
- ^ a b [29], Parallels Image Tool User's Guide.
- ^ [30], Parallels Compressor User's Guide.