You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vcl.apache.org by Ryan Johnson <rj...@gwmail.gwu.edu> on 2010/02/23 16:12:22 UTC

failed to execute ssh command during capture

I was trying to capture Vista image using the instructions for creating a
windows base image and got the error below.
Has anyone ever seen this before, usually there is some output which more
specifically highlights the problem, but not in this case.
I have gotten permission denied in the past, but I fixed that by adding the
public keys of the management node and the vcl service and I am able to ssh
from the command line into
the ESX server without having to enter a password.  Any help with this would
be greatly appreciated.

2010-02-23 10:04:44|16801|1:4|image|esx.pm:initialize(140)|vmware ESX module
initialized
2010-02-23
10:04:44|16801|1:4|image|State.pm:initialize(127)|VCL::Module::Provisioning::esx
module loaded
2010-02-23 10:04:44|16801|1:4|image|Module.pm:new(132)|constructor called,
class=VCL::Module::Provisioning::esx
2010-02-23
10:04:44|16801|1:4|image|Module.pm:new(154)|VCL::Module::Provisioning::esx
object created
2010-02-23 10:04:44|16801|1:4|image|esx.pm:initialize(138)|esx vmware
toolkit root path found: /usr/lib/vmware-viperl/apps
2010-02-23 10:04:44|16801|1:4|image|esx.pm:initialize(140)|vmware ESX module
initialized
2010-02-23
10:04:44|16801|1:4|image|State.pm:initialize(131)|VCL::Module::Provisioning::esx
provisioner object created
2010-02-23 10:04:44|16801|1:4|image|State.pm:initialize(145)|attempting to
load OS module: VCL::Module::OS::Windows::Version_6::Vista
2010-02-23
10:04:44|16801|1:4|image|State.pm:initialize(151)|VCL::Module::OS::Windows::Version_6::Vista
module loaded
2010-02-23 10:04:44|16801|1:4|image|Module.pm:new(132)|constructor called,
class=VCL::Module::OS::Windows::Version_6::Vista
2010-02-23
10:04:44|16801|1:4|image|Module.pm:new(154)|VCL::Module::OS::Windows::Version_6::Vista
object created
2010-02-23
10:04:44|16801|1:4|image|State.pm:initialize(154)|VCL::Module::OS::Windows::Version_6::Vista
OS object created
2010-02-23 10:04:44|16801|1:4|image|State.pm:initialize(169)|returning 1
2010-02-23 10:04:44|16801|1:4|image|vcld:make_new_child(591)|VCL::image
object created and initialized
2010-02-23 10:04:44|16801|1:4|image|utils.pm:mail(1348)|SUCCESS -- Sending
mail To: , VCL IMAGE Creation Started: vmwarewinvista-base7-v1
2010-02-23 10:04:44|16801|1:4|image|utils.pm:run_ssh_command(6180)|executing
SSH command on 128.164.136.154:
|16801|1:4|image| /usr/bin/ssh -i /etc/vcl/winxp_blade.key  -l root -p 22 -x
128.164.136.154 'ls -1 /vmfs/volumes/44c1b66e-aa8ab5d0/golden 2>&1' 2>&1

|16801|1:4|image| ---- WARNING ----
|16801|1:4|image| 2010-02-23
10:04:44|16801|1:4|image|utils.pm:run_ssh_command(6252)|attempt
1/3: failed to execute SSH command on 128.164.136.154: ls -1
/vmfs/volumes/44c1b66e-aa8ab5d0/golden 2>&1, exit status: 255, SSH exits
with the exit status of the remote command or with 255 if an error occurred,
output:
|16801|1:4|image| ssh output (ls -1 /vmf...): Vista-VCL
|16801|1:4|image| ssh output (ls -1 /vmf...): vmwarewinvista-base7-v1
|16801|1:4|image| ( 0) utils.pm, notify (line: 737)
|16801|1:4|image| (-1) utils.pm, run_ssh_command (line: 6252)
|16801|1:4|image| (-2) esx.pm, does_image_exist (line: 910)
|16801|1:4|image| (-3) image.pm, process (line: 135)
|16801|1:4|image| (-4) vcld, make_new_child (line: 594)
|16801|1:4|image| (-5) vcld, main (line: 341)

