]> git.proxmox.com Git - qemu-server.git/commitdiff
create: add better check for unused IDs
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 5 Oct 2015 10:43:07 +0000 (12:43 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 5 Oct 2015 10:43:07 +0000 (12:43 +0200)
PVE/API2/Qemu.pm

index f1f7ed0ca2a93394f33d63a80b37f6adeea6830c..8bcc2bf0b35254f45c76c45db1417ac7cde2d3f1 100644 (file)
@@ -422,8 +422,7 @@ __PACKAGE__->register_method({
        my $createfn = sub {
 
            # test after locking
-           die "unable to create vm $vmid: config file already exists\n"
-               if -f $filename;
+           PVE::Cluster::check_vmid_unused($vmid);
 
            my $realcmd = sub {