|
|
|
@ -72,18 +72,21 @@ sub get_vnc_info |
|
|
|
|
my $shell_call = "ssh root@".$host_name." \"virsh vncdisplay ".$server_name."\""; |
|
|
|
|
|
|
|
|
|
my ($shell_output, $shell_return_code) = $anvil->System->call({ shell_call => $shell_call }); |
|
|
|
|
my ($port_offset) = $shell_output =~ /:(\d+)$/; |
|
|
|
|
my $port_sum = $port_base + int($port_offset); |
|
|
|
|
|
|
|
|
|
$anvil->Log->variables({ source => $THIS_FILE, line => __LINE__, level => 2, list => { |
|
|
|
|
shell_output => $shell_output, |
|
|
|
|
shell_return_code => $shell_return_code, |
|
|
|
|
port_offset => $port_offset, |
|
|
|
|
port_sum => $port_sum |
|
|
|
|
shell_return_code => $shell_return_code |
|
|
|
|
} }); |
|
|
|
|
|
|
|
|
|
if ($shell_return_code == 0) |
|
|
|
|
{ |
|
|
|
|
$vnc_info->{port} = $port_sum; |
|
|
|
|
my ($port_offset) = $shell_output =~ /:(\d+)$/; |
|
|
|
|
$vnc_info->{port} = $port_base + int($port_offset); |
|
|
|
|
|
|
|
|
|
$anvil->Log->variables({ source => $THIS_FILE, line => __LINE__, level => 2, list => { |
|
|
|
|
port_offset => $port_offset, |
|
|
|
|
vnc_port => $vnc_info->{port} |
|
|
|
|
} }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return $vnc_info; |
|
|
|
|