Jump to content
egtrev

Passthrough complete onboard SATA controller to VM?

14 posts in this topic Last Reply

Recommended Posts

Hey,

 

My motherboard has 10 x SATA ports - 6 x Intel and 4 x ASMedia (+1 ASMedia E-SATA)

Is there anyway I can passthrough the complete ASMedia controller to a Windows VM?

 

I've read some guides, but they all seem to be for separate PCI SATA cards and not onboard.

 

The main reason I want this is I can not get my BD ROM to work properly inside a Windows VM when I passthrough through the single SCSI device.

 

I'm hoping passthrough on the complete controller instead may help?

 

Note: All array devices are on the Intel ports.

 

Thanks for any help.

 

00:00.0 Host bridge [0600]: Intel Corporation 4th Gen Core Processor DRAM Controller [8086:0c00] (rev 06)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
00:14.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI [8086:8c31] (rev 05)
00:16.0 Communication controller [0780]: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 [8086:8c3a] (rev 04)
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection I217-V [8086:153b] (rev 05)
00:1a.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 [8086:8c2d] (rev 05)
00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 05)
00:1c.0 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 [8086:8c10] (rev d5)
00:1c.2 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 [8086:8c14] (rev d5)
00:1c.3 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 [8086:8c16] (rev d5)
00:1c.4 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 [8086:8c18] (rev d5)
00:1d.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 [8086:8c26] (rev 05)
00:1f.0 ISA bridge [0601]: Intel Corporation Z87 Express LPC Controller [8086:8c44] (rev 05)
00:1f.2 SATA controller [0106]: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] [8086:8c02] (rev 05)
00:1f.3 SMBus [0c05]: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller [8086:8c22] (rev 05)
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Cedar [Radeon HD 5000/6000/7350/8350 Series] [1002:68f9]
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Cedar HDMI Audio [Radeon HD 5400/6300 Series] [1002:aa68]
03:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01)
04:00.0 Ethernet controller [0200]: Intel Corporation I211 Gigabit Network Connection [8086:1539] (rev 03)
05:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01)

 

Share this post


Link to post

Would probably work but post your IOMMU groups as well.

 

Here they are:

 

/sys/kernel/iommu_groups/0/devices/0000:00:00.0
/sys/kernel/iommu_groups/1/devices/0000:00:01.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.1
/sys/kernel/iommu_groups/2/devices/0000:00:02.0
/sys/kernel/iommu_groups/3/devices/0000:00:03.0
/sys/kernel/iommu_groups/4/devices/0000:00:14.0
/sys/kernel/iommu_groups/5/devices/0000:00:16.0
/sys/kernel/iommu_groups/6/devices/0000:00:19.0
/sys/kernel/iommu_groups/7/devices/0000:00:1a.0
/sys/kernel/iommu_groups/8/devices/0000:00:1b.0
/sys/kernel/iommu_groups/9/devices/0000:00:1c.0
/sys/kernel/iommu_groups/10/devices/0000:00:1c.2
/sys/kernel/iommu_groups/11/devices/0000:00:1c.3
/sys/kernel/iommu_groups/12/devices/0000:00:1c.4
/sys/kernel/iommu_groups/13/devices/0000:00:1d.0
/sys/kernel/iommu_groups/14/devices/0000:00:1f.0
/sys/kernel/iommu_groups/14/devices/0000:00:1f.2
/sys/kernel/iommu_groups/14/devices/0000:00:1f.3
/sys/kernel/iommu_groups/15/devices/0000:03:00.0
/sys/kernel/iommu_groups/16/devices/0000:04:00.0
/sys/kernel/iommu_groups/17/devices/0000:05:00.0

Share this post


Link to post

Would probably work but post your IOMMU groups as well.

 

Here they are:

 

/sys/kernel/iommu_groups/0/devices/0000:00:00.0
/sys/kernel/iommu_groups/1/devices/0000:00:01.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.1
/sys/kernel/iommu_groups/2/devices/0000:00:02.0
/sys/kernel/iommu_groups/3/devices/0000:00:03.0
/sys/kernel/iommu_groups/4/devices/0000:00:14.0
/sys/kernel/iommu_groups/5/devices/0000:00:16.0
/sys/kernel/iommu_groups/6/devices/0000:00:19.0
/sys/kernel/iommu_groups/7/devices/0000:00:1a.0
/sys/kernel/iommu_groups/8/devices/0000:00:1b.0
/sys/kernel/iommu_groups/9/devices/0000:00:1c.0
/sys/kernel/iommu_groups/10/devices/0000:00:1c.2
/sys/kernel/iommu_groups/11/devices/0000:00:1c.3
/sys/kernel/iommu_groups/12/devices/0000:00:1c.4
/sys/kernel/iommu_groups/13/devices/0000:00:1d.0
/sys/kernel/iommu_groups/14/devices/0000:00:1f.0
/sys/kernel/iommu_groups/14/devices/0000:00:1f.2
/sys/kernel/iommu_groups/14/devices/0000:00:1f.3
/sys/kernel/iommu_groups/15/devices/0000:03:00.0
/sys/kernel/iommu_groups/16/devices/0000:04:00.0
/sys/kernel/iommu_groups/17/devices/0000:05:00.0

Looks like your ASMedia controllers are in separate IOMMU groups above.  So which ASMedia controller are you wanting to pass through just one?  Both?

 

 

