[pve-devel] [PATCH qemu-server] add lock check for move_disk API call

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Jul 22 07:53:53 CEST 2016


this API call changes the config quite drastically, and as
such should not be possible while an operation that holds a
lock is ongoing (e.g., migration, backup, snapshot).
---
 PVE/API2/Qemu.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index df0518d..f4304b8 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -2506,6 +2506,8 @@ __PACKAGE__->register_method({
 
 	    my $conf = PVE::QemuConfig->load_config($vmid);
 
+	    PVE::QemuConfig->check_lock($conf);
+
 	    die "checksum missmatch (file change by other user?)\n"
 		if $digest && $digest ne $conf->{digest};
 
-- 
2.1.4




More information about the pve-devel mailing list