Author: arkurth Date: Mon Apr 25 19:00:31 2011 New Revision: 1096563 URL: http://svn.apache.org/viewvc?rev=1096563&view=rev Log: VCL-450 Removed code from capture subroutine which copies the reference vmx file after copy_vmdk is called because copy_vmdk handles this task.
Moved $reservation_password declaration in prepare_vmx to a commented-out section later on. This section is the only place it's used and the declaration was causing warnings to appear in the log file if the password wasn't initialized. Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/VMware/VMware.pm Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/VMware/VMware.pm URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/VMware/VMware.pm?rev=1096563&r1=1096562&r2=1096563&view=diff ============================================================================== --- incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/VMware/VMware.pm (original) +++ incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/VMware/VMware.pm Mon Apr 25 19:00:31 2011 @@ -616,15 +616,7 @@ sub capture { # Files can be copied directly to the image repository and converted while they are copied my $repository_vmdk_file_path = $self->get_repository_vmdk_file_path(); if ($self->copy_vmdk($vmdk_file_path_renamed, $repository_vmdk_file_path, '2gbsparse')) { - - # Copy the reference vmx file of the VM being captured to the vmdk directory - my $repository_vmx_file_path = "$repository_directory_path/$image_name.vmx"; - if ($self->vmhost_os->copy_file($vmx_file_path_renamed, $repository_vmx_file_path)) { - $repository_copy_successful = 1; - } - else { - notify($ERRORS{'WARNING'}, 0, "failed to copy the reference vmx file to the repository mounted on the VM host after the VM was powered off: '$vmx_file_path_renamed' --> '$repository_vmx_file_path'"); - } + $repository_copy_successful = 1; } else { notify($ERRORS{'WARNING'}, 0, "failed to copy the vmdk files to the repository mounted on the VM host after the VM was powered off: '$vmdk_file_path_renamed' --> '$repository_vmdk_file_path'"); @@ -1492,7 +1484,6 @@ sub prepare_vmx { my $vm_persistent = $self->is_vm_persistent(); my $guest_os = $self->get_vm_guest_os() || return; my $vmware_product_name = $self->get_vmhost_product_name(); - my $reservation_password = $self->data->get_reservation_password(); # Create the .vmx directory on the host if (!$self->vmhost_os->create_directory($vmx_directory_path)) { @@ -1626,6 +1617,7 @@ sub prepare_vmx { "mainMem.useNamedFile" => "FALSE", ); + #my $reservation_password = $self->data->get_reservation_password(); #if (defined($reservation_password)) { # my $vnc_port = ($computer_id + 10000); # notify($ERRORS{'DEBUG'}, 0, "vnc access will be enabled, port: $vnc_port, password: $reservation_password");