Author: arkurth
Date: Wed Sep 22 17:35:32 2010
New Revision: 199
URL: http://svn.apache.org/viewvc?rev=199view=rev
Log:
VCL-145
Updated Windows.pm and Version_5.pm so that Windows 5.x image capture processes
don't fail if Sysprep is enabled and no stroage driver .inf files are found.
VCL-298
Updated VMware.pm to remove the VM from the VM host when the VM is unassigned
via the website.
Other
Added calls to kill the logon screen saver process in the Windows code before a
reboot or shutdown is attempted. This occasionally causes a reboot or shutdown
to hang.
Modified:
incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm
incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_5.pm
incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_6.pm
incubator/vcl/trunk/managementnode/lib/VCL/Module/Provisioning/VMware/VMware.pm
Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm?rev=199r1=198r2=199view=diff
==
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm Wed Sep 22
17:35:32 2010
@@ -3132,7 +3132,10 @@ sub reboot {
notify($ERRORS{'WARNING'}, 0, reboot not attempted,
failed to enable ping from private IP addresses);
return 0;
}
-
+
+ # Kill the screen saver process, it occasionally prevents
reboots and shutdowns from working
+ $self-kill_process('logon.scr');
+
# Initiate the shutdown.exe command to reboot the computer
my $shutdown_command = $system32_path . /shutdown.exe -r -t 0
-f;
my ($shutdown_exit_status, $shutdown_output) =
run_ssh_command($computer_node_name, $management_node_keys, $shutdown_command);
@@ -3276,6 +3279,9 @@ sub shutdown {
my $computer_node_name = $self-data-get_computer_node_name();
my $system32_path= $self-get_system32_path() || return;
+ # Kill the screen saver process, it occasionally prevents reboots and
shutdowns from working
+ $self-kill_process('logon.scr');
+
my $shutdown_command = /bin/cygstart.exe $system32_path/cmd.exe /c \;
if ($disable_dhcp) {
@@ -8742,12 +8748,7 @@ sub get_driver_inf_paths {
elsif (defined($grep_output)) {
my @inf_paths = grep(/:[\\\/]/, @$grep_output);
notify($ERRORS{'DEBUG'}, 0, found . scalar(@inf_paths) .
driver .inf paths, grep output:\n. join(\n, @$grep_output));
- if (@inf_paths) {
- return @inf_paths;
- }
- else {
- return 0;
- }
+ return @inf_paths;
}
elsif (defined($grep_exit_status)) {
notify($ERRORS{'WARNING'}, 0, failed to find driver paths,
exit status: $grep_exit_status, output:\...@{$grep_output});
Modified:
incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_5.pm
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_5.pm?rev=199r1=198r2=199view=diff
==
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_5.pm
(original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_5.pm
Wed Sep 22 17:35:32 2010
@@ -266,6 +266,9 @@ sub run_sysprep {
notify($ERRORS{'WARNING'}, 0, unable to configure firewall to
allow sessmgr.exe program, Sysprep may hang);
}
+ # Kill the screen saver process, it occasionally prevents reboots and
shutdowns from working
+ $self-kill_process('logon.scr');
+
# Assemble the Sysprep command
# Run Sysprep.exe, use cygstart to lauch the .exe and return immediately
my $sysprep_command = /bin/cygstart.exe $system32_path/cmd.exe /c \;
@@ -477,18 +480,19 @@ sub get_sysprep_inf_contents {
# Add the SysprepMassStorage section
my $mass_storage_section =
$self-get_sysprep_inf_mass_storage_section();
- if (!$mass_storage_section) {
+ if ($mass_storage_section) {
+ $sysprep_contents .=
[SysprepMassStorage]\n$mass_storage_section;
+ }
+ elsif (!defined($mass_storage_section)) {
notify($ERRORS{'WARNING'}, 0, unable to build sysprep.inf
SysprepMassStorage section);
return;
}
- else {
- $sysprep_contents .=
[SysprepMassStorage]\n$mass_storage_section;
- }
+
# Replace Unix\Linux newlines with Windows newlines