February 9, 20251 yr I am using over two days access my dvd-writer to be recognized so I can use it to burn audio CDs. It is infuriating how we do not have a proper write up to address this issue. lsscsi returns the following for my dvd drive; [2:0:0:0] cd/dvd HL-DT-ST DVDRAM GH24LS70 GL01 /dev/sr0 And here is the relevant section of my xml file- <devices> <emulator>/usr/local/sbin/qemu</emulator> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/isos/iso/xubuntu-24.10-desktop-amd64.iso'/> <target dev='hda' bus='sata'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='writeback' discard='ignore'/> <source file='/mnt/cache/vms/vm-discks/vdisk1.img'/> <target dev='hdc' bus='sata' rotation_rate='1'/> <serial>vdisk1</serial> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> <controller type='scsi' index='0' model='virtio-scsi'> <!-- Host Device Passthrough (Physical SATA DVD-ROM) --> <hostdev mode='subsystem' type='scsi' bus='0x02' target='0x00' lun='0x00'> <address type='pci' bus='0x00' domain='0x0000' slot='0x04' function='0x0'/> </hostdev> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </controller> <controller type='pci' index='0' model='pci-root'/> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </controller> Adding this edit, I can not save the xml file using virsh; error code is - error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng Extra element devices in interleave Element domain failed to validate content If I add the extra entry into XML ahead of the <device> section, i receive a different validation error. What am I doing wrong?
March 5, 20251 yr You can try the following: First add a virtual SCSI contoller to your config: <controller type='scsi' index='0' model='virtio-scsi'> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </controller> If slot 0x09 is already used in your config for another device change it to something else Then add the passthrough for the drive <hostdev mode='subsystem' type='scsi' managed='no'> <source> <adapter name='scsi_host2'/> <address bus='0' target='0' unit='0'/> </source> <alias name='hostdev0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </hostdev> scsi_host2 -> the number of the drive in your system -> in your case scsi_host2 since you have [2:0:0:0] Both of these need to be in the devices-section. Edited March 5, 20251 yr by Starfiresg1
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.