Question on Sata pass through to Windows VM
-
Hello everyone
I am running into an odd issue with passing through a Sata controller to a Windows 2022 VM and was hoping someone might have more insight with what I may be doing wrong.So the sata controller is a two port ASM1062 Serial ATA Controller card. It has a single LG Blue Ray Drive connected to it.
The OS appears to see the controller as a Standard SATA AHCI Controller in device manager. The problem is that it doesn't see the drive at all. The only device seen under DVD/CD-ROM drives is the QEMU DVD-ROM Device.
I'm pretty sure this should work, because as part of testing this I passed the controller to a Linux VM and was able to access the drive with no issue. I suspect it's something to do with the drivers or the QEMU Device.
Any guidance here would be appreciated.
-
Hi,
Are you sure you are passing correctly the controller? Please show us the lspci on the Dom0 first
-
From the host
# lspci 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Root Complex 00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Starship/Matisse IOMMU 00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge 00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:03.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge 00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:05.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:07.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:07.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] 00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61) 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51) 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 0 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 1 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 2 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 3 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 4 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 5 00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 6 00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse Device 24: Function 7 01:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 XHCI Controller (rev 01) 01:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset SATA Controller (rev 01) 01:00.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Bridge (rev 01) 02:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01) 02:01.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01) 02:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01) 02:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01) 02:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01) 02:08.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset PCIe Port (rev 01) 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 16) 04:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02) 05:00.0 Ethernet controller: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01) 07:00.0 VGA compatible controller: NVIDIA Corporation GK208B [GeForce GT 710] (rev a1) 07:00.1 Audio device: NVIDIA Corporation GK208 HDMI/DP Audio Controller (rev a1) 08:00.0 Non-Volatile memory controller: Sandisk Corp WD Blue SN550 NVMe SSD (rev 01) 09:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1) 09:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1) 0a:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Function 0b:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP 0b:00.1 Encryption controller: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Cryptographic Coprocessor PSPCPP 0b:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller 0b:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller
# xl pci-assignable-list 0000:09:00.0 0000:09:00.1 0000:04:00.0
# xe vm-param-get uuid=0838c7fa-b13e-78c2-5d2c-746bcee1a39b param-name=other-config pci: 0/0000:04:00.0; xo:0838c7fa: {"creation":{"date":"2024-05-15T06:42:01.381Z","template":"06a0428e-9848-9ab8-4abd-48f85d383736","user":"d7e4d4a0-cc96-4d78-b594-a8e29d124fac"}}; xo:36afdc30: {"creation":{"date":"2024-05-13T09:46:54.695Z","template":"1c33af1c-e919-418c-ad45-85d7d6fb604a","user":"d7e4d4a0-cc96-4d78-b594-a8e29d124fac"}}; base_template_name: Windows Server 2022 (64-bit); import_task: OpaqueRef:e4cc49ef-d199-43ed-815a-f834731890ce; mac_seed: bd3baa11-8e11-020f-7c69-7218a975f416; install-methods: cdrom
I'm still pretty new to XCP-NG so if there are any commands that you need output from, please feel free to let me know.
-
Thanks. What do you have set in your boot param? (to be sure the device is hidden to the Dom0). Paste the result of
/opt/xensource/libexec/xen-cmdline --get-dom0 xen-pciback.hide
. -
Here is the output:
# /opt/xensource/libexec/xen-cmdline --get-dom0 xen-pciback.hide xen-pciback.hide=(0000:04:00.0)(0000:09:00.0)(0000:09:00.1)
-
Okay I missed the part where you said it worked with Linux but not Windows. So to me the issue is probably on Windows itself not detecting the device than an XCP-ng issue
-
That's the odd thing with it. It appears that the Windows VM does see the Sata controller as being there. I've tried this with and without the Guest tools but see the same results either way. But it all works just fine with a Linux VM.
As a test I disconnected the Blue-ray and hooked up an SSD to it. I did see the SSD in Disk Management but would not let me initialize it or do anything else with it. I would think it was a driver but there aren't any provided by the manufacturer. So I assume it's just using a default one from Windows.
-
Anyone else in the community with experience on this? I'm afraid my Windows knowledge isn't great to know where to dig to understand the issue.