If you want both then you could stub them in syslinux and unRAID wouldn't be able to see the drives connected to them.  If you only want one of the two controllers then you will have to leave out the stub in syslinux and just make the required XML edit.

 

 

So for both you might have the following:

syslinux

label unRAID OS
  menu default
  kernel /bzimage
  append pci-stub.ids=1b21:0612 initrd=/bzroot

XML

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
      </source>
    </hostdev>

 

 

Try the above if you want to include both in your VM.  If you only want one of them then you will need to NOT do the syslinux edit above and then paste in only ONE of the "hostdev" sections for the controller you want to pass through either 03:00.0 or 05:00.0.

Share this post


Link to post

Thanks Bob. I only really need the one controller passed through. Would there be any advantage to passing both?

Share this post


Link to post

Thanks Bob. I only really need the one controller passed through. Would there be any advantage to passing both?

More drives in the VM.  But if you pass both you can hide the drives from unRAID.  If you only pass one controller you can only do the XML edits.  So the drives - all of them on both controllers - will show up in unRAID until the VM boots up. 

Share this post


Link to post
More drives in the VM.  But if you pass both you can hide the drives from unRAID.  If you only pass one controller you can only do the XML edits.  So the drives - all of them on both controllers - will show up in unRAID until the VM boots up.

 

I passed through both and now my BD ROM works fine across all programs.

MakeMKV/AnyDVD now work perfectly in the VM. My other devices also now can play whatever is loaded in the VM optical drive over the network with no issues - I couldn't get this to work previously when passing through a single SCSI.

 

Thanks for the help Bob!  :)

Share this post


Link to post

More drives in the VM.  But if you pass both you can hide the drives from unRAID.  If you only pass one controller you can only do the XML edits.  So the drives - all of them on both controllers - will show up in unRAID until the VM boots up.

 

I passed through both and now my BD ROM works fine across all programs.

MakeMKV/AnyDVD now work perfectly in the VM. My other devices also now can play whatever is loaded in the VM optical drive over the network with no issues - I couldn't get this to work previously when passing through a single SCSI.

 

Thanks for the help Bob!  :)

8):);D

Share this post


Link to post

One small quirk with this - When booting the VM, Seabios takes about 40 seconds longer before it starts to load Windows.

I'm guessing it is attempting to boot from the ODD on the controller that has been passed through.

Is there anyway to modify Seabios on the VM so the boot order can be changed?

Share this post


Link to post

One small quirk with this - When booting the VM, Seabios takes about 40 seconds longer before it starts to load Windows.

I'm guessing it is attempting to boot from the ODD on the controller that has been passed through.

Is there anyway to modify Seabios on the VM so the boot order can be changed?

I think what you want is in the unRAID GUI.  You click on the VM name which brings up the boot sequence.  Make sure HD is listed as selected in the drop down.  But I think your delay is because you are passing through a device to the VM.  In my VMs that I only pass through a single device it is quick loading.  But I have one that I'm passing through a nic, usb controller, several TV tuners and a HDD controller.  That one takes a long time to boot - still less then a minute to see the Windows boot screen in VNC but longer then the others.

Share this post


Link to post

One small quirk with this - When booting the VM, Seabios takes about 40 seconds longer before it starts to load Windows.

I'm guessing it is attempting to boot from the ODD on the controller that has been passed through.

Is there anyway to modify Seabios on the VM so the boot order can be changed?

I think what you want is in the unRAID GUI.  You click on the VM name which brings up the boot sequence.  Make sure HD is listed as selected in the drop down.  But I think your delay is because you are passing through a device to the VM.  In my VMs that I only pass through a single device it is quick loading.  But I have one that I'm passing through a nic, usb controller, several TV tuners and a HDD controller.  That one takes a long time to boot - still less then a minute to see the Windows boot screen in VNC but longer then the others.

That one was new to me. I have never noticed you can set the boot order there. Thanks for the tip  :)

Share this post


Link to post

I think what you want is in the unRAID GUI.  You click on the VM name which brings up the boot sequence.  Make sure HD is listed as selected in the drop down.  But I think your delay is because you are passing through a device to the VM.  In my VMs that I only pass through a single device it is quick loading.  But I have one that I'm passing through a nic, usb controller, several TV tuners and a HDD controller.  That one takes a long time to boot - still less then a minute to see the Windows boot screen in VNC but longer then the others.

 

Thanks, it was set to HD. Just have to deal with the Seabios slow loading when using passthrough I guess :)

Share this post


Link to post

Hey guys, i am also trying to passthrough an ASMedia 1062 controller, but it isn't 40 seconds for me, it takes 20 minutes to get into Windows Setup when i pass it through and then i can't install on the drive attached to the controller. Anyone else with this issue?

 

Posted about it here:

http://lime-technology.com/forum/index.php?topic=46664.msg458938#msg458938

That sounds long.  It takes 10 minutes some times for Windows to boot for me.  I think it helps to install the "guest-agent" from the vfio driver cd.  The minute I was talking about was for getting to the booting screen of Windows.  It then takes time for Windows to boot from there.  Another though is trying to pair the pinned cores correctly for Hyper Threaded CPUs.  There is mention of how to find the paired cores in other threads but I don't remember off hand what it was.

 

 

And I should have read closer.  I am not running from a passed through controller I'm booting from a virtual drive image running on my cache drive.  That may be the only way to run a Windows VM.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.