locked
VHD vs Physical Disk RRS feed

  • Question

  • Hi!

    Is adding a SCSI VHD in a Guest OS Running Windows 2008 R2 Ent better or a Physical Disk?

    Thanks.


    Sunday, November 27, 2011 9:53 AM

Answers

  • Hi!

    They're both better than the other, depending on your needs and scenario. With vhd files you have flexibility in expanding, migrating, taking snapshots and host-level backups of the VM using child partition snapshots.

    Physical disks are recommended to be passed through to a VM, when the needed size of the disk exceeds the current vhd limit of 2TB (This limit is about to be pushed up to 16TB using new vhdx format in Hyper-V included in upcoming Windows Server "8") or if the VM is, say, a SQL server with heavy load that requires direct disk access due to high disk I/O.


    • Edited by Mike_Andrews Sunday, November 27, 2011 10:07 AM
    • Proposed as answer by Vincent Hu Monday, November 28, 2011 1:25 AM
    • Marked as answer by Vincent Hu Thursday, December 1, 2011 3:09 PM
    Sunday, November 27, 2011 10:07 AM
  •  

    With Windows Server 2008 R2, Fixed VHD performances has raised, and benchmark and test results show that they offer almost similar results in read, and physical disks are better than fixed VHD in write.

    Dynamic expanding disks are less performing that Fixed disks. But with Windows Server 2008 R2, the gap between them was reduced to 10-15 % depending on the workloads.

    So depending on your workloads and you can choose:

    - physical pass-through disks

    - Fixed VHD

    - Dynamic VHD

    If you are interested, you can see this whitepaper giving the exact results of benchmarks and tests between , dynamic, fixed, physical for both Windows Server 2008 and 2008 R2.

    Windows 2008/2008 R2 VHD performances

     

    • Edited by SAMIR FARHATMVP Sunday, November 27, 2011 3:34 PM
    • Marked as answer by Vincent Hu Thursday, December 1, 2011 3:09 PM
    Sunday, November 27, 2011 3:34 PM
  • Though the performance of the fixed and dynamic disks are nearly equal with 2008 R2,

    Hi,

     

    I guess there is a typo.

     

    Hi Create_share,

     

    When you create a virtual machine on Hyper-V, the default type of the VHD is dynamic extending, you can check the box “attach a virtual hard disk later” in the wizard.

     

     

    Best Regards,

    Vincent Hu

     

     


    • Marked as answer by Vincent Hu Thursday, December 1, 2011 3:09 PM
    Monday, November 28, 2011 1:32 AM
  • Hi,

     

    Keep the Hyper-V host machine’s operating system in one partition, put VHDs in their own partition. By the way, if you have many VMs running simultaneously, you may try to build a RAID on the Hyper-V host computer to improve the disk performance. Or else, you will notice a bad performance in the VMs. If you have a good budget, you can try to buy a SAN.

     

     

    Best Regards,

    Vincent Hu

     

     

    • Marked as answer by Vincent Hu Thursday, December 1, 2011 3:10 PM
    Monday, November 28, 2011 6:45 AM

