[pve-devel] [PATCH qemu-server] fix #4284: add read-only to non-hotpluggable disk options

Leo Nunner l.nunner at proxmox.com
Mon Oct 17 15:24:00 CEST 2022


Changing the read-only status of a disk is not possible through QMP, so
it needs to be exempt from the hotpluggable values as to notify the
user.

Signed-off-by: Leo Nunner <l.nunner at proxmox.com>
---
 PVE/QemuServer.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 4e85dd0..08a172d 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -5213,7 +5213,8 @@ sub vmconfig_update_disk {
 		    safe_string_ne($drive->{iothread}, $old_drive->{iothread}) ||
 		    safe_string_ne($drive->{queues}, $old_drive->{queues}) ||
 		    safe_string_ne($drive->{cache}, $old_drive->{cache}) ||
-		    safe_string_ne($drive->{ssd}, $old_drive->{ssd})) {
+		    safe_string_ne($drive->{ssd}, $old_drive->{ssd}) ||
+		    safe_string_ne($drive->{ro}, $old_drive->{ro})) {
 		    die "skip\n";
 		}
 
-- 
2.30.2






More information about the pve-devel mailing list