Thanks Dan,

The issue appears to be related to the public and private interfaces
being swapped. In the current release (and older ones) the dependency
is to have the private network on eth0 and public on eth1, we've tried
to fix this, but I see a bug in the Linux.pm module.  The future
release will not have this dependency, as it is not as flexible.

To trace this from the log you sent, ssh connections stop after
/etc/rc.local is created and run.
On lines 1164-1189, the image capture process generates a new
/etc/rc.local file.

In vcl/lib/VCL/Module/OS/Linux.pm starting on line 2031 in
generate_rc_local  routine. We are not correctly figuring out which is
the private/public interface. We are hard coding eth0 as private and
eth1 as public.

A few options to fix this are to either, (until the next release):
a)swap your networks in your esx hypervisor for public and private,
such that private is on eth0 and public is on eth1.

or

b) If using vcl 2.3.1 or 2.3.2 to edit Linux.pm lines 2090 and 2091,
swap eth0 and eth1
2090   push(@array2print, 'IP0=$(ifconfig eth0 | grep inet | awk
\'{print $2}\' | awk -F: \'{print $2}\')' . "\n");
2091   push(@array2print, 'IP1=$(ifconfig eth1 | grep inet | awk
\'{print $2}\' | awk -F: \'{print $2}\')' . "\n");
to
2090   push(@array2print, 'IP0=$(ifconfig eth1 | grep inet | awk
\'{print $2}\' | awk -F: \'{print $2}\')' . "\n");
2091    push(@array2print, 'IP1=$(ifconfig eth0 | grep inet | awk
\'{print $2}\' | awk -F: \'{print $2}\')' . "\n");

or

