Dealing with VHDX files

Modern Art

Adding to Servers

Virtual hard drives can be attached to virtual SCSI controllers on the fly, but to build a virtual SCSI controller, you need to shut down the virtual server.

To add a new hard disk, right-click the virtual server and select Settings . Select the controller to which you are connecting the new virtual hard disk. Press Virtual Hard Disk and then press Add . Select the option Virtual hard disk and press New to launch the wizard for a new hard disk.

Confirm the wizard's welcome page, and select the format for the new hard disk, that is, VHD (up to 2TB) or VHDX (up to 64TB). Next, you can choose whether the hard disk has a Fixed size , is Dynamically expanding , or extends an existing hard drive (Differencing ).

You need to specify the name and location under which Windows Server 2012 will save the VHDX file. On the next page, decide on the size of the virtual hard disk; you can also copy the contents of a physical hard disk to the virtual disk.

You will then see a summary and can press Finish to finalize creating the virtual hard disk. Then, in the window, just press Apply to integrate the virtual hard disk with the virtual server.

Storage Migration

On Windows Server 2012 you have the option of moving the VHDs to Hyper-V hosts – even on the fly. To do this, right-click the virtual server whose disks you want to move between the Hyper-V hosts, and select the Move option.

In the wizard, you can then select Move the virtual machine's storage . On the page that follows, you can choose whether you want to move the data from the virtual server or just the virtual hard disks.

Next, select the corresponding folder in which Hyper-V will store the information for the computer. The virtual server continues to run during the process. You can see the status in Hyper-V Manager.

If you want to save the data in different folders, you can select the appropriate option and, in the next window, specify separate locations for configuration files, virtual hard disks, and snapshots.

You can save smart paging files separately. Smart paging is designed to prevent virtual servers from failing to start because the total available memory is already assigned. This new feature allows virtual servers to use parts of the host's hard disk as memory for the reboot. Again, you can move this area separately. After the successful boot, the disk space is released again and the virtual server regains its memory through dynamic memory.

Optimization

In the Actions section of Hyper-V Manager, you will find two menu items on the right Edit disk and Inspect disk . The latter lets you scan any VHD, then a new window with the data for the hard disk opens. This tells you whether it is a dynamically expanding or fixed-size hard disk.

Figure 2: Optimizing virtual disks in Hyper-V.

The window displays the maximum size and the current amount of data. Edit disk offers a variety of options (Figure 2):

  • Compact is only available for dynamically expanding disks. The operation deletes empty areas in the VHD(X) file making it significantly smaller. However, this is only useful if you have previously deleted a large volume of data from the disk.
  • Convert converts dynamically expanding disks into fixed-size hard disks and vice versa.
  • Expand allows you to increase the maximum disk space available to a VHD(X) file.
  • Merge is only displayed if you select a differencing disk, such as the AVHD(X) file of a snapshot. Because this file only contains the changes stored in the differencing disk, the data can be merged with the VHD(X) source file to create a common denominator VHD(X) file that contains all the data. The two source disks are preserved in this process; the wizard creates a new virtual hard disk.
  • Reconnect is displayed for differencing disks whose source VHD(X) file is unknown, which you must specify. However, one differentiating disk can reference another differentiating file that in turn references the VHD(X) file in a long chain. This situation can occur if several snapshots build on each other. Note that if the chain is destroyed, for example, because the path of a disk has changed, the connection cannot be restored with this option.

The Author

Thomas Joos is a freelance IT consultant and has been working in IT for more than 20 years. In addition to his projects, he also writes hands-on books and papers on Windows and other Microsoft topics. Online, you can meet him at http://thomasjoos.spaces.live.com.

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Clusters with Windows Server 2012 R2
    With Windows, you can create a highly available cluster at the click of a button. The cluster will even handle fully automated, non-disruptive software upgrades.
  • Hyper-V 3.0 in Windows Server 2012

    In the old Hyper-V hypervisor from Microsoft, many features for professional use were missing. The new version 3.0 has been significantly improved and is slowly catching up to VMware.

  • Hyper-V with the SMB 3 protocol
    Microsoft has introduced several improvements to Windows Server 2012 and Windows Server 2012 R2 with its Server Message Block 3. Hyper-V mainly benefits from faster and more stable access to network storage. In this article, we look at the innovations.
  • Protect Hyper-V with on-board resources
    With the right settings and small tools, security in virtual environments can be increased significantly by tweaking the on-board tools.
  • System Center 2012 SP1: What's new?
    Service Pack 1 expands System Center 2012 primarily in terms of features for virtualization and cloud computing. We provide the details in this article.
comments powered by Disqus