ProxMox - Need help Converting part of XML I used to pass BluRay drive to VM in KVM

FreeSoftwareServers

New Member
Feb 27, 2018
3
0
1
82
Hello! I just migrated from a Fedora/KVM setup to ProxMox and It was a painless setup. I did have tiny bit of trouble getting past "code 43" with NVidia. (On Fedora I COULD NOT use q35, in ProxMox, I HAD TO, and I also NEEDED the pci=1 line). But I got that resolved. The last piece of hardware I want to get working again is my BD/DVD Drive.

In KVM in my domain I used the following to pass through my drive:

Find SCSI #:

Code:
    lsscsi
    [root@kvmatrix ~]# lsscsi
    [#:0:0:0]    cd/dvd  HL-DT-ST BD-RE  WH14NS40  1.03  /dev/sr0

Edit Domain XML and add this:

Note: Replace scsi_host# with the # found in lssci


Code:
   <controller type='scsi' index='0' model='virtio-scsi'/>
       <hostdev mode='subsystem' type='scsi'>
        <source>
           <adapter name='scsi_host#'/>
           <address type='scsi' bus='0' target='0' unit='0'/>
         </source>
         <readonly/>
         <address type='drive' controller='0' bus='0' target='0' unit='0'/>
       </hostdev>

I had to force the XML to be accepted as virsh edit gave errors, just press i and then reboot vm to test.

Can anybody help me figure out how to add this to the conf file in ProxMox? I'm thinking it needs to go in args:, but I can't seem to convert it to qemu cmdline argument. Thanks!

Note: This is required to get the Windows VM to recognize the drive as a "real" drive not a "qemu" drive.
 
Its too bad, I was hoping to use ProxMox, but without access to hardware I have already payed for and without support for any issues I don't see me making the change just for a GUI. This function worked fine with KVM and libvirt.
 
you can pass-through a raw block device of the host as root, just set the device path as "volume". you can also set scsiblock=1 to pass through SCSI commands from the guest to the physical device. see "man qm.conf" and "man qm" for details.
 
@fabian I have reverted back to KVM, but its not hard for me to switch back to ProxMox. I was thinking of firing up a VM of ProxMox nested in KVM and passing through the disk drive to the VM to test passthrough to another VM lol. Could you give an example command? I did read the man qm page, but still couldn't figure out how to add BD Drive.
 
@fabian I have reverted back to KVM, but its not hard for me to switch back to ProxMox. I was thinking of firing up a VM of ProxMox nested in KVM and passing through the disk drive to the VM to test passthrough to another VM lol. Could you give an example command? I did read the man qm page, but still couldn't figure out how to add BD Drive.

replace VMID, X and the path according to your needs:

Code:
qm set VMID -scsiX /PATH/TO/DEVICE

or

Code:
qm set VMID -scsiX /PATH/TO/DEVICE,scsiblock=1

depending on whether you want full pass through or not - beware of

man qm.conf said:
...
scsiblock=<boolean> (default = 0)
whether to use scsi-block for full passthrough of host block device

Warning
can lead to I/O errors in combination with low memory or high memory fragmentation on host
...
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!