Attaching Physical Hard Disks to Hyper-V VMs
Hyper-V brings us the ability to attach a physical hard disk directly to a virtual machine. In order to do this the hard disk in question needs to not be identified as "removable" by Windows. It also needs to be in an offline state. This can be configured by using the Disk Management node of the Windows Server 2008 Server Manager, right clicking on the disk in question, and selecting Offline:
Once you have done this you can open the settings for the virtual machine in question, adding a new hard disk, and selecting to use a physical hard disk.
Note that once you have a physical hard disk attached to a virtual machine, it is not possible to take snapshots of the virtual machine.
Cheers,
Ben
Anonymous
April 07, 2008
'the hard disk in question needs to not be identified as "removable" by Windows' What is the purpose of that requirement? 'It also needs to be in an offline state' That makes sense. When I needed to do this in XP, I couldn't find a way to make the disk offline, so the closest thing I could do was delete the drive letters from the partitions. Then VPC 2004 allowed a guest full access. I read that VPC 2007 refuses full access in the same situation, for an asserted reason which falls a bit short. But really, why prohibit the user from doing this with a drive that's removable in reality? Why tell a developer "no you can't do risky experiments on disposable materials, you have to do your risky experiments on the production stuff you have internal to your real computer". Sheesh.Anonymous
April 07, 2008
Can you reassign the VM boot order and boot from this drive?Anonymous
April 07, 2008
Hi Ben, You say: Note that once you have a physical hard disk attached to a virtual machine, it is not possible to take snapshots of the virtual machine. Can you tell us more about that? Do i understand correctly that if you have a VM (which runs in a VHD) and you attach one or more physical HD to it you will loose the ability to take snapshots of the VHD?Anonymous
April 07, 2008
The comment has been removedAnonymous
April 07, 2008
Hi Ben, Thanks for your response ! So when using snapshot technology in Hyper-V you take a snapshot of the whole machine (including every disk attached to it), and it isn't possible to just take a snapshot of only the OS Disk? Did i understand that correctly?Anonymous
April 08, 2008
The comment has been removedAnonymous
April 09, 2008
How is with performance physical disk vs. virtual are there any speed boost when using physical drive? And congratulations to whole Team-V ;-), I’m testing Hyper-V quite for a long time and it works really nice!Anonymous
April 10, 2008
"How is with performance physical disk vs. virtual are there any speed boost when using physical drive?" The physical host doesn't access any files on the same drive so all of the disk arm movements belong to the guest.Anonymous
May 05, 2008
The comment has been removedAnonymous
July 08, 2010
The comment has been removedAnonymous
December 03, 2010
Do you know how to use Add-VMDisk to add the Physical hard disk (pass through) to drive?Anonymous
September 24, 2011
Hi Ben & thanks for your guides, I tried to use a phyiscla disk, but instead of using logical partitions hyper-v is using the whole drive. Do you see another option? I'd just like to apply the disk as one partition. VMDK files offer exactly this option.Anonymous
November 29, 2011
Ben: First, I thank you. This writeup helped me get physical drives connected. Second, I am having an issue with physical drives on my VM. I have a Windows Home Server VM on my host and determined that I would want to use physical drives for the data pool due to the drive management scheme that WHSv1 uses. I got the first drive attached to the VM and was able to boot up and add it to the drive pool, but after shutting down to add another drive, the first drive was no longer accessible by the VM. I was able to correct it by removing the drive from the pool and re-adding it, but that solution will not work once data is on the drives, as removing and re-adding will purge whatever data is on the affected drive. Is there anything you can recommend for this situation?Anonymous
January 11, 2012
This is great.. Save my time... Thanks !Anonymous
February 12, 2012
The Offline option is not present at all for the removeabel disk in the server manager.Anonymous
May 17, 2012
IS there a limit to the physical disk size that Hyper-V can use in this way? We need a virtual drive larger than 2TB for use in an existing VM guest machine. I can get a 4+TB physical drive showing on the Hyper-V host but I am not sure if it will be seen at 4+TB when I attach it to the VM guest.Anonymous
February 11, 2013
As I follow all the articles instructing same, still it is not been clean that if my external drive become fixed then how should is turn back it as removabe. Which is "must" requirement to follow the steps. Other wise i suspect the physical drive option will be disabled.Anonymous
December 08, 2013
Hi, I'm using hyper-v on windows 8.1 to boot up my old windows 7 install as there are several apps I need that don't play well with Windows 8.1. It starts OK but BSOD, probably due to the different hardware provided by hyper-v, I can boot up the windows 7 partition and it runs OK so is there a way to pre-install the hyper-v drivers to prevent the BSOD? Thanks.Anonymous
December 21, 2013
Hi Ben, Thanks for this writeup... I have a question? If we add physical disk to a guest VM. Can i enable live migration? Many thanks in advance? Regards NateshAnonymous
September 06, 2014
RE: "the hard disk in question needs to not be identified as 'removable' by Windows" I completely agree with Norman, this requirement is pretty ridiculous. -- I'm getting really tired of windows's restrictions to do with "removable" disks -- They're in an enclosure for crying out loud! I guess VirtualBox wins again. :-(Anonymous
September 06, 2014
The comment has been removedAnonymous
September 29, 2014
So can that attached drive become the boot drive for the VM?Anonymous
September 29, 2014
Mike - Yes, this can be the boot drive. Cheers, BenAnonymous
May 08, 2015
Hi Ben...I know this thread is older - but I am clutching at straws here. I'm an old MS server admin so I'm familiar with HyperV. But - now I'm using it in Windows 10 (newest April 64bit Pro load) to try and bring up a physical boot drive from a defunct laptop (cracked touchscreen), using pass thru. It's a 1TB in a eSATA /USB enclosure attached in VM as IDE 0. Drive shows up fine in VM settings. Networking is set. But - when I try and start the VM and boot from the drive (boot order set to IDE first), all I get is a flashing cursor in the upper left corner. If I go to Disk Management and bring the drive back online and check all the sys files, they're all there and seem to be fine. The machine was booting fine when I pulled the drive. I know I must be missing something basic. I'm hoping you're still monitoring this. I don't want to reinstall Windows in the VM - I just want to boot the existing drive with Windows 8.1 and all the user's "stuff" in that VM. Any ideas? Thanks...