Passthrough sas ssd


Recommended Posts

hey guys 

 

I am try to passthrough a 400g sas ssd to a vm to install windows server 2016 on it but everytime i try i get an error about the block device not being there i have tried the unassigned plugin to give it passthrough status but its still not working am i missing something i am on 6.8.3 build

 

Regards

Andrew

VM Error.JPG

Edited by muzzy182uk
add picture of error
Link to comment
  • 2 months later...

I was playing around with this, I have some need similar to yours, In the VM i have this sentences:

<disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source dev='/dev/disk/by-id/IBM-ESXS_ST10000NM0226_E'/>
      <target dev='hdd' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>

And I get this error:

Did you manage to solve it?

 

Cheers

error.jpg

Link to comment

Well, thanks! That's something new to me! And the results I got have nothing to do with what I've written in the XML. It sounds very interesting and logical. 

Here is what I've got from the devices, I've highlited /sdd the drive I want to pass through, however, it never got to windows's VM:

(sorry, my windows is in spanish, but you get the idea, it does not appear there):

Screen Shot 2020-09-25 at 1.17.03 PM.png

Screen Shot 2020-09-25 at 1.18.37 PM.png

 

But, here is how my xml was:

<disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source dev='/dev/disk/by-id/scsi-35000c50086b39343'/>
      <target dev='hdd' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>

 

I changed to this 

 

<disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source dev='/dev/disk/by-id/scsi-35000c50086b39343'/>
      <target dev='hdd' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>

And now I see another disk, however I can not format, or erase it or create/ delete partitions:

 408811417_ScreenShot2020-09-25at1_55_27PM.thumb.png.0a5fc1351d2cbe7f8e07879509ddfc83.png

Edited by rojarrolla
Added more information.
Link to comment
17 hours ago, rojarrolla said:

however, it never got to windows's VM

When you use scsi bus for the disk and you don't see the disk are you sure you configured the scsi controller?

I asked the same thing in another discussion, but I think you misunderstood, since you replied about controller passthrough.

What I meant is if you had something like this in the xml:

<controller type='scsi' index='0' model='virtio-scsi'/>

From documentation:
 

Quote

When we only specify a disk device with "scsi" bus but without a scsi controller, libvirt will create an scsi controller of "lsi" model by default, which will make Virtio-scsi Passthrough unable to work properly.

Anyway if you are satisfied with sata, stick to it.

Edited by ghost82
  • Like 1
Link to comment
16 hours ago, ghost82 said:

As I can see from your screensht, you have a protected partition.

Try to follow these steps:

https://endurtech.com/remove-protected-hard-drive-partitions-with-windows-10/

 

 

Dear Ghost82!

 

Thank you so much for your guidance and your patience, you are one of the kindest people I've found here. I wish more people were as kind as you. 

Not only you guided me, but you even took some of your precious time to find a youtube video in spanish (which is my mother language) to help me overcome this issue. I can't be thankful enough!

 

I formated the drive under unraid and because of the size it had the locked GPT partition, I totally overlooked Diskpart, I don't use it that much, normally I adress and solve drive issues with disk manager.

 

Now I have my full 10 TB drive available in the Windows 10 VM. It is the "F" drive (not word hehe).

I hope that I can return you the favor in the future. If there was more people like you in this world, it would be way different!

 

Again! Thank you so much!

Cheers!

 

 

Screen Shot 2020-09-26 at 10.48.18 PM.png

  • Like 1
Link to comment
16 hours ago, ghost82 said:

When you use scsi bus for the disk and you don't see the disk are you sure you configured the scsi controller?

I asked the same thing in another discussion, but I think you misunderstood, since you replied about controller passthrough.

What I meant is if you had something like this in the xml:


<controller type='scsi' index='0' model='virtio-scsi'/>

From documentation:
 

Anyway if you are satisfied with sata, stick to it.



I'm not passing the SCSI controller to the VM, as far as I know, if I do it, I wouldn't be able to use it for other dockers or VMs while this windows VM is running. Here is how my xml finally file looks:

<disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source dev='/dev/disk/by-id/scsi-35000c50086b39343' index='3'/>
      <backingStore/>
      <target dev='hdd' bus='sata'/>
      <alias name='sata0-0-3'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>

So Far so good, the drive is an unassigned device and it is working under Windows10.


I don't have this line in the xml file:

<controller type='scsi' index='0' model='virtio-scsi'/>

What could it change if I use this line in the xml?

 

Like I said it is working now, and, you know, "if it ain't broke... don't fix it" ! But if you think it can perform better, I would gladly add it.

Cheers!


PS: I leave here a copy of my .XML file, it is how my VM is working. With a SAS Drive for unassigned devices.

Windows 10 VM.rtf

Edited by rojarrolla
Added rtf file.
Link to comment

Thank you for your words,

 

4 hours ago, rojarrolla said:

I'm not passing the SCSI controller to the VM

Yes, you are not passing through the controller!

4 hours ago, rojarrolla said:

I don't have this line in the xml file:


<controller type='scsi' index='0' model='virtio-scsi'/>

What could it change if I use this line in the xml?

I'm saying that in a virtual machine, as in a real pc, you must have a controller and a disk, not only a disk: if you want to use a scsi disk in the vm you need a scsi controller in the vm, now that you are using a sata disk in the vm you have a sata controller in the vm.

If you check your xml you will probably find something like this:

<controller type='sata' index='0'>

This is a virtual sata controller where your disk attaches.

 

By saying you need a controller I mean a virtual controller, or a passed through controller, in your case a virtual controller.

The same for the scsi controller, that line of code I posted and that you quoted is to setup a virtual scsi controller in the vm, where your scsi disk (defined in the vm) had to attach.

Link to comment
6 hours ago, ghost82 said:

By saying you need a controller I mean a virtual controller, or a passed through controller, in your case a virtual controller.

Ok, now I get it, I went over my xml file and found that I have such lines:

1890370655_ScreenShot2020-09-27at10_16_15AM.png.3bcb1df678bee030729afba645d2181d.png

 

Then should I change my xml :
from 
<target dev='hdd' bus='sata'/>

to

<target dev='hdd' bus='scsi'/> ?

Thanks a lot!

Link to comment

you can try and experiment, not sure it will work :P.

The controller of your interest is type='scsi'

I would not use for scsi the lsilogic model, probably that's because it didn't work before, you could not see the disk in the guest...I would try model='virtio-scsi'

I think you will need also virtio drivers in the guest (?).

And yes, accordingly to the controller you set the target in the disk, in your case sata or scsi, as you wrote.

 

Backup your current working xml in case you mess up things!

Edited by ghost82
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.