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.