How to add a PCI-E SAS device to my VM in Hyper-V

huseyin ozsut 0 Reputation points
2024-04-11T16:26:23.74+00:00

I managed to setup a TRUENAS vm in Hyper-V. I managed to add my physical disks to TRUENAS. My disks are working without any problems in TRUENAS; but TRUENAS experts do not suggest this way. They are suggesting to pci passthrough my SAS Device and make truenas take control of the sas device.

I tried this partially:

https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/deploy/deploying-graphics-devices-using-dda

When I start the VM, I get this error:

'TRUENAS' failed to start.

Virtual Pci Express Port (Instance ID: ......... ): Failed to power on with Error 'A hypervisor feature is not available to user'


Can you help me out? All I need is to pci passthrough the sas card (lsi 9201 16i).

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

2 answers

Sort by: Most helpful
  1. Net Runner 505 Reputation points
    2024-04-14T13:28:12.5133333+00:00

    Depending on the vendor and make of your SAS controller, Hyper-V may not support discreet device assignment. However, using single disk passthrough or even regular VHDX files should be supported and work perfectly.

    If TrueNAS does not support those kinds of options, you may try an alternative solution, like Starwind https://www.starwindsoftware.com/blog/starwind-san-nas-over-fibre-channel-mdraid-vs-graid that supports ZFS and MDRIAD and works in almost any configuration.

    0 comments No comments

  2. Ian Xue (Shanghai Wicresoft Co., Ltd.) 29,891 Reputation points Microsoft Vendor
    2024-04-15T04:41:45.8933333+00:00

    Hi huseyin ozsut,

    Thanks for your post. Before moving on, please understand that this issue occurs on the TrueNAS side, it is suggested that we contacted the TrueNAS support team at first. Getting Support | (truenas.com)

    Also, according to the Hyper-V side, you can try to set the registry value EnableVirtualizationBasedSecurity under HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard to 0 and restart the computer. If it does not exit you can create the DWORD value manually, then see if it takes effects.

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments