Pass two different cd drives to two different VMs?

proxwolfe

Well-Known Member
Jun 20, 2020
534
64
48
50
Hi,

my host has two CD drives that I want to pass to two separate VMs.

But I can't find an option to choose which drive to pass to a VM. I only can choose to pass [a] CD drive to a VM and that happens to be always the same (and when one VM is running, the other VM doesn't get the other CD drive but none at all).

Is there a way to choose which CD drive to pass to a VM?

Thanks
 
Not via the GUI currently, but you can specify the device node of your CD drives directly in the <vmid>.conf. E.g.:

Code:
# vim /etc/pve/qemu-server/<vmid>.conf
boot: dcn
cores: 2
[...]
ide0: /dev/cdrom0

And then just use cdromX for the VM you want it assigned to.
 
This solution makes it so that my VM won't boot is there a way that I can get the log to find out why? I think it is due to the fact that CDs are block devices and do not act like standard drives
 
Last edited:
Thanks.

Qemu exits with an error, because there is no "cdrom0" (and no "cdrom1"). There is only a "cdrom" (although I have two drives). After "cdrom" there is a "cdrw" in the /dev directory. Could that be my other drive (actually, both are disk writers).
 
you could try mounting the file as a disk if it works you know you've found the correct one then change the config to disk or use sr0 that the cdrom is a symlink of