qemu: support CDROM hotplug cdrom with USB/SCSI bus

QEMU supports hotplug of a cdrom device with USB or SCSI bus. Just
unblock these devices in qemuDomainAttachDeviceDiskLiveInternal() and
qemuDomainDetachPrepDisk().

Fixes: https://gitlab.com/libvirt/libvirt/-/issues/261

Signed-off-by: minglei.liu <minglei.liu@smartx.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
minglei.liu
2022-07-06 02:57:10 -07:00
committed by Michal Privoznik
parent 7b28561c85
commit 3078799fef
6 changed files with 162 additions and 3 deletions

View File

@@ -0,0 +1,6 @@
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/dev/null'/>
<target dev='sde' bus='scsi'/>
<readonly/>
</disk>

View File

@@ -0,0 +1,6 @@
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/dev/null'/>
<target dev='sde' bus='usb'/>
<readonly/>
</disk>