]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/CLI/qm.pm
mediated device pass-through: fix race condition on VM reboot
[qemu-server.git] / PVE / CLI / qm.pm
index b17b4fe25d5bd21e9fe188e82998972b1dc29c36..dce6c7a1a244391dd89a1cc76334bdcd78f2c15a 100755 (executable)
@@ -915,7 +915,8 @@ __PACKAGE__->register_method({
        my $storecfg = PVE::Storage::config();
        warn "Starting cleanup for $vmid\n";
 
-       PVE::QemuConfig->lock_config($vmid, sub {
+       # mdev cleanup can take a while, so wait up to 60 seconds
+       PVE::QemuConfig->lock_config_full($vmid, 60, sub {
            my $conf = PVE::QemuConfig->load_config ($vmid);
            my $pid = PVE::QemuServer::check_running ($vmid);
            die "vm still running\n" if $pid;