Clone bugs fixed
This commit is contained in:
parent
36c574b549
commit
0d046306c0
|
@ -1,4 +1,4 @@
|
|||
vn-vmware (1.0.35) stable; urgency=low
|
||||
vn-vmware (1.0.36) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
16
vn-vmware.pl
16
vn-vmware.pl
|
@ -741,6 +741,14 @@ sub clone_machine {
|
|||
spec => $clone_spec
|
||||
);
|
||||
my $vm_clone = Vim::get_view(mo_ref => $vm_clone_ref);
|
||||
|
||||
if ($original_vm && $overwrite) {
|
||||
log_message "Deleting machine '$dst_name'.";
|
||||
$original_vm->Destroy();
|
||||
|
||||
log_message "Renaming '$dst_tmp_name' to '$dst_name'.";
|
||||
$vm_clone->Rename(newName => $dst_name);
|
||||
}
|
||||
|
||||
my $change_spec = VirtualMachineConfigSpec->new(
|
||||
memoryMB => $memory,
|
||||
|
@ -750,14 +758,6 @@ sub clone_machine {
|
|||
extraConfig => [$extra_conf]
|
||||
);
|
||||
$vm_clone->ReconfigVM(spec => $change_spec);
|
||||
|
||||
if ($original_vm && $overwrite) {
|
||||
log_message "Deleting machine '$dst_name'.";
|
||||
$original_vm->Destroy();
|
||||
|
||||
log_message "Renaming '$dst_tmp_name' to '$dst_name'.";
|
||||
$vm_clone->Rename(newName => $dst_name);
|
||||
}
|
||||
|
||||
if ($poweron) {
|
||||
log_message "Powering on '$dst_name'.";
|
||||
|
|
Reference in New Issue