mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
qemu: command: Format rerror/werror with -device instead of -drive
Use the new proper location for the read/write error policy selection. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a087a8e60a
commit
bb4f3543bb
@ -1667,7 +1667,8 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk,
|
||||
|
||||
/* werror/rerror are really frontend attributes, but older
|
||||
* qemu requires them on -drive instead of -device */
|
||||
qemuBuildDiskFrontendAttributeErrorPolicy(disk, &opt);
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_STORAGE_WERROR))
|
||||
qemuBuildDiskFrontendAttributeErrorPolicy(disk, &opt);
|
||||
|
||||
|
||||
/* While this is a frontend attribute, it only makes sense to be used when
|
||||
@ -2129,6 +2130,9 @@ qemuBuildDiskDeviceStr(const virDomainDef *def,
|
||||
|
||||
qemuBuildDiskFrontendAttributes(disk, &opt);
|
||||
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_STORAGE_WERROR))
|
||||
qemuBuildDiskFrontendAttributeErrorPolicy(disk, &opt);
|
||||
|
||||
if (virBufferCheckError(&opt) < 0)
|
||||
goto error;
|
||||
|
||||
|
@ -25,17 +25,17 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
|
||||
-boot strict=on \
|
||||
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
|
||||
-drive file=/dev/HostVG/QEMUGuest1,format=qcow2,if=none,id=drive-ide0-0-0,\
|
||||
werror=stop,rerror=stop,cache=none \
|
||||
cache=none \
|
||||
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1,\
|
||||
write-cache=on \
|
||||
write-cache=on,werror=stop,rerror=stop \
|
||||
-drive file=/dev/HostVG/QEMUGuest2,format=qcow2,if=none,id=drive-ide0-0-1,\
|
||||
werror=enospc,cache=none \
|
||||
cache=none \
|
||||
-device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,\
|
||||
write-cache=on \
|
||||
write-cache=on,werror=enospc \
|
||||
-drive file=/dev/HostVG/QEMUGuest3,format=qcow2,if=none,id=drive-ide0-1-0,\
|
||||
werror=report,rerror=ignore,cache=none \
|
||||
cache=none \
|
||||
-device ide-hd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,\
|
||||
write-cache=on \
|
||||
write-cache=on,werror=report,rerror=ignore \
|
||||
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
|
||||
resourcecontrol=deny \
|
||||
-msg timestamp=on
|
||||
|
Loading…
Reference in New Issue
Block a user