In: Computer Science
Describe scenarios when you would use a Fixed-size virutal disk, a Dynamic virtual disk, and a Differencing virtual disk.
Fixed size, dynamically expanding, and differencing virtual disks:-Just like a physical machine, a virtual machine also requires a hard disk to function. In today’s blog post, we’ll discuss what virtual file formats are supported by Hyper-V and their types. We’ll also cover in detail about the different types of VHD/VHDX, and how to choose the right one for your requirements.
**A VHD is a type of file format for the virtual infrastructure, just like a physical hard disk. It has the functionalities of a typical hard drive but is installed and managed in a virtual setup. It often contains the same partitions and sectors as found on a physical drive, like partitioning and the file system. It can be stored in such a place where the physical host can access it.
**VHDX is another virtual file format in Hyper-V, and it came in with the release of Windows Server 2012. Before VHDX, Hyper-V virtual hard disks had a capacity of 2TB. VHDX offers a 64TB capacity. They have a 4KB logical sector size which contributes to better performance, and they are designed to be compatible with today’s modern hardware.
Fixed size virtual Disk:-
A fixed disk is created while creating a virtual machine in any virtualization platform (VMWare, Microsoft HyperV, Citrix Xenserver or even Virtualbox) or adding an extra disk to an existing virtual machine. In a fixed disk, the disk is given a maximum capacity size, this is the total capacity that is seen from inside the operating system. On the Host (the hypervisor that hosts the guest virtual machine that has the virtual disk) a virtual disk file is created, this may have a .vmdk file extension in VMWare or .vdk in Microsoft HyperV, the actual size of this file at the time of creation is the same as what you allocated the disk capacity to be, it remains constant and it does not expand or shrink.
**When you create a fixed-size virtual hard disk, space is reserved beforehand. Suppose you created a VHDX of 200 GB, then 200GB space will be reserved for you on the hard disk of the host. You may be using 5 or 50 GB out of it, so rest of the space is wasted and this is the real drawback of this virtual hard disk type.
PROs:
CONs:
Dynamically Expanding virtual Disk:-
Dynamic disks are also created at the time of virtual machine creation or adding a disk to the vm. The big difference is that the vmdk or vdk files that are created are not the same size as the capacity you allocate to the virtual disk. The files expand in size as they are utilized and consumed, so if there is only 20 GB filesystem used out of a total 40 GB, the virtual disk file may not be a complete 40 GB in size.
**When you create a fixed-size virtual hard disk, space is reserved beforehand. Suppose you created a VHDX of 200 GB, then 200GB space will be reserved for you on the hard disk of the host. You may be using 5 or 50 GB out of it, so rest of the space is wasted and this is the real drawback of this virtual hard disk type.
PROs:
CONs:
Differencing virtual Disk:-
Differencing disks are used in parent-child relationship. Data is written to the child virtual disk keeping the parent disk in read-only mode.
An example could be a sys preped operating system in the parent disk and multiple virtual machines using the child disk. Each VM uses its own differencing disk and writes data in it while the operating system binaries are placed on shared parent disk.
Although differencing disks take less space but if there are more child VHDs, many I/O reads will be involved on the parent VHD which could have negative effects on VM performance.
**A differencing disk contains block data that represents changes to a parent virtual hard disk. The salient properties of differencing disks are:
PROs:
CONs: