Hyper-V VHDX Format Specification v1.00

Windows Server 2012 Logo

Yesterday I posted a blog post about the new recommendations about Virtual Disks files in Hyper-V called VHD and VHDX.

Today I saw a tweet from Niklas Akerlund who posted a link to the new VHDX Format Specification v1.00.

This specification describes the VHDX virtual hard disk format that provides a disk-in-a-file abstraction.  This specification assumes that you are familiar with hard disk technologies, including how hard disks interface with the operating system or a virtual machine and understand how data is accessed and laid out on the physical medium. This specification is released under the Microsoft Open Source Promise (OSP) initiative to help guide development of VHDX virtual hard disk format implementations that are compatible with those provided by Microsoft.

Download: Hyper-V VHDX Format Specification v1.00

 

VHDX is the new format which is currently supported by Windows 8 and Windows Server 2012.

Windows Server 2012 Hyper-V: Virtual Disk VHD & VHDX recommendations

Windows Server 2012 Logo

In the new released Performance Tuning Guidelines for Windows Server 2012 you can find a lot of tuning information for Windows Server 2012 Hyper-V. One important part is the Virtual Disk chapter which is all about the VHD and the new VHDX format.

The basic key takeaways are:

  • Use VHDX every time
  • Use Dynamic VHDX

The VHDX format:

VHDX is a new virtual hard disk format introduced in Windows Server 2012, which allows you to create resilient high-performance virtual disks up to 64 terabytes. Benefits of this format include:

  • Support for virtual hard disk storage capacity of up to 64 terabytes.
  • Protection against data corruption during power failures by logging updates to the VHDX metadata structures.
  • Ability to store custom metadata about a file, which a user might want to record, such as operating system version or patches applied.

The VHDX format also provides the following performance benefits (each of these is detailed later in this guide):

  • Improved alignment of the virtual hard disk format to work well on large sector disks.
  • Larger block sizes for dynamic and differential disks, which allows these disks to attune to the needs of the workload.
  • 4 KB logical sector virtual disk that allows for increased performance when used by applications and workloads that are designed for 4 KB sectors.
  • Efficiency in representing data, which results in smaller file size and allows the underlying physical storage device to reclaim unused space. (Trim requires trim-compatible hardware.)

When you upgrade to Windows Server 2012, we recommend that you convert all VHD files to the VHDX format due to these benefits. The only scenario where it would make sense to keep the files in the VHD format is when a virtual machine has the potential to be moved to a previous release of the Windows Server operating system that supports Hyper-V.

VHD File Type

The following recommendations should be taken into consideration with regards to selecting a VHD file type:

  • When using the VHD format, we recommend that you use the fixed type because it has better resiliency and performance characteristics compared to the other VHD file types.
  • When using the VHDX format, we recommend that you use the dynamic type because it offers resiliency guarantees in addition to space savings that are associated with allocating space only when there is a need to do so.
  • The fixed type is also recommended, irrespective of the format, when the storage on the hosting volume is not actively monitored to ensure that sufficient disk space is present when expanding the VHD file at run time.
  • Snapshots of a virtual machine create a differencing VHD to store Writes to the disks. Having only a few snapshots can elevate the CPU usage of storage I/Os, but might not noticeably affect performance except in highly I/O-intensive server workloads. However, having a large chain of snapshots can noticeably affect performance because reading from the VHD can require checking for the requested blocks in many differencing VHDs. Keeping snapshot chains short is important for maintaining good disk I/O performance.

For more information checkout the Performance Tuning Guidelines for Windows Server 2012.

And check out my other post about VHD and VHDX for Hyper-V:

Update 1:

My Virtual Machine MVP colleague Carsten Rachfahl just told me that now also IDE devices can use the TRIM function for VHDX files. That means that VHDX on SCSI or IDE controller as well as pass-through disks support TRIM. The only thing which is required is trim-compatible hardware.

Update 2:

Even the GUI in Windows Server 2012 and Windows 8 recommend Fixed size for VHDs and Dynamic expanding for VHDX.

I have now server customer environment running in products for a couple of months and all are using the new Dynamic Expanding VHDX format. No problems and performance issues at all. Dynamic Expanding VHDX disks are even running faster than Fixed Size VHD files.

 

Virtual Machine Servicing Tool 2012 released

VHDX

In July Microsoft released the beta of the Virtual Machine Servicing Tool 2012  and two weeks ago Microsoft released the final of  the Virtual Machine Servicing Tool 2012 (VMST 2012). I already did a post how you can update offline VHDs via Virtual machine Servicing Tool.

Virtual Machine Servicing Tool 2012 streamlines the process of keeping your offline virtual machines, templates and VHDs up-to-date with the latest operating system and application updates, without introducing vulnerabilities into your IT infrastructure. VMST 2012 helps you effectively manage the workflow of updating your offline virtual machines according to their individual needs.