Re: failed to execute ssh command during capture

Posted by Ryan Johnson <rj...@gwmail.gwu.edu>.
Thanks for the reply, yes I tried running it from the command line and most
of the time it returned -1 and occasionally 0 as an exit status.  I ended up
just changing the path of the datastore column to the server which was
exporting the NFS.  The problem was with the status returned from running
commands on an ESXi server, I'm not sure if this was something intentional
by vmware.

On Tue, Mar 2, 2010 at 11:08 AM, Andy Kurth <an...@ncsu.edu> wrote:

> This is odd.  I thought SSH only returned 255 if an error occurred causing
> the command to fail entirely.
>
> The winxp_blade.key being used in the command is an artifact from some old
> code.  It's coming from the IDENTITY_* lines in /etc/vcl/vcld.conf.  The
> keys were originally specified in this file but are now stored in the
> database.  Change these lines to the path of the key you're using.  Also,
> check the "End Node SSH Identity Key Files" setting for your management node
> via the "Management Nodes" --> "Edit Management Node Information".  The
> database setting should match what's set in vcld.conf.
>
> The problem could be the incorrect key you noticed.  Try running the
> command from the management node with the correct key then check the exit
> status (assuming the key you created on the management node is
> /etc/vcl/vcl.key):
>
> /usr/bin/ssh -i /etc/vcl/vcl.key  -l root -p 22 -x 128.164.136.154 'ls -1
> /vmfs/volumes/44c1b66e-aa8ab5d0/golden 2>&1'
>
> echo $?
>
> If the exit status is 0 (output from 'echo $?') then the changes to
> vcld.conf should fix the problem.
>
> Hope this helps,
> Andy
>
>
> On 2/23/2010 10:12 AM, Ryan Johnson wrote:
>
>> I was trying to capture Vista image using the instructions for creating a
>> windows base image and got the error below.
>> Has anyone ever seen this before, usually there is some output which more
>> specifically highlights the problem, but not in this case.
>> I have gotten permission denied in the past, but I fixed that by adding
>> the
>> public keys of the management node and the vcl service and I am able to
>> ssh
>> from the command line into
>> the ESX server without having to enter a password.  Any help with this
>> would
>> be greatly appreciated.
>>
>> 2010-02-23 10:04:44|16801|1:4|image|esx.pm:initialize(140)|vmware ESX
>> module
>> initialized
>> 2010-02-23
>>
>> 10:04:44|16801|1:4|image|State.pm:initialize(127)|VCL::Module::Provisioning::esx
>> module loaded
>> 2010-02-23 10:04:44|16801|1:4|image|Module.pm:new(132)|constructor called,
>> class=VCL::Module::Provisioning::esx
>> 2010-02-23
>> 10:04:44|16801|1:4|image|Module.pm:new(154)|VCL::Module::Provisioning::esx
>> object created
>> 2010-02-23 10:04:44|16801|1:4|image|esx.pm:initialize(138)|esx vmware
>> toolkit root path found: /usr/lib/vmware-viperl/apps
>> 2010-02-23 10:04:44|16801|1:4|image|esx.pm:initialize(140)|vmware ESX
>> module
>> initialized
>> 2010-02-23
>>
>> 10:04:44|16801|1:4|image|State.pm:initialize(131)|VCL::Module::Provisioning::esx
>> provisioner object created
>> 2010-02-23 10:04:44|16801|1:4|image|State.pm:initialize(145)|attempting to
>> load OS module: VCL::Module::OS::Windows::Version_6::Vista
>> 2010-02-23
>>
>> 10:04:44|16801|1:4|image|State.pm:initialize(151)|VCL::Module::OS::Windows::Version_6::Vista
>> module loaded
>> 2010-02-23 10:04:44|16801|1:4|image|Module.pm:new(132)|constructor called,
>> class=VCL::Module::OS::Windows::Version_6::Vista
>> 2010-02-23
>>
>> 10:04:44|16801|1:4|image|Module.pm:new(154)|VCL::Module::OS::Windows::Version_6::Vista
>> object created
>> 2010-02-23
>>
>> 10:04:44|16801|1:4|image|State.pm:initialize(154)|VCL::Module::OS::Windows::Version_6::Vista
>> OS object created
>> 2010-02-23 10:04:44|16801|1:4|image|State.pm:initialize(169)|returning 1
>> 2010-02-23 10:04:44|16801|1:4|image|vcld:make_new_child(591)|VCL::image
>> object created and initialized
>> 2010-02-23 10:04:44|16801|1:4|image|utils.pm:mail(1348)|SUCCESS --
>> Sending
>> mail To: , VCL IMAGE Creation Started: vmwarewinvista-base7-v1
>> 2010-02-23 10:04:44|16801|1:4|image|utils.pm:
>> run_ssh_command(6180)|executing
>> SSH command on 128.164.136.154:
>> |16801|1:4|image| /usr/bin/ssh -i /etc/vcl/winxp_blade.key  -l root -p 22
>> -x
>> 128.164.136.154 'ls -1 /vmfs/volumes/44c1b66e-aa8ab5d0/golden 2>&1' 2>&1
>>
>> |16801|1:4|image| ---- WARNING ----
>> |16801|1:4|image| 2010-02-23
>> 10:04:44|16801|1:4|image|utils.pm:run_ssh_command(6252)|attempt
>> 1/3: failed to execute SSH command on 128.164.136.154: ls -1
>> /vmfs/volumes/44c1b66e-aa8ab5d0/golden 2>&1, exit status: 255, SSH exits
>> with the exit status of the remote command or with 255 if an error
>> occurred,
>> output:
>> |16801|1:4|image| ssh output (ls -1 /vmf...): Vista-VCL
>> |16801|1:4|image| ssh output (ls -1 /vmf...): vmwarewinvista-base7-v1
>> |16801|1:4|image| ( 0) utils.pm, notify (line: 737)
>> |16801|1:4|image| (-1) utils.pm, run_ssh_command (line: 6252)
>> |16801|1:4|image| (-2) esx.pm, does_image_exist (line: 910)
>> |16801|1:4|image| (-3) image.pm, process (line: 135)
>> |16801|1:4|image| (-4) vcld, make_new_child (line: 594)
>> |16801|1:4|image| (-5) vcld, main (line: 341)
>>
>>

