locked
exposing ssd from Hyper-V to Windows 8.1 VM RRS feed

  • Question

  • Hi,

    My development environment is :

    Hyper-V Server 2012 R2 (Core - bare metal hypervisor) is installed on HP Server machine

    Windows 8.1 VM is installed on top of it.

    I have connected PCIe based NVMe SSD to PCIe slot. This is not a boot drive.

    I'm able to see disks through DISKPART utility in Hyper-V machine. Disk is listed.

    But when i checked device manager in Windows 8.1 VM, controller is not visible.

    Do i need to execute any command to expose NVMe SSD to VM.

    Please let me know what i'm missing in the configuration and what commands i need to execute further.

    I tried Add-PhysicalDisk powershell command, but getting some error.

    Kindly help me in configuring SSD to expose from Hyper-V to VM.

    Thanks,

    Raphel

     



    • Edited by raphel78 Monday, April 11, 2016 4:19 PM
    Monday, April 11, 2016 4:09 PM

Answers

  • It is not recommended to expose pass-through disks to VMs.  What is the recommended practice is to create a VHD/VHDX file on the physical disk and then assign that to the VM.

    Otherwise, if you insist on attaching the physical disk, you do that through the Hyper-V Management Console and assign the physical drive to the VM there, not within the VM.


    . : | : . : | : . tim

    • Proposed as answer by JamesB24 Monday, April 11, 2016 11:31 PM
    • Marked as answer by Leo Han Wednesday, April 20, 2016 8:47 AM
    Monday, April 11, 2016 10:52 PM

All replies

  • It is not recommended to expose pass-through disks to VMs.  What is the recommended practice is to create a VHD/VHDX file on the physical disk and then assign that to the VM.

    Otherwise, if you insist on attaching the physical disk, you do that through the Hyper-V Management Console and assign the physical drive to the VM there, not within the VM.


    . : | : . : | : . tim

    • Proposed as answer by JamesB24 Monday, April 11, 2016 11:31 PM
    • Marked as answer by Leo Han Wednesday, April 20, 2016 8:47 AM
    Monday, April 11, 2016 10:52 PM
  • Hi Raphel,

    I agree with Tim. Using virtual disk could provide more flexibility.

    And the advantage on performance of pass-through disk is very little.

    If you want to configure pass-through disk, here is the guide:

    https://blogs.technet.microsoft.com/askcore/2008/10/24/configuring-pass-through-disks-in-hyper-v/

    Best Regards,

    Leo


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Tuesday, April 12, 2016 2:01 AM
  • Hi Tim and Leo,

    Thanks for your support.

    As you told, I was able to expose the NVMe SSD to VM as pass through disk (i.e. as physical disk)

    After exposing in VM, Microsoft Hyper-V SCSI Controller is installed for my device under Storage controllers.

    Actually i wanted to install my custom driver for NVMe SSD in Windows 8.1 VM.

    I tried updating Microsoft Hyper-V SCSI driver with my driver, but installation failed.

    Actually we have developed a driver for PCIe based NVMe SSD and this installs and works well in Desktop environment.

    I am trying to install my driver in Windows 8.1VM.

    Kindly let me know whether it is possible to install my driver for NVMe SSD on Windows 8.1VM or other VM.

    Thanks & Regards,

    Raphel

    Tuesday, April 12, 2016 2:40 PM
  • "Actually i wanted to install my custom driver for NVMe SSD in Windows 8.1 VM."

    That means you would need to develop a driver for Hyper-V.  What you have most likely written is a driver for Windows.  Drivers within VMs running under Hyper-V or ESXi or Xen or any other hypervisor are not the same as the hardware drivers.  That's why Microsoft has integration services and VMWare has VMware tools.  Such development is well beyond the scope of this forum.


    . : | : . : | : . tim

    Tuesday, April 12, 2016 3:03 PM
  • Hi Tim,

    Thanks for clarifying this.

    I'm new to Hyper-V hypervisor environment.

    Please let me know whether i need to develope a new storport miniport driver for NVMe SSD and install on Hyper-V.

    OR whether i can use the existing desktop NVMe miniport driver on Hyper-V.

    I'm unable to invoke device manager (devmgmt.msc) on Hyper-V. Please let me know the method to install my custom driver on Hyper-V.

    Just for your information:

    We have Windows 7 VM / Xen hypervisor setup. We were able to expose NVMe SSD to Windows 7 VM from Xen and we were able to install our custom driver.

    Thanks,

    Raphel

    Wednesday, April 13, 2016 2:17 PM
  • "I'm new to Hyper-V hypervisor environment. "

    Welcome!  Hyper-V and Windows share a lot, particularly when it comes to the driver space.  Hyper-V does not use special hardware drivers.  It uses Windows hardware drivers.  Hyper-V then has a defined method of mapping access to physical devices.  As long as a storage device is a supported Windows device, Hyper-V can make use of it through is virtualization software for access the physical host's storage devices.

    "Please let me know the method to install my custom driver on Hyper-V."

    That question is better addressed to a forum that deals with device driver development.  You might find a few people who follow this forum who do that, but in general, this forum is more for system administration of Windows Server with Hyper-V and Hyper-V Server.  You will have more luck finding the right forum if you search the MSDN forums.

    "Please let me know whether i need to develope a new storport miniport driver for NVMe SSD and install on Hyper-V.  OR whether i can use the existing desktop NVMe miniport driver on Hyper-V."

    You did not state why you were developing your own NVMe driver instead of using the existing driver, so I can only state that, in general, the driver that comes from the vendor of your NVMe device is most likely the driver you should be using.  If you are the vendor, then you should most likely have defined procedures for testing your driver in a Windows environment.

    "I'm unable to invoke device manager (devmgmt.msc) on Hyper-V. Please let me know the method to install my custom driver on Hyper-V."

    Not sure what to say here.  Need to know more about why you can't access device manager.  Do you have the proper privileges?  Are you receiving some sort of error message?


    . : | : . : | : . tim


    Wednesday, April 13, 2016 2:52 PM