Using features in VMST 2012, customers can service:

  • Offline virtual machines in a SCVMM library.
  • Stopped and saved state virtual machines on a host.
  • Virtual machine templates.
  • Offline virtual hard disks in a SCVMM library by injecting update packages.

VMST 2012 works seamlessly with other Microsoft technologies.

VMST 2012 is designed to work with Microsoft® System Center 2012 – Virtual Machine Manager (VMM) and with the following technologies:

  • Windows Server Update Services (WSUS) WSUS 3.0 SP2.
  • System Center 2012 Configuration Manager.

You can find the Virtual Machine Servicing Tool 2012 in the Microsoft Download Center.

Windows Server 2012 Hyper-V – How to create a new VHD from a source VHD

Windows Server 2012 RC Logo

Microsoft MVP Aidan Finn posted a interesting blog post about Virtual Hard Disk (VHD) Block Fragmentation. He was reviewing the document about Performance Tuning Guidelines for Windows Server 2012 and found a very important note about VHD performance.

Just as the allocations on a physical disk can be fragmented, the allocation of the blocks on a virtual disk can be fragmented when two virtually adjacent blocks are not allocated together on a virtual disk file.

The fragmentation percentage is reported for disks. If a performance issue noticed on a virtual disk, you should check the fragmentation percentage. When applicable, defragment the virtual disk by creating a new virtual disk with the data from the fragmented disk by using the Create from Source option.

Now first thanks to Aidan Finn for finding this one. But how do I create a new VHD or VHDX from a source? Simple there are two ways of doing that, the first one is over the Hyper-V Manager GUI.

Create a new VHD and give it a new name.

New Defrag VHD

On the Configure Disk window check the Copy the contents of the specified virtual hard disk, and select the path to the source VHD.

Copy the contents of the specified virtual hard disk

Click next and finish and this will create the new VHD with the content from the source VHD.

Creating the new virtual hard disk

The second and my preferred way of doing it, is of course with Windows PowerShell.

Create the new virtual hard disk from Source via PowerShell


# Mount the Source VHD
Mount-VHD "C:\VMs\WS2012\Virtual Hard Disks\WS2012.vhdx"

# List the Disks
Get-Disk

# Create the new VHD (SourceDisk = Disknumber)
New-VHD -Dynamic -Path "C:\VMs\NewDefragVHD2.vhdx" -SourceDisk 1

 

Create the new virtual hard disk via PowerShell

 

 

Hyper-V vs. VMware vSphere – Storage

Windows Server 2012 RC Logo

This is another post in my series about Hyper-V vs. VMware.

This time it is about storage in terms of virtualization. And as you could read everywhere, Microsoft did also a lot of improvements for the Windows Server 2012 release.

  • New Virtual Disk format (VHDX) – Supports up to 64 TB Virtual Hard Disks
  • Offloaded Data Transfer (ODX) – Offloads storage-intensive tasks to the SAN
  • Data De-duplication
  • Storage Spaces and Storage Pools – Data Advanced Storage Array Features to Windows Server
  • Virtual Machine boot from SAN
  • Live merging of VHDs and Virtual Machine Snapshots
  • Native 4K Disk Support – Take advantage of enhanced density and reliability
  • Virtual Fiber Channel – Connect a Virtual Machine directly to a Fiber Channel SAN
  • Support for File based Storage with SMB 3.0
  • New file system (ReFS)
  • BitLocker encryption support – BitLocker is now available for Cluster Shared Volumes to support encryption in cluster environments

 

Capability Windows Server 2012 RC Hyper-V VMware vSphere Hypervisor VMware vSphere 5.0 Enterprise Plus
Virtual Fiber Channel Yes Yes Yes
3rd Party Multipathing (MPIO) Yes No Yes (VAMP)
Native 4-KB Disk Support Yes No No
Maximum Virtual Disk Size 64TB VHDX 2TB VMDK 2TB VMDK
Maximum Pass Through Disk Size Variable 64TB 64TB
Offloaded Data Transfer Yes No Yes (VAAI)
Storage Encryption Yes No No

 

  • The maximum size of a physical disk in attached to a Hyper-V virtual machine is determined by the guest operating system and the chosen file system within the guest
  • vStorage API for Multipathing (VAMP) is only available in Enterprise & Enterprise Plus editions of vSphere 5.0
  • vStorage API for Array Integration (VAAI) is only available in Enterprise & Enterprise Plus editions of vSphere 5.0
  • VMware documentation does not suggests that their respective platforms support 4K Advanced Format Drives

Sources:

