Virtual disk image
Encyclopedia
A virtual disk image is a file on a physical disk, which has a well-defined, published or proprietary, format and is interpreted by a Virtual Machine Monitor
as a hard disk. IT administrators and software developers administer them through offline operations using built-in or third-party tools. 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.
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.
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.
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.
Virtual machine
A virtual machine is a "completely isolated guest operating system installation within a normal host operating system". Modern virtual machines are implemented with either software emulation or hardware virtualization or both together.-VM Definitions:A virtual machine is a software...
as a hard disk. IT administrators and software developers administer them through offline operations using built-in or third-party tools. 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
VMDK
The VMDK file format is a type of virtual appliance developed for VMware products. The format is open/documented.-Products that use the format:* VMware Workstation* VMware Player* VMware Server* VMware Fusion...
, .vhd for Xen and Microsoft Hyper-V
VHD (file format)
A Virtual Hard Disk is a virtual hard disk file format, meaning it can contain what is found on a physical hard disk drive, such as disk partitions and a file system, which in turn can contain files and folders. It is typically used as the hard disk of a virtual machine...
, .vdi for Oracle VM VirtualBox, etc.
Storage allocation
There are two schemes predominant across all Virtual Machine Monitor implementations, namely,- Preallocate the entire storage for the virtual disk upon creation, or,
- Dynamically grow the storage on demand
Preallocated storage
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 scheme.Dynamic storage growth
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 scheme.Raw disk mapping
There are two modes in which a raw disk can be mapped for use by a virtual machineVirtual mode
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
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
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 | Import | Native | Native | Native | Native | Native (SCSI) |
VMware Workstation | Native | Native | Native | Native | Native (IDE) | |
VMware Fusion | Native | Native | Native | Native | ||
VMware Server | Native | Native | Native | Native | ||
Xen | Native | Native | Native | Native | Native | |
Microsoft Windows Server 2008 R2 | Native | Native | Native | |||
Microsoft Virtual PC 2007 | Native | Native | ||||
Microsoft Virtual Server 2005 | Native | Native | ||||
VirtualBox | Import | Native | Import | Native | Native | |
Parallels Desktop | Native | Native | Native | Native | ||
Parallels Workstation | Native | Native | Native | Native | ||
Parallels Server Bare Metal | Native | Native | Native | Native |
Virtual disk formats
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 VMDK The VMDK file format is a type of virtual appliance developed for VMware products. The format is open/documented.-Products that use the format:* VMware Workstation* VMware Player* VMware Server* VMware Fusion... |
VHD VHD (file format) A Virtual Hard Disk is a virtual hard disk file format, meaning it can contain what is found on a physical hard disk drive, such as disk partitions and a file system, which in turn can contain files and folders. It is typically used as the hard disk of a virtual machine... |
Virtual Disk Image VirtualBox Oracle VM VirtualBox is an x86 virtualization software package, originally created by software company Innotek GmbH, purchased by Sun Microsystems, and now developed by Oracle Corporation as part of its family of virtualization products... |
Oracle VM Image Oracle VM Oracle VM is the server virtualization offering from Oracle Corporation. Oracle VM is based on the open-source Xen hypervisor technology, supports Windows, Linux, and Oracle Solaris guests and includes an integrated Web based management console. Oracle VM features fully tested and certified Oracle... |
Parallels hdd Parallels, Inc. Parallels, Inc. is a privately held virtualization technology company with offices in the USA, Germany, UK, France, Japan, China, Russia and Ukraine. Parallels' US offices are in Renton, WA.The company has more than 700 employees as of 2010.... |
qcow qcow2 Qcow qcow stands for "QEMU Copy On Write" and denotes a disk storage optimization strategy that delays allocation of storage until it is actually needed. QEMU is an emulator and virtual machine container, and it can use a variety of virtual disk images which are generally associated with specific guests... |
---|---|---|---|---|---|---|
VMware ESX Server | Native | Native | ||||
VMware Workstation | Native | Native | ||||
VMware Fusion | Native | Native | ||||
VMware Server | Native | Native | ||||
VMware Player | Native | 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 | Native (v.2) | ||
Oracle VM | Import | Import | Native | |||
Parallels Desktop | Native | |||||
Parallels Workstation | Native | |||||
Parallels Server Bare Metal | Native | |||||
QEMU QEMU QEMU is a processor emulator that relies on dynamic binary translation to achieve a reasonable speed while being easy to port on new host CPU architectures.... |
Native | 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
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 for VMware ESX, vmware-vdiskmanager for VMware Workstation, Fusion and Server; vboxmanage for VirtualBox, or,
- Discrete tools supporting one or more operations on virtual disk files of a given format, e.g., VHD Tool, or across one or more product lines, e.g., SCVMM , 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 | vmkfstools | vmkfstools | vmkfstools | vmotion | ||||
VMware Workstation | vdiskmanager | vdiskmanager | vdiskmanager | vdiskmanager fatVM |
vdiskmanager | vdiskmanager contig |
||
VMware Fusion | ||||||||
VMware Server | ||||||||
Xen | ||||||||
Microsoft Windows Server 2008 R2 | Hyper-V Manager | Hyper-V Manager SCVMM |
Sysprep | Hyper-V Manager | Hyper-V Manager SCVMM |
|||
Microsoft Virtual PC 2007 | vhdtool | SCVMM vmdk2vhd StarWind WinImage SmartVDK |
vhdtool VHD Utility VHD Resizer EASEUS eXPander |
SCVMM VHD Resizer |
contig | |||
Microsoft Virtual Server 2005 | ||||||||
VirtualBox | vboxmanage | vboxmanage | vboxmanage | vboxmanage | vboxmanage | contig | vboxmanage | |
Parallels Desktop | File Menu | Transporter | Transporter | Clone VM Assistant | Image Tool | Compressor | ||
Parallels Workstation | File Menu | Clone VM Wizard | Image Tool | |||||
Parallels Server Bare Metal | New VM Assistant | Clone VM Assistant | ||||||
QEMU / KVM Kernel-based Virtual Machine Kernel-based Virtual Machine is a virtualization infrastructure for the Linux kernel. KVM supports native virtualization on processors with hardware virtualization extensions.... |
qemu-img create | virt-v2v | virt-clone | virt-resize | virt-resize | virsh migrate |
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.