Join Timothy Pintello for an in-depth discussion in this video Exploring Hyper-V's virtual disk formats, part of Configuring Windows Server 2012 R2 Hyper-V.
- View Offline
- Let's go ahead and discuss Virtual Disk Formats next. Windows Hyper-V supports two different disk formats. One, is the the Original VHD format, which stands for Virtual Hard Disk, and the other is the new VHDX format, which is only available in Server 2012 and Windows 8. The Original VHD Format had three types of VHD images which you could create. They were also limited to a maximum of 2TB per each virtual hard disk. One advantage of the VHD format is it's compatible with all the Hyper-V products whether it's Server 2008, Server 2012, and is compatible with all of Microsoft Type II Hyper-Vs such as virtual PC inside the other ones we mentioned previously in the course.
There are three types of VHD Image Files possible. The first one is the Fixed hard disk image. The second is the Dynamic hard disk image. And the third is the Differencing hard disk image. In the Fixed Hard Disk Image, this is a hard disk file or virtual hard disk file that's been set at the full size as allocated to the virtual hard disk. As far as storage terms, this is wasteful because if we have set aside 20Gb of storage for a virtual hard disk, then that 20Gb is taken out of the storage available to the Hyper-V server whether or not you're using the full 20Gb or not.
So as a result you can end up with a lot of emty space just being taken up by VHD image. However, from the point of view of the processor, this is actually very efficient way to do things. The reason it's efficient from the processor's point of view is because there is no overhead expanding by the processor to dynamically expand the virtual hard disk as more space is needed. And so that takes one load of the prcessor if the virtual hard disk's image already has a fixed size that is not changing.
The Dynamic Hard Disk Image instead is set to a maximum hard disk size. However, the VM is only going to use as much as it needs, it does not have to use the full 20Gb example of the hard disk space. It can use 10Gb, or 5Gb, or whatever it needs, but as you add more software into the operating system, or whatever inside the Virtual Machine, the virtual hard disk will expand to accommodate that up to but not exceeding the maximum amount you set it to.
In essence, when using dynamic hard disk images it starts small and grows larger as needed. The Differencing Hard Disk Image is a different kind of thing all together. The differencing hard disk image actually takes a child image file and associates it with a specific parent image. After it does this all the changes made to the parent image are then written to the child image. This can be done to manage the disk space but more imprtantly, it can be used to facilitate a rollback to a previous state at a later time, because all the changes are being recorded as their made on the child image.
The other format that Hyper-V Server 2012 allows is the VHDX format. This is an updated version of VHD format and it was introduces in Server 2012. A disk image that is used in the VHDX format will have VHDX file extension at the end of the hard disk image. This image has some of the older VHD format in that it supports files up to 64TB instead of the 2TB that the VHD format was limited to.
Also, VHDX format supports 4KB sector sizes for compatibility to 4 KB devices. What this means is, as you have a larger hard drive, in previous technologies the sector size grew based on the size of the hard drive. The newer hard drive technologies, though, use just a set 4KB sector size and no matter how large the hard drive is, the sector sizes stay 4KB.
The new VHDX format actually allows you to do that with a virtual hard disk and not just the newer physical hard disk. However, the VHDX format also supports sector sizes up to a total to 256MB. Now, the reason you may want a sector size of 256MB is in the case of a very large database file or something, or very large Virtual Machine file, if you're moving the Virtual Machines around inside Hyper-V or between Hyper-V servers, it's much easier to move very large block sector sizes than it is a whole bunch of really small block sizes.
One thing to remember about the VHDX format is it's only readable in Server 2012 or Windows 8 and higher. Anything less than Server 2012 or Windows 8 cannot read the new VHDX format.
- Implementing and installing Hyper-V
- Using Hyper-V Manager
- Creating a new virtual machine
- Configuring dynamic memory, smart paging, resource metering, and more
- Creating virtual hard disks
- Managing checkpoints
- Connecting to a SAN
- Creating virtual switches and network adapters
- Creating virtual network configurations