Re: failed to execute ssh command during capture

Posted by Andy Kurth <an...@ncsu.edu>.
This is odd.  I thought SSH only returned 255 if an error occurred causing the 
command to fail entirely.

The winxp_blade.key being used in the command is an artifact from some old code. 
  It's coming from the IDENTITY_* lines in /etc/vcl/vcld.conf.  The keys were 
originally specified in this file but are now stored in the database.  Change 
these lines to the path of the key you're using.  Also, check the "End Node SSH 
Identity Key Files" setting for your management node via the "Management Nodes" 
--> "Edit Management Node Information".  The database setting should match 
what's set in vcld.conf.

The problem could be the incorrect key you noticed.  Try running the command 
from the management node with the correct key then check the exit status 
(assuming the key you created on the management node is /etc/vcl/vcl.key):

/usr/bin/ssh -i /etc/vcl/vcl.key  -l root -p 22 -x 128.164.136.154 'ls -1 
/vmfs/volumes/44c1b66e-aa8ab5d0/golden 2>&1'

echo $?

If the exit status is 0 (output from 'echo $?') then the changes to vcld.conf 
should fix the problem.

Hope this helps,
Andy

On 2/23/2010 10:12 AM, Ryan Johnson wrote:
> I was trying to capture Vista image using the instructions for creating a
> windows base image and got the error below.
> Has anyone ever seen this before, usually there is some output which more
> specifically highlights the problem, but not in this case.
> I have gotten permission denied in the past, but I fixed that by adding the
> public keys of the management node and the vcl service and I am able to ssh
> from the command line into
> the ESX server without having to enter a password.  Any help with this would
> be greatly appreciated.
>
> 2010-02-23 10:04:44|16801|1:4|image|esx.pm:initialize(140)|vmware ESX module
> initialized
> 2010-02-23
> 10:04:44|16801|1:4|image|State.pm:initialize(127)|VCL::Module::Provisioning::esx
> module loaded
> 2010-02-23 10:04:44|16801|1:4|image|Module.pm:new(132)|constructor called,
> class=VCL::Module::Provisioning::esx
> 2010-02-23
> 10:04:44|16801|1:4|image|Module.pm:new(154)|VCL::Module::Provisioning::esx
> object created
> 2010-02-23 10:04:44|16801|1:4|image|esx.pm:initialize(138)|esx vmware
> toolkit root path found: /usr/lib/vmware-viperl/apps
> 2010-02-23 10:04:44|16801|1:4|image|esx.pm:initialize(140)|vmware ESX module
> initialized
> 2010-02-23
> 10:04:44|16801|1:4|image|State.pm:initialize(131)|VCL::Module::Provisioning::esx
> provisioner object created
> 2010-02-23 10:04:44|16801|1:4|image|State.pm:initialize(145)|attempting to
> load OS module: VCL::Module::OS::Windows::Version_6::Vista
> 2010-02-23
> 10:04:44|16801|1:4|image|State.pm:initialize(151)|VCL::Module::OS::Windows::Version_6::Vista
> module loaded
> 2010-02-23 10:04:44|16801|1:4|image|Module.pm:new(132)|constructor called,
> class=VCL::Module::OS::Windows::Version_6::Vista
> 2010-02-23
> 10:04:44|16801|1:4|image|Module.pm:new(154)|VCL::Module::OS::Windows::Version_6::Vista
> object created
> 2010-02-23
> 10:04:44|16801|1:4|image|State.pm:initialize(154)|VCL::Module::OS::Windows::Version_6::Vista
> OS object created
> 2010-02-23 10:04:44|16801|1:4|image|State.pm:initialize(169)|returning 1
> 2010-02-23 10:04:44|16801|1:4|image|vcld:make_new_child(591)|VCL::image
> object created and initialized
> 2010-02-23 10:04:44|16801|1:4|image|utils.pm:mail(1348)|SUCCESS -- Sending
> mail To: , VCL IMAGE Creation Started: vmwarewinvista-base7-v1
> 2010-02-23 10:04:44|16801|1:4|image|utils.pm:run_ssh_command(6180)|executing
> SSH command on 128.164.136.154:
> |16801|1:4|image| /usr/bin/ssh -i /etc/vcl/winxp_blade.key  -l root -p 22 -x
> 128.164.136.154 'ls -1 /vmfs/volumes/44c1b66e-aa8ab5d0/golden 2>&1' 2>&1
>
> |16801|1:4|image| ---- WARNING ----
> |16801|1:4|image| 2010-02-23
> 10:04:44|16801|1:4|image|utils.pm:run_ssh_command(6252)|attempt
> 1/3: failed to execute SSH command on 128.164.136.154: ls -1
> /vmfs/volumes/44c1b66e-aa8ab5d0/golden 2>&1, exit status: 255, SSH exits
> with the exit status of the remote command or with 255 if an error occurred,
> output:
> |16801|1:4|image| ssh output (ls -1 /vmf...): Vista-VCL
> |16801|1:4|image| ssh output (ls -1 /vmf...): vmwarewinvista-base7-v1
> |16801|1:4|image| ( 0) utils.pm, notify (line: 737)
> |16801|1:4|image| (-1) utils.pm, run_ssh_command (line: 6252)
> |16801|1:4|image| (-2) esx.pm, does_image_exist (line: 910)
> |16801|1:4|image| (-3) image.pm, process (line: 135)
> |16801|1:4|image| (-4) vcld, make_new_child (line: 594)
> |16801|1:4|image| (-5) vcld, main (line: 341)
>

Re: failed to execute ssh command during capture

Posted by Ryan Johnson <rj...@gwmail.gwu.edu>.
I can't quite wrap my head around the above error.  The ssh command is
executed and returns the correct output of an ls command on the network
share and yet it still flashes a warning.  Has anyone seen this before?
 Also, I noticed that the command is using /etc/vcl/winxp_blade.key as the
identifier.  This file does not exist unless it is created when this script
executes, why would it try to use this file? In the output people have
posted, the vcl service executes ssh commands using the /etc/vcl.key as the
identifier.