Can't pass CDROM drive to VM!?!?!?!?!

proxwolfe

Well-Known Member
Jun 20, 2020
501
52
48
49
Hi,

I am trying to pass the PVE host's cdrom drive to one of the VMs. The drive shows up in the VM (Windows 10) and sometimes it shows even the inserted disk. But every try to actually read from it fails (it just doesn't do anything and after 10 minutes or so I kill the app trying to read).

Is there a trick involved to get this working?

Thanks!
 
How did you add it? Hardware tab of your VM -> Add -> CD/DVD Drive -> "use physical CD/DVD Drive"?
 
Note that this way of passing the optical drive to a VM only works for data discs and not for DVD or Blu-ray video or audio CDs or writing/burning discs . There are (old) threads about alternative ways to pass a optical drive on this forum.
Oh, I wasn't aware of that. It is a DVD I am trying to pass through in the drive. I will dig for those threads. Thanks!!!
 
Someone recently posted that they had stability issues with CDrom (although non-physical) when using q35 type machine.

https://forum.proxmox.com/threads/pve-6-4-cloud-init-doesnt-work-in-ubuntu-22-04.111146/#post-537201


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
I tried to change the type to i440fx but Windows wouldn't start like that.

So I installed a new VM with i440fx but the problems, sadly, persisted.
 
Hi, please try this -
is it a SATA interface?

You can passthrough that from proxmox shell.
just enter-


Code:
first discover the disks in proxmox shell with-

 ls -n  /dev/disk/by-id/


for VirtIO passthrough- (if multiple drives, keep changing the virtIO number like virtio3, virtio4.... )

/sbin/qm set "VM id in number " -virtio3 /dev/disk/by-id/"Disk id by ata/scsi/wwn "

example code---
/sbin/qm set 100 -virtio3 /dev/disk/by-id/ata-ST3500413AS_Z2A4RXV0


Please note
1. Don't enter by sda, sdb......those will change as you reboot or add more drives..
2. Don't use the virtual IO (virtIo) number which is already used... see attached image
3. Mention the correct VM id
4.If VirtIO doesn't work try ide (like ide3) as the default optical drive interface is provided as ide, there must be any reason, I didn't try thus can't tell for sure. Please try and if it works, update this thread. That will help many
the code then will be-
Code:
/sbin/qm set 100 -ide3 /dev/disk/by-id/ata-ST3500413AS_Z2A4RXV0

This function will work for passing through SATA HDDs as well.
 

Attachments

  • Screenshot 2023-03-05 213720.png
    Screenshot 2023-03-05 213720.png
    68.3 KB · Views: 41
Last edited:
Hi, please try this -
is it a SATA interface?

You can passthrough that from proxmox shell.
just enter-


Code:
first discover the disks in proxmox shell with-

 ls -n  /dev/disk/by-id/


for VirtIO passthrough- (if multiple drives, keep changing the virtIO number like virtio3, virtio4.... )

/sbin/qm set "VM id in number " -virtio3 /dev/disk/by-id/"Disk id by ata/scsi/wwn "

example code---
/sbin/qm set 100 -virtio3 /dev/disk/by-id/ata-ST3500413AS_Z2A4RXV0


Please note
1. Don't enter by sda, sdb......those will change as you reboot or add more drives..
2. Don't use the virtual IO (virtIo) number which is already used... see attached image
3. Mention the correct VM id
4.If VirtIO doesn't work try ide (like ide3) as the default optical drive interface is provided as ide, there must be any reason, I didn't try thus can't tell for sure. Please try and if it works, update this thread. That will help many
the code then will be-
Code:
/sbin/qm set 100 -ide3 /dev/disk/by-id/ata-ST3500413AS_Z2A4RXV0

This function will work for passing through SATA HDDs as well.
Thanks, I will try.

Currently, my solution is to use a PCIe USB card that I pass to the VM and a USB DVD drive attached to the card. That works.

Does anyone know why you can't pass through a movie disk? Does that have to do with the encryption?

Thanks!
 
Thanks, I will try.

Currently, my solution is to use a PCIe USB card that I pass to the VM and a USB DVD drive attached to the card. That works.

Does anyone know why you can't pass through a movie disk? Does that have to do with the encryption?

Thanks!
Hi, I wouldn't trust any USB card over PCIe, those are notorious for corrupting data they write, especially when over heated. Unless a good make, please avoid such devices. If it's read only, please do perform a checksum varification. If using windows platform Teracopy is a great option. On linux cmd-line the copy feature comes with checksum.
 
Currently, my solution is to use a PCIe USB card
You don't need that extra step. Do regular USB-passthrough with the USB drive and kick out DVD Drive -> "use physical CD/DVD Drive"
Another cheap workaround is a SATA-USB adapter (attachment). With this you can attach your internal 5,25" drive via USB and also use normal USB passthrough on the adapter. You can leave the power connector as it is and don't need the external one from the picture.

Does anyone know why you can't pass through a movie disk?
It is not only movie disk. Anything that needs exclusive access to the drive depends on that. USB passthrough gives that exclusive access and "use physical CD/DVD Drive" will do it more like in a network drive way, regardless if only one VM is using it.
 

Attachments

  • ide-sata-hdd-ssd-usb-adapter.jpg
    ide-sata-hdd-ssd-usb-adapter.jpg
    37.7 KB · Views: 9
Hi i have the same problem :(
i tryed

Code:
root@proxmoxi5:~# ls -n  /dev/disk/by-id/
total 0
lrwxrwxrwx 1 0 0  9 Dec 30 01:40 ata-hp_PLDS_DVDRW_DU8AESH_XHDFPGTBVC19 -> ../../sr0

than

/sbin/qm set 220 -virtio5 /dev/disk/by-id/ata-hp_PLDS_DVDRW_DU8AESH_XHDFPGTBVC19

Than start Windows10 VM, but it dont start anymore
"ERROR: start failed: QEMU exited with code 1"

tryed than the ide way
/sbin/qm set 220 -ide3 /dev/disk/by-id/ata-hp_PLDS_DVDRW_DU8AESH_XHDFPGTBVC19

but same problem

i want to use the DVD burner in VM Windows 10 to burn some CD´s :(
Any help ? :)

//edit
if i mount the dvd before, than windows vm starts correctly but the dvd drive is found in computer manager as a data drive and cant be used :(
 
Last edited:
Hi i have the same problem :(
i tryed

Code:
root@proxmoxi5:~# ls -n  /dev/disk/by-id/
total 0
lrwxrwxrwx 1 0 0  9 Dec 30 01:40 ata-hp_PLDS_DVDRW_DU8AESH_XHDFPGTBVC19 -> ../../sr0

than

/sbin/qm set 220 -virtio5 /dev/disk/by-id/ata-hp_PLDS_DVDRW_DU8AESH_XHDFPGTBVC19

Than start Windows10 VM, but it dont start anymore
"ERROR: start failed: QEMU exited with code 1"

tryed than the ide way
/sbin/qm set 220 -ide3 /dev/disk/by-id/ata-hp_PLDS_DVDRW_DU8AESH_XHDFPGTBVC19

but same problem

i want to use the DVD burner in VM Windows 10 to burn some CD´s :(
Any help ? :)
That way won't work for burning. See these threads for an alternative ways: https://forum.proxmox.com/search/6467992/?q=burn&t=post&c[child_nodes]=1&c[nodes][0]=16&o=date
 

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!