Secondary SSD pass through


Recommended Posts

Hi!

 

I have a Win10 VM with NVME pass through enable and booting working fine but I need to pass through the secondary SSD where my games are installed. 

 

Here is the VMs config, primary Vdisk is set to manual following spaceinvader one guide and is working fine, I've try to set secondary vdisk manually adding the SSDs id copy from /dev/disk/by-id/ updated the config but the changes are not saved or they disappear. 
 

image.thumb.png.5d98a10911879cb737e00e5fbc3d2fc1.png

 

Here you can see the drive is recognized by unraid and unassigned devices plugin, I've also tried to mount the SSD and turn on pass through, after that tried both start the vm to see if the disk was recognized by windows and again adding the SSD manually as secondary vdisk but still not work. 

 

image.thumb.png.8d602a74d8d41ad892dcbb677cb05216.png

 

My IOMMU groups, the SSD is on the same group as my array disks, PCIe ACS override is set to Downstream
 

image.thumb.png.6299479a0f029dd575da1c1e1c8a1424.png

 

I know this should be very easy to do, in fact I did it once before when I was testing Unraid for the first time and I managed to boot from my NVME and have the secondary SSD also in the VM but I don't remember how.

Link to comment
2 hours ago, surferjsmc said:

how I should set up the disk?

 

First shutdown your VM. You can edit VMs if they are stopped only.

 

In your screenshot I don't see the Primary VDisk. It's not set. Set that first.

 

Now click on the + symbol behind the first Vdisk to add a second Disk.

 

Now decide what you want to archive. Do you want to passthrough the complete disk or the partition only? If you don't need the disk in the host passthrough the complete disk. You have to enter the complete path for this disk then - e.g. /dev/disk/by-id/ata-xyz without the trailing "-partx".

 

Within this disk section choose virtio as driver. It's possible to choose SATA, but that's up to you. I'm using Virtio because I had problems with SATA passthrough of complete disks. I had to add a <serial> parameter to get this working. Just test it with the default.

 

If you switch to XML view of this VMs configuration, you will see two <disk> blocks then. One for the Vdisk and one for the passed through disk. It looks something like the following. Just start with the configuration the GUI sets and leave the difference to mine out:

 

# This is the VDisk
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/cache/domains/VM/vdisk1.img' index='1'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk1'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </disk>
# This is the passed through disk
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source dev='/dev/disk/by-id/ata-WDC_WD6003FFBX-68MU3N0_V8GDLSNR' index='2'/>
      <backingStore/>
      <target dev='hdd' bus='virtio'/>
      <serial>V8GDLSNR</serial>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
    </disk>
 

 

 

Edited by hawihoney
Link to comment

Hi!

I've been tinkering a bit since my last post and just saw your answer @hawihoney, haven't tried your advice yet but I managed to make the SSD visible on my Win VM, here is what I've done:

 

  1. disabled passed through in UD
    image.png.4cd641e5264267d6fcb3f8c24df7abe5.png
     
  2. Mount the SSD in UD
    image.thumb.png.2d8dc7f0feb8a783dcabace275c3074f.png
     
  3. Add SSD to the VM as Primary vDisk setting Bus as VirtIO
    image.thumb.png.a12ff07ae2b67e50f1756facafb0c9e8.png
     

No need to manually edit config XML file.

 

At this point when I boot the VM I get Win boot repair screen, after choosing kb layout I've select the option to restart and enter UEFI bios, here I have to select the NVME disk as primary boot and voila Windows starts normally.

 

The SSD wasn't showing after boot, checked  Device Manager and I had to install the driver for Red Hat VirtIO SCSI Controller

 

Since I set it to pass through the whole disk now I can see both partitions in File explorer, because the bus was set to VirtIO the disk isn't recognized as a SATA drive therefore Samsung Magician software failed to find target disk. 

 

VM turned off again and changed BUS to SATA, after started I've got the repair screen again, selected NVME drive for primary boot and Windows started ok, both partition showed and after changing drives letters all my broken links are now fixed, Samsung magician doesn't find the disk since the drive now changed from SCSI to QEMU HARDDISK but this is a minor thing since I can live without it

 

The only problem I'm having now is the repair menu shows every time the VM is started so I have to  set the primary boot device manually again following the repair process, a real pain in the ... 🙂

 

In the UEFI boot menu I set the NVME drive as the primary device and saved changes everywhere I can but is worth nothing.

 

Any ideas on how to fix this or should I open a new post?

 

Thx!

 

 

 

Link to comment

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.