diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index f1f7ed0c..8bcc2bf0 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -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 {