c) update the node's rc.local your capturing to simliar fix above and
add rc.local to the /root/.vclcontrol/vcl_exclude_list (this is done
on the target node. You can run this on the target node.
echo "/etc/rc.local" >>  /root/.vclcontrol/vcl_exclude_list

During the image creation process, vcld will not modify any files it
finds in /root/.vclcontrol/vcl_exclude_list.

Hope this helps.
Aaron



On Tue, May 21, 2013 at 2:38 PM, Dan Huynh <[email protected]> wrote:
> Thank you Aaron.
> I attached a part of vcl log that show SSH denied error.
>
>
>
> On Tue, May 21, 2013 at 11:23 AM, Aaron Peeler <[email protected]>
> wrote:
>>
>> Hi Dan,
>>
>> Can you provide the log output of up to where the ssh connections stop
>> working? Or maybe the full log output of a imaging reservation?
>>
>> Thanks,
>> Aaron
>>
>> On Fri, May 17, 2013 at 4:05 PM, Dan Huynh <[email protected]>
>> wrote:
>> > Hi,
>> >
>> > Im creating a base Unix image (RHEL).
>> >
>> > Just few weeks ago, I was able to create 2 RHEL 6 Images successfully.
>> >
>> > Lately, when I try to create the images, I always get the error of SSH
>> > permission denied.
>> >
>> >  In fact, during the creation, VCL was able to connect to the base
>> > virtual
>> > machine, then VCL executes a lot of commands and changes, and finally,
>> > it
>> > got stuck at SSH permission denied.
>> >
>> > Please help. What could be the reason for this?
>> >
>> > Thanks-
>> >
>> > Dan Huynh
>> >
>> >
>> > RECENT LOG ENTRIES FOR THIS PROCESS:
>> >
>> > |462|24:24|image| 2013-05-17
>> > 15:56:19|462|24:24|image|utils.pm:run_ssh_command(5010)|attempt 2/3:
>> > failed
>> > to execute SSH command on base-rhel6x64: 'ls -d --color=never
>> > "/etc/sysconfig/network-scripts" 2>&1 || mkdir -p
>> > "/etc/sysconfig/network-scripts" 2>&1 && ls -d --color=never
>> > "/etc/sysconfig/network-scripts"', exit status: 255, SSH exits with the
>> > exit
>> > status of the remote command or with 255 if an error occurred, output:
>> >
>> > |462|24:24|image| ssh output (ls -d --co...): Permission denied, please
>> > try
>> > again.
>> >
>> > |462|24:24|image| ssh output (ls -d --co...): Permission denied, please
>> > try
>> > again.
>> >
>> > |462|24:24|image| ssh output (ls -d --co...): Permission denied
>> > (publickey,gssapi-keyex,gssapi-with-mic,password).
>> >
>> > |462|24:24|image| ( 0) utils.pm, run_ssh_command (line: 5010)
>> >
>> > |462|24:24|image| (-1) OS.pm, execute (line: 1992) 24:24|image| (-2)
>> >
>> > |462|Linux.pm, create_directory (line: 1559) 24:24|image| (-3) OS.pm,
>> >
>> > |462|create_text_file (line: 1803) 24:24|image| (-4) Linux.pm,
>> >
>> > |462|enable_dhcp (line: 3108) 24:24|image| (-5) Linux.pm, pre_capture
>> >
>> > |462|(line: 191)
>> >
>> > 2013-05-17
>> > 15:56:19|462|24:24|image|utils.pm:run_ssh_command(4894)|sleeping
>> > for 4 seconds before making next SSH attempt
>> >
>> > 2013-05-17
>> > 15:56:23|462|24:24|image|utils.pm:run_ssh_command(4906)|attempt
>> > 3/3: executing SSH command on base-rhel6x64:
>> >
>> > |462|24:24|image| /usr/bin/ssh -i /etc/vcl/vcl.key  -o
>> >
>> > |462|StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o
>> >
>> > |462|ConnectionAttempts=1 -o ConnectTimeout=3 -l root -p 22 -x
>> > base-rhel6x64
>> > 'ls -d --color=never "/etc/sysconfig/network-scripts" 2>&1 || mkdir -p
>> > "/etc/sysconfig/network-scripts" 2>&1 && ls -d --color=never
>> > "/etc/sysconfig/network-scripts"' 2>&1 24:24|image| ---- WARNING ----
>> > 24:24|image| 2013-05-17
>> > 15:56:23|462|24:24|image|utils.pm:run_ssh_command(5010)|attempt 3/3:
>> > failed
>> > to execute SSH command on base-rhel6x64: 'ls -d --color=never
>> > "/etc/sysconfig/network-scripts" 2>&1 || mkdir -p
>> > "/etc/sysconfig/network-scripts" 2>&1 && ls -d --color=never
>> > "/etc/sysconfig/network-scripts"', exit status: 255, SSH exits with the
>> > exit
>> > status of the remote command or with 255 if an error occurred, output:
>> >
>> > |462|24:24|image| ssh output (ls -d --co...): Permission denied, please
>> > try
>> > again.
>> >
>> > |462|24:24|image| ssh output (ls -d --co...): Permission denied, please
>> > try
>> > again.
>> >
>> > |462|24:24|image| ssh output (ls -d --co...): Permission denied
>> > (publickey,gssapi-keyex,gssapi-with-mic,password).
>> >
>> > |462|24:24|image| ( 0) utils.pm, run_ssh_command (line: 5010)
>> >
>> > |462|24:24|image| (-1) OS.pm, execute (line: 1992) 24:24|image| (-2)
>> >
>> > |462|Linux.pm, create_directory (line: 1559) 24:24|image| (-3) OS.pm,
>> >
>> > |462|create_text_file (line: 1803) 24:24|image| (-4) Linux.pm,
>> >
>> > |462|enable_dhcp (line: 3108) 24:24|image| (-5) Linux.pm, pre_capture
>> >
>> > |462|(line: 191) 24:24|image| ---- WARNING ---- 24:24|image| 2013-05-17
>> >
>> > |462|15:56:23|462|24:24|image|utils.pm:run_ssh_command(5043)|failed to
>> > run
>> > SSH command after 3 attempts, command: /usr/bin/ssh -i /etc/vcl/vcl.key
>> > -o
>> > StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o
>> > ConnectionAttempts=1 -o ConnectTimeout=3 -l root -p 22 -x base-rhel6x64
>> > 'ls
>> > -d --color=never "/etc/sysconfig/network-scripts" 2>&1 || mkdir -p
>> > "/etc/sysconfig/network-scripts" 2>&1 && ls -d --color=never
>> > "/etc/sysconfig/network-scripts"' 2>&1, exit status: 255, output:
>> >
>> > |462|24:24|image| ssh output (ls -d --co...): Permission denied, please
>> > try
>> > again.
>> >
>> > |462|24:24|image| ssh output (ls -d --co...): Permission denied, please
>> > try
>> > again.
>>
>>
>>
>> --
>> Aaron Peeler
>> Program Manager
>> Virtual Computing Lab
>> NC State University
>>
>> All electronic mail messages in connection with State business which
>> are sent to or received by this account are subject to the NC Public
>> Records Law and may be disclosed to third parties.
>
>
>
>
> --
> Dan Huynh
>
> Cary, NC 27513



-- 
Aaron Peeler
Program Manager
Virtual Computing Lab
NC State University

All electronic mail messages in connection with State business which
are sent to or received by this account are subject to the NC Public
Records Law and may be disclosed to third parties.

Reply via email to