mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-01 15:34:11 +00:00
api: clone vm: check against cloning running TPM state early
Drive keys are sorted when cloning and 'tpmstate0' comes late, so it was likely that potentially large disks were already copied just to be removed again, because of the TPM state restriction at the end. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
1d1f8f9ada
commit
e4a70a41fb
@ -3151,6 +3151,9 @@ __PACKAGE__->register_method({
|
||||
# no need to copy unused images, because VMID(owner) changes anyways
|
||||
next if $opt =~ m/^unused\d+$/;
|
||||
|
||||
die "cannot clone TPM state while VM is running\n"
|
||||
if $full && $running && !$snapname && $opt eq 'tpmstate0';
|
||||
|
||||
# always change MAC! address
|
||||
if ($opt =~ m/^net(\d+)$/) {
|
||||
my $net = PVE::QemuServer::parse_net($value);
|
||||
|
Loading…
Reference in New Issue
Block a user