While anyone who has experience creating virtual disks in Server 2008
R2’s Hyper-V should have little to no trouble figuring out how to create
VMs and virtual disks in Hyper-V R3, there are some new features available
in the procedures. One of the most significant is a new file format for
virtual disks.
Configuring Virtual Disks
Hyper-V R3 uses a new file format for virtual hard disks: .VHDX. In Server 2008 R2, the file format is .VHD. VHDX
supports virtual hard disk storage capacity up to 64 TB (VHD supports up
to 2 TB). Virtual disks are storage resources for VMs, and the great thing about them
is that they dynamically expand—seamlessly—as you add content to the
VMs.
Note
Traditionally, hard drives have used 512 KB disk sectors. To
accommodate the demand for huge storage capacity and the latest in
storage technology, vendors developed drives that use 4 KB disk
sectors, which is now the standard.
Of course, you can also use physical disks for VM storage: disks
that are installed on the host machine or use a LUN (logical unit
number) in a SAN (storage attached network) solution. In this example,
we’re creating a virtual disk that dynamically expands. From Server
Manager, click Tools and then Hyper-V Manager. From the right-side
Actions menu, click New and Hard Disk. This launches the New Virtual
Hard Disk wizard. The first option is to choose the disk format, either
VHD or VHDX. Although VHDX supports larger capacities and gives better
data protection, the format also supports only Windows Server 2012. If
your virtual environment requires the use of legacy Windows Servers, you
will have to use VHD. See Figure 1 for the New Virtual Hard Disk wizard’s Choose Disk Format
window.
The next configuration option is selecting the disk type. There
are three types of virtual disks that you can create:
- Fixed
-
Fixed disks provide the best performance. If you’ll be using the
virtual disk with heavy I/O applications, such as a database with
a high level of transactions, this is the best choice. Planning
the size of a fixed disk is critical, because whatever capacity a
fixed disk is created in is the capacity it remains, no matter how
much data gets added.
- Dynamically expanding
-
A dynamic virtual disk will automatically expand as capacity needs increase. As
long as it’s used for applications that are not I/O heavy and
don’t consume lots of disk resources, for many infrastructures
it’s probably the most common option.
- Differencing
-
Differencing virtual disks is associated with another disk, which acts as a parent
disk. Changes can be made to the child/differencing disk without
affecting the parent disk. Differencing disks are typically used
in testing and development environments, where changes will be
written to a disk in testing and then the testers want to deploy
an identical image without the changes to retest. Differencing
disks are likely the least common disk type deployed in production
environments.
Now select “Dynamically expanding” and click Next. In the “Specify
Name and Location” window, name the virtual disk and select a location
for the files.
In the Configure Disk window, you can create a blank virtual disk and specify its size,
or you can copy the contents of a physical disk attached to the host, or
from another virtual disk—great time savers if you have images on
another disk that you want to add to a new virtual disk. Click Next, and
the disk setup is complete.