View Single Post
Old 23rd October 2019, 17:07   #444  |  Link
mick0
Registered User
 
Join Date: Dec 2017
Posts: 36
Quote:
Originally Posted by lukesamuel View Post
1. Has anyone using findVUK on wine had the same problem?[/B], and are there any workarounds? (e.g. with qemu?)
I can't say anything about wine, but it works on qemu if you pass through your real drive to VM (no virtual drives like QEMU DVD-ROM etc)

This worked for me on qemu/libvirt. This is just an example, you need to adapt it to match your configuration.

If you want to pass through this drive for example, first make a note of the scsi_host number in "lsscsi --generic" output (in this example scsi_host number is 5)
Code:
[5:0:0:0]    cd/dvd  HL-DT-ST BD-RE  BH16NS55  1.02  /dev/sr1   /dev/sg4
Then you need to edit your domain xml and add new controller and hostdev. If you're using libvirt, then you can use "sudo virsh edit <domain>", e.g "sudo virsh edit windows".

Add a new virtio-scsi controller to "<devices>" section, or you can use an existing controller
Code:
    <controller type='scsi' index='1' model='virtio-scsi'>
      <driver max_sectors='64'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </controller>
Then add a new hostdev to "<devices>" section, make sure the scsi_host matches the drive you want to pass through (lsscsi). Controller number needs to match the index number of the controller you want to use.
Code:
   <hostdev mode='subsystem' type='scsi' managed='no' sgio='unfiltered' rawio='no'>
      <source>
        <adapter name='scsi_host5'/>
        <address bus='0' target='0' unit='0'/>
      </source>
      <address type='drive' controller='1' bus='0' target='0' unit='0'/>
    </hostdev>
I also had to add this to /etc/apparmor.d/abstractions/libvirt-qemu otherwise virt-viewer complains about insufficient permissions or something like that.
Code:
  /dev/sg4 rwk,
That should be it. If you're using libvirt, you may need to restart libvirtd.service. If all went well, the VM should now see your real drive and FindVUK should just work.
mick0 is offline   Reply With Quote