How to passthrough a RAID controller to Virtual machine in Hyper-V

yogesh pandey 0 Reputation points
2023-09-14T13:30:05.13+00:00

is there a way to passthrough RAID controller to Virtual machine created using Hyper-V.

so that the RAID controller directly expose to Virtual machine and all the hard disk connected to that RAID controller will be exposed to Virtual machine.

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,735 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Wesley Li 10,235 Reputation points
    2023-09-28T12:23:19.6066667+00:00

    Hello

    Yes, it is possible to pass through a RAID controller to a virtual machine in Hyper-V using a feature called Discrete Device Assignment (DDA). This feature allows you to pass an entire PCIe device into a VM, enabling high-performance access to devices like RAID controllers from within a VM while being able to leverage the device’s native drivers.

    Here are the steps to use a device with DDA:

    Configure the VM for DDA: Discrete Device Assignment imposes some restrictions to the VMs. Configure the “Automatic Stop Action” of a VM to TurnOff by executing Set-VM -Name VMName -AutomaticStopAction TurnOff.

    Dismount the Device from the Host Partition: Locate the Device’s Location Path. The PCI Location path is required to dismount and mount the device from the Host. An example location path looks like this: “PCIROOT (20)#PCI (0300)#PCI (0000)#PCI (0800)#PCI (0000)”. More details on locating the Location Path can be found here: Plan for Deploying Devices using Discrete Device Assignment. Disable the Device Using Device Manager or PowerShell, ensure the device is “disabled.” Dismount the Device Dismount-VMHostAssignableDevice -LocationPath $locationPath.

    Assigning the Device to the Guest VM: The final step is to tell Hyper-V that a VM should have access to the device. In addition to the location path found above, you’ll need to know the name of the vm. Add-VMAssignableDevice -LocationPath $locationPath -VMName VMName.

    After a device is successfully mounted in a VM, you’re now able to start that VM and interact with the device as you normally would if you were running on a bare metal system.

    Please note that any device pass-through on any hypervisor opens the possibility to take down the host or worse, taking control of your host. So, please proceed with caution.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.