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.
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.
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.
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.
On the Configure Disk window check the Copy the contents of the specified virtual hard disk, and select the path to the source VHD.
Click next and finish and this will create the new VHD with the content from the source VHD.
The second and my preferred way of doing it, is of course with Windows PowerShell.
# Mount the Source VHD
Mount-VHD "C:\VMs\WS2012\Virtual Hard Disks\WS2012.vhdx"
# List the Disks
# Create the new VHD (SourceDisk = Disknumber)
New-VHD -Dynamic -Path "C:\VMs\NewDefragVHD2.vhdx" -SourceDisk 1
14.0-inch diagonal LED-backlit HD+ anti-glare (1600 x 900) with 720p HD Webcam
AMD FirePro™ M3900 w/1 GB gDDR3
8GB 1333 MHz DDR3 SDRAM (2D)
500 GB 7200 rpm 2.5-inch hard drive
DVD+/-RW SuperMulti DL Drive
DualPoint (TouchPad and PointStick)
Intel Centrino® Ultimate-N 6300 (3×3)
Bluetooth® Wireless Technology 2.1
TPM & Fingerprint
HP 9-Cell 100 Wh Li-Ion Battery
56K v.92 high speed modem
HP Elite Support with limited 3 year standard parts and labor warranty 3/3/3
As I said the main reasons for me to buy this notebook, are the performance, the form factor, the batterylife and of coure the design. I am sure the EliteBook 8460p would be enought performance for me, but I really like the color of the EliteBook w-series notebooks.
Since HP will not release the EliteBook 8460w in Europe I ordered the notebook directly in the HP Online Store with my myus.com account.
If you are using Microsoft Hyper-V with new Intel Sandy Bridge or Intel Westmere processors and our server has over 48GB of physical RAM you may get a performance decrease. Microsoft released a hotfix (KB2517329) for this problem.
This could also be a problem with a lot of Hyper-V installations on Cisco UCS, because the most of them will use more than 48GB of memory.
The performance decrease could show its self in the the following issues:
The CPU usage is high and the server responds slowly when you copy large files on the computer. For example, you copy a 10-GB file
The disk I/O performance of the virtual machines (VMs) is slow
Windows takes a long time to start
The hotfix is not include in Service Pack 1 for Hpyer-V R2 or Windows Server 2008 R2.
For more information about this you can check KB2517329
I run several Windows Virtual Machines (VMs) on my Mac with VMware Fusion. Even VMware Fusion has a great performance for Virtual Machines I am really happy about every performance increase I can get. I made a list with some tuning tips.
First use Windows Classic Theme
Deactivate System Protection (You also win some Diskspace)
Under System Properties –> Advanced –> Performance –> Choose Adjust for best Performance
Deactivate Autostart objects with MSCONFIG
There are a lot of more tips out there but I thinks these are pretty important.
Tonight I did a bigger P2V (physical 2 virtual) migration. I virtualized an older Windows Server 2003 SP1 with MS SQL Server 2005 and WSS 3.0. This can be used as a step by step how-to guide.
First I created a Image of the old server with Symantec Backup Exec System Recovery 2010, this could be done online. I just stopped all the Sharepoint, SQL and Web Services so that no new data could be written in the time I created this Image.
After I moved this Image to the Microsoft Hyper-V Host Server, I started to convert the v2i Image with Symantec Backup Exec System Recovery 2010 to a Microsoft VHD.
I created a new Virtual Machine on the Hyper-V Server and added this existing VHD. (Important here: I tried to create the same Hardware environment for the VM which I had as physical Hardware before. (Dual Core with 2048MB memory) So I had basically no problem to start the Virtual Machine.
Now its time to install the Hyper-v integration components (the VM Drivers) which can only be installed on Windows Server 2003 with SP2 or later. I turned off the Virtual Machine again and attached the VHD File offline on my Hyper-v Server, so I had file access to the Virtual Hard Disk. I simply added the Servicepack 2 file to the root of the VHD.
After unmounting the VHD, I started my Virtual Machine again and installed the Servicepack 2 and the Hyper-v Integration components.
Now I added more Hardware to the Virtual Machine (Quad-Core and 4GB memory). I also change the Legacy Network Adapters to normal Network Adapters (higher Network performance)
The performance of the new Hyper-v is just pretty impressive.