Check out my Blog post Hyper-V 2012 – Hey I Just Met You And This Is Crazy for more information about the latest version of Hyper-V.

Virtual Machine Servicing Tool 2012 Beta is now available for download

Hyper-V

Virtual Machine Servicing Tool 2012 streamlines the process of keeping your offline virtual machines, templates and VHDs up-to-date with the latest operating system and application updates, without introducing vulnerabilities into your IT infrastructure. VMST 2012 helps you effectively manage the workflow of updating your offline virtual machines according to their individual needs.

Using features in VMST 2012, customers can service:

  • Offline virtual machines in a SCVMM library.
  • Stopped and saved state virtual machines on a host.
  • Virtual machine templates.
  • Offline virtual hard disks in a SCVMM library by injecting update packages.

VMST 2012 works seamlessly with other Microsoft technologies.

VMST 2012 is designed to work with Microsoft® System Center 2012 – Virtual Machine Manager (VMM) and with the following technologies:

  • Windows Server Update Services (WSUS) WSUS 3.0 SP2.
  • System Center 2012 Configuration Manager.

To learn more about VMST 2012 Solution Accelerator, click here. To download the tool, click here.

Hyper-V 2012 – Hey I Just Met You And This Is Crazy

Windows Server 2012 RC Logo

Okay I admit it, the title is more a reference to a song than a true fact, because my first contact with the latest Hyper-V release was last September.

Last September Microsoft showed the newest release of Hyper-V at the build conference. Back then I wrote a blog post about the new version of Microsoft Hypervisor Hyper-V called “Hyper-V: Version 3 kills them all“.

Now Microsoft released the Windows Server 2012 and Microsoft Hyper-V 2012 Release Candidate last week. They made a lot of changes since September 2011 and I tried to show this in another blog post (What’s new in Windows Server 2012 Release Candidate Hyper-V: Scale). With these changes I decided to upgrade my blog post from September 2011 with the latest changes made with Windows Server 2012 Release Candidate.

Windows Server 2012 the Cloud OS

Windows Server 2012 Management

First let’s start with Windows Server 2012 as the base of Microsoft cloud strategy. Windows Server 2012 is probably the most significant release of the Windows Server platform ever. Microsoft’s focus in Windows Server 2012 was to make it easy for all to build public, private or hybrid cloud solutions. Microsoft has used the experience and learning from their own Cloud services like Hotmail, Messenger, Office 365, Bing, Windows Azure, and Xbox Live. There are a lot of improvements to manageability, security, scalability, extensibility, predictability and reliability which will also improve the possibilities with Hyper-V. The Power of Many, The Simplicity of One – In technical terms Microsoft made a lot of improvements how you can manage a lot of servers and services, Storage, Networking and PowerShell. Of course there is a lot more, but this are the parts I think are the most important. And here are some keywords to the improvements in Windows Server 2012:

  • Storage improvements – SMB 3.0, SMB transparent Failover, data de-duplication, Storage Spaces, online filesystem repairs, 64TB NTFS volumes, ReFS volumes, etc.
  • NIC Teaming
  • NIC Naming and CDN (consistent device naming)
  • PowerShell v3 – You can now just do everything in PowerShell and even more with 23000 PowerShell cmdlets.
  • Server Dashboard – The new Dashboard lets you manage all servers, or even better, all Services from one place.
  • Multi-tenant – everything seems to be made for that
  • Performance Counters
  • IP address management (IPAM)

Hyper-V Host improvements

Windows Server 2012 Hyper-V Manager

The Hyper-V Host gets a lot of improvements in terms of features and scale.

  • up to 320 logical CPUs
  • supports up to 4 TB RAM
  • no more vCPU:pCPU ration limit
  • up to 2048 Virtual CPUs per Virtual Machine

Hyper-V Virtual Machine improvements

Windows Server 2012 Hyper-V Virtual Machine

Microsoft did a lot to extend the existing Virtual Machine hardware to support even high workload Virtual Machines. Most of the time you were talking with VMware consultants, they tried to say that Hyper-V is not made for Enterprise workloads. Now with the release of Hyper-V 2012 scale should not be an argument anymore.

Hyper-V Networking improvements

Windows Server 2012 Hyper-V Networking

Hyper-V got a lot of improvements in terms of networking. Microsoft realized that networking features are really important if you start to create private and public cloud scenarios and now even create a mix of public and private cloud scenarios without creating a lot of work for the IT teams to reconfigure Virtual Machines.

  • QoS and flexible bandwidth allocation
  • Single-root I/O virtualization or SR-IOV (Direct Access to the physical Network adapter)
  • Network Virtualization
  • PVLAN support
  • Dynamic Virtual Machine Queue (D-VMQ)
  • Receive Side Coalescing (RSC)
  • DHCP Guard
  • Router Guard
  • Port mirroring
  • Port ACLs
  • Trunk mode Allows directing traffic from a group of VLANs to a specific VM
  • IPsec Task offload
  • Integrated Network Adapter Teaming
  • Better Network Adapter Naming and Consistent Network Device Naming
  • Hyper-V Extensible Switch (for example Cisco Nexus 1000v)
  • Data Center Bridging (DCB) – eliminates loss due to queue overflow and to be able to allocate bandwidth on links
  • Network Metering

