cloning a vm means copying the current state, not the
state of 'some time in the future, when the vm is started again'
we should not copy the pending changes, which also fixes the
issue that we got a wrong pending change on the disks,net,smbios,etc.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
}
delete $newconf->{lock};
+
+ # do not write pending changes
+ if ($newconf->{pending}) {
+ warn "found pending changes, discarding for clone\n";
+ delete $newconf->{pending};
+ }
+
PVE::QemuConfig->write_config($newid, $newconf);
if ($target) {