All replies

  • Hi!

    They're both better than the other, depending on your needs and scenario. With vhd files you have flexibility in expanding, migrating, taking snapshots and host-level backups of the VM using child partition snapshots.

    Physical disks are recommended to be passed through to a VM, when the needed size of the disk exceeds the current vhd limit of 2TB (This limit is about to be pushed up to 16TB using new vhdx format in Hyper-V included in upcoming Windows Server "8") or if the VM is, say, a SQL server with heavy load that requires direct disk access due to high disk I/O.


    • Edited by Mike_Andrews Sunday, November 27, 2011 10:07 AM
    • Proposed as answer by Vincent Hu Monday, November 28, 2011 1:25 AM
    • Marked as answer by Vincent Hu Thursday, December 1, 2011 3:09 PM
    Sunday, November 27, 2011 10:07 AM
  • That means VHD is better for Backing up from Host System and we don't have to install Backup Software on Guest OSs? Is there a chance of VHDs getting corrupted due to some virus attack or some other reason?

     

    Secondly, after running BPA for Hyper-V we got warning that

    "A virtual machine is configured with one or more dynamically expanding virtual hard disks (VHDs)."

    Does by default the installation of a new virutal machine create a dynamically expanding vhd? If yes then is it better to create a Fixed Hard Disk first then assign it to a new virtual machine where the Guest OS will be installed?

    Thanks.


    Sunday, November 27, 2011 11:25 AM
  •  

    With Windows Server 2008 R2, Fixed VHD performances has raised, and benchmark and test results show that they offer almost similar results in read, and physical disks are better than fixed VHD in write.

    Dynamic expanding disks are less performing that Fixed disks. But with Windows Server 2008 R2, the gap between them was reduced to 10-15 % depending on the workloads.

    So depending on your workloads and you can choose:

    - physical pass-through disks

    - Fixed VHD

    - Dynamic VHD

    If you are interested, you can see this whitepaper giving the exact results of benchmarks and tests between , dynamic, fixed, physical for both Windows Server 2008 and 2008 R2.

    Windows 2008/2008 R2 VHD performances

     

    • Edited by SAMIR FARHATMVP Sunday, November 27, 2011 3:34 PM
    • Marked as answer by Vincent Hu Thursday, December 1, 2011 3:09 PM
    Sunday, November 27, 2011 3:34 PM
  • That means VHD is better for Backing up from Host System and we don't have to install Backup Software on Guest OSs? Is there a chance of VHDs getting corrupted due to some virus attack or some other reason?

     

    Secondly, after running BPA for Hyper-V we got warning that

    "A virtual machine is configured with one or more dynamically expanding virtual hard disks (VHDs)."

    Does by default the installation of a new virutal machine create a dynamically expanding vhd? If yes then is it better to create a Fixed Hard Disk first then assign it to a new virtual machine where the Guest OS will be installed?

     

    Thanks.



    Well, host based backups means backup of the entire VM (vhd and configuration files) and depending on what type of server the VM is, host based backups are generally used in disaster recovery scenarios, as exchange and SQL data is best backed up more frequently inside the VM at the file level.

    I have never heard of a corrupted vhd file due to a virus, but they're just files so I guess it's possible... More likely is a virus infection inside the vhd file, since it holds its own filesystem.

    "A virtual machine is configured with one or more dynamically expanding virtual hard disks (VHDs)." --- The only plausible reason for BPA to state this as a warning is due to thin provisioning scenarios. It's not uncommon that a dynamic vhd file is allowed to grow out of physical storage, and when it does, the VM will pause in a critical condition.

     

    Sunday, November 27, 2011 6:14 PM
  • Though the performance of the fixed and dynamic disks are nearly equal with 2008 R2, there is another performance consideration.  If you are using local disks to store your VHD files, you are not likely to run into any issues.  But if you are storing your VHDs on a SAN disk, you might run into an issue, depending upon how heavily you are accessing the VHDs.  The difference comes in the way the information is laid out for fixed versus dynamic VHDs.  With dynamic VHDs, you could require twice as many IOs per second (IOPS) as for a fixed VHD.  This is more likely to be an issue in a large shared environment than in a local disk environment because the number of systems accessing a local environment is limited to one.  So it is pretty hard for a single host to drive the number of IOPS above what the controller is able to handle.  But in a shared environment, it is possible for multiple hosts to drive the number of IOPS above what the controller is able to handle.

    I ran into one situation where the shared environment was running absolutely fine with dynamic disks.  Then one more host was added to the shared environment and performance got hit because the number of IOPS exceeded the capacity of the controller.  Upon looking at the statistics, it turned out there were twice as many IOPS as were expected for the workload.  When the VHDs were switched switched to fixed from dynamic, the IOPS dropped in half and everything was fine.

    The actual performance of the applications reading/writing to the dynamic disks was not hurt until the number exceeded the limit of the controller.  At that time, disk queue lengths started impacting the performance of the applications.

     

    Sunday, November 27, 2011 9:50 PM
  • Though the performance of the fixed and dynamic disks are nearly equal with 2008 R2,

    Hi,

     

    I guess there is a typo.

     

    Hi Create_share,

     

    When you create a virtual machine on Hyper-V, the default type of the VHD is dynamic extending, you can check the box “attach a virtual hard disk later” in the wizard.

     

     

    Best Regards,

    Vincent Hu

     

     


    • Marked as answer by Vincent Hu Thursday, December 1, 2011 3:09 PM
    Monday, November 28, 2011 1:32 AM
  • Ok Thanks. May we know what are the recommended locations for storing VHD files and Virtual Machines? Can we keep both on one location where we need to install the Guest OS or the virtual machine file should be stored on the C drive of the Host OS and the VHD on the drive where the Guest OS will be installed?

    The above is not related to the data drive for a virtual machine. We already have another fixed drive for storing virtual machine users' files.

    Thanks.

    Monday, November 28, 2011 6:05 AM
  • How many virtual machines will you be using and what operations shall they be performing? I would always reccomend dedicating disks to the host OS and then have a Disks allocated to VM OS and then Disks allocated to VM Data, seperating them away from the host will reduce the risk of corruption.
    MCP MCTS MCITP MCITPVA
    Monday, November 28, 2011 6:42 AM
  • Hi,

     

    Keep the Hyper-V host machine’s operating system in one partition, put VHDs in their own partition. By the way, if you have many VMs running simultaneously, you may try to build a RAID on the Hyper-V host computer to improve the disk performance. Or else, you will notice a bad performance in the VMs. If you have a good budget, you can try to buy a SAN.

     

     

    Best Regards,

    Vincent Hu

     

     

    • Marked as answer by Vincent Hu Thursday, December 1, 2011 3:10 PM
    Monday, November 28, 2011 6:45 AM
  • We need to run two Virtual Machines at the moment. We have converted the Dynamic Disks to Fixed. Should the dynamic disks files be deleted now?

    Thanks.

    Monday, November 28, 2011 8:21 AM
  • Hello,

    I tend to use a VHD vs. a pass-through disk in most instances because it brings a benefit of being abstracted from the hardware and extremely portable.  You'll find that performance in a fixed VHD will closely mirror physical disk as well.  I've used pass-through disks for large partitions, or in instances where disk existed already on a volume and I didn't want to have to re-copy it into a VHD.

    Here is a blog post that should help you out:

    http://blog.concurrency.com/infrastructure/virtualization/what-disk-type-do-i-use-with-hyper-v-r2/

    Also, here is information about performance in VHDs:

    http://download.microsoft.com/download/0/7/7/0778C0BB-5281-4390-92CD-EC138A18F2F9/WS08_R2_VHD_Performance_WhitePaper.docx

    Nathan Lasnoski


    http://blog.concurrency.com/author/nlasnoski/
    Monday, November 28, 2011 3:26 PM