Hyper-V Clustering improvements

Hyper-V gets also a lot of Cluster improvements. Microsoft is working on Cloud solutions which will give great availability to low cost. For example Hyper-V Replica or Shared-Nothing Live Migration, which allows you to move a Virtual Machine from one Hyper-V host to another host over the Ethernet without the need for a shared storage or a Cluster.

  • supporting up to 4000 VMs per cluster
  • supporting up to 64 Cluster nodes
  • improved Cluster Manager Console
  • Application Monitoring – Application health detection inside the virtual machine
  • New Placement policies – Virtual Machine Priority and enhanced placement
  • Storage Live Migration
  • VM Failover Prioritization
  • Cluster Wide Task Scheduling
  • Hyper-V Replica supporting clustering – replicate a Virtual Machine from one Cluster to another Cluster or Standalone Hyper-V Host
  • No need for Block Storage – you can use SMB Shares
  • Support for Storage Spaces
  • Automated Node Draining – like Maintenance mode in SCVMM
  • Cluster Aware Updating (CAU)
  • Cluster Shared Volume Improvements – BitLocker support, a lot of performance improvements, Self-Healing
  • CSV Block Cache
  • CSV 2.0 (No Redirected I/O for Backup
  • CSV 2.0 Block Level I/O redirection
  • CSV enabled volumes now appear as “CSVFS”
  • No Active Directory dependencies
  • Live Migration Queuing
  • Migrate multiple Virtual Machine at the same time
  • Anti-Affinity VM Rules
  • Dynamic Quorum
  • Guest Clustering via ISCSI, SMB or Fibre Channel

Hyper-V Storage improvements

VHDX

A I mentioned earlier Microsoft made a lot of improvements in terms of storage in Windows Server 2012 and Hyper-V can take advantage of those which are quiet impressive. For example with the new features in SMB 3.0 you can now use SMB file shares to store your Virtual Machines.

  • New Virtual Disk format (VHDX supports up to 64 TB Virtual Disks)
  • Offloaded Data Transfer – ODX (Open Diagnostic Data Exchange)
  • Live merging of VHDs and Snapshots
  • RDMA
  • SMB 3.0 – Transparent Failover
  • SMB 3.0 Direct
  • SMB 3.0 Multichannel
  • Native 4 KB sector disks support
  • Data De-duplication
  • Virtual Fibre Channel inside the Virtual Machines
  • VM boot from SAN
  • Storage Spaces (Pool Disks or LUNs)
  • New File system ReFS

Hyper-V Management Improvements

Hyper-V Powershell

As everywhere in Windows Server 2012 PowerShell is the key. And the new Server Manager Dashboard Microsoft enables to create Server Groups to manage multiple servers from a single console.

  • PowerShell cmdlets for Hyper-V
  • PowerShell Workflows – commands and tasks across servers
  • Hyper-V Extensible Switch – lets vendors to create “plugins”.
  • Server Manager Dashboard – lets you manage multiple Hyper-V hosts from a single console.
  • System Center Virtual Machine Manager 2012 SP1 – not a part of Windows Server 2012 but will add great management solutions.
  • Improved VM Import
  • Local Hyper-V Administrator Group
  • Client Hyper-V

Hyper-V Live Migration and Disaster Recovery

Windows Server 2012 Hyper-V Replica

Now I think this is maybe the greatest new feature. You can migrate Virtual Machines from one Hyper-V Host to another without Shared Storage or Cluster configuration. This feature is called Shared-Nothing Live Migration. Microsoft also included a new feature called Hyper-V Replica which includes the option to replicate Virtual Machine to another host which can be hosted in the same datacenter, secondary datacenter or even in the cloud.

  • Improved Live Migration
  • Unlimited Simultaneous live migrations
  • Live Storage Migration
  • Shared-Nothing Live Migration – Live Migration to another Hosts (Not clustered) over Ethernet
  • Hyper-V Replica – Replicated Virtual Machines to another Hyper-V host on-premise or public cloud over LAN or WAN connections.

You can get more information and the download link about Windows Server 2012 Release Candidate and Hyper-V Server 2012 Release Candidate.

The Windows Server Team and especially the Hyper-V Team did a great job, and I am sure Hyper-V will gain significant market share in the future.