]> git.proxmox.com Git - qemu-server.git/commitdiff
add lock check for move_disk API call
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 22 Jul 2016 05:53:53 +0000 (07:53 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 26 Jul 2016 09:31:32 +0000 (11:31 +0200)
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

index 998e0aabc1a194f5ff0781a5e22b9343d3b7245e..dd42538b1fb747df921c72ef3420ba4079f13fb9 100644 (file)
@@ -2507,6 +2507,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};