mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: Support setting the 'removable' flag for USB disks
Add an attribute named 'removable' to the 'target' element of disks, which controls the removable flag. For instance, on a Linux guest it controls the value of /sys/block/$dev/removable. This option is only valid for USB disks (i.e. bus='usb'), and its default value is 'off', which is the same behaviour as before. To achieve this, 'removable=on' (or 'off') is appended to the '-device usb-storage' parameter sent to qemu when adding a USB disk via '-disk'. A capability flag QEMU_CAPS_USB_STORAGE_REMOVABLE was added to keep track if this option is supported by the qemu version used. Bug: https://bugzilla.redhat.com/show_bug.cgi?id=922495 Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
committed by
Peter Krempa
parent
071249771b
commit
feba2febce
@@ -213,3 +213,14 @@ scsi-generic.bootindex=int32
|
||||
scsi-generic.channel=uint32
|
||||
scsi-generic.scsi-id=uint32
|
||||
scsi-generic.lun=uint32
|
||||
usb-storage.drive=drive
|
||||
usb-storage.logical_block_size=blocksize
|
||||
usb-storage.physical_block_size=blocksize
|
||||
usb-storage.min_io_size=uint16
|
||||
usb-storage.opt_io_size=uint32
|
||||
usb-storage.bootindex=int32
|
||||
usb-storage.discard_granularity=uint32
|
||||
usb-storage.serial=string
|
||||
usb-storage.removable=on/off
|
||||
usb-storage.port=string
|
||||
usb-storage.full-path=on/off
|
||||
|
||||
@@ -225,3 +225,14 @@ scsi-generic.bootindex=int32
|
||||
scsi-generic.channel=uint32
|
||||
scsi-generic.scsi-id=uint32
|
||||
scsi-generic.lun=uint32
|
||||
usb-storage.drive=drive
|
||||
usb-storage.logical_block_size=blocksize
|
||||
usb-storage.physical_block_size=blocksize
|
||||
usb-storage.min_io_size=uint16
|
||||
usb-storage.opt_io_size=uint32
|
||||
usb-storage.bootindex=int32
|
||||
usb-storage.discard_granularity=uint32
|
||||
usb-storage.serial=string
|
||||
usb-storage.removable=on/off
|
||||
usb-storage.port=string
|
||||
usb-storage.full-path=on/off
|
||||
|
||||
Reference in New Issue
Block a user