Re: Creating a base image
[root@VCL-Server Desktop]# perl CatPerlTest.pl OK: executed command: cat /etc/hosts, pid: 19185, exit status: 0, output: 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 192.168.0.101 1vsphere.upb.pitt.edu 1vsphere 192.168.0.102 2vsphere.upb.pitt.edu 2vsphere 192.168.0.103 3vsphere.upb.pitt.edu 3vsphere 192.168.0.104 4vsphere.upb.pitt.edu 4vsphere 192.168.0.105 5vsphere.upb.pitt.edu 5vsphere 192.168.0.106 6vsphere.upb.pitt.edu 6vsphere 192.168.0.107 7vsphere.upb.pitt.edu 7vsphere 192.168.0.108 8vsphere.upb.pitt.edu 8vsphere 192.168.0.109 9vsphere.upb.pitt.edu 9vsphere 192.168.0.110 10vsphere.upb.pitt.edu 10vsphere 192.168.0.3vsphere.upb.pitt.edu vsphere 192.168.0.2vcl-server.upb.pitt.edu vcl-server ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 Aaron I just looked at the peace of code which generates the error. There is really nothing unusual: # Retrieve the contents of /etc/hosts using cat my ($exit_status, $output) = run_command('cat /etc/hosts', 1); if (defined $exit_status $exit_status == 0) { notify($ERRORS{'DEBUG'}, 0, retrieved contents of /etc/hosts on this management node, contains . scalar @$output . lines); } elsif (defined $exit_status) { notify($ERRORS{'WARNING'}, 0, failed to cat /etc/hosts on this management node, exit status: $exit_status, output:\n . join(\n, @$output)); return; } else { notify($ERRORS{'WARNING'}, 0, failed to run command to cat /etc/hosts on this management node); return; } Could you please save following code as a hosts-test.pl file and execute it (perl hosts-test.pl). I got this code from utils.pm's run_command funtion. This what generates exit_code 255 in your case. What output do you get? #!/usr/bin/perl $command = 'cat /etc/hosts'; if ($pid = open(COMMAND, $command 21 |)) { # Capture the output of the command @output = COMMAND; # Save the exit status $exit_status = $? 8; if ($? == -1) { print(Error: \$? is set to $?, setting exit status to 0, Perl bug likely encountered); $exit_status = 0; } # Close the command handle close(COMMAND); } else { print(Error: failed to execute command: $command, error: $!); exit 0; } print(\nOK: executed command: $command, pid: $pid, exit status: $exit_status, output:\n\n@output); Thanks. On Mar 16, 2012, at 13:13 , Aaron Bryant wrote: After seeing your suggestion, I have done the following changes to no avail: - Disabled Selinux - Changed the syntax of the hosts file from IP Address - Alias - Hostname, to IP Address - Hostname - Alias (Just to make sure this wasn't causing a problem) I can't seem to find any problems with permissions. I also could not find any valid reason for the cat to fail, although directly after it fails, it prints the output of the cat command in the log file. The problem is still occurring even after the simple changes I have made. Any additional suggestions? On 2/28/2012 4:21 PM, Dmitri Chebotarov wrote: Aaron The problem seems to be with your /etc/hosts file. 'cat /etc/hosts' failed with exit status 255, when exit status 0 is expected. B/c of this, vcl couldn't get private ip address and didn't attempt to connect to the host. I cannot think of any valid reasons why 'cat /etc/hosts' would fail... Can you double-check syntax, permission, selinux, ... ? ... |10951|20:20|image| WARNING |10951|20:20|image| 2012-02-28 13:32:34|10951|20:20|image|DataStructure.pm:get_computer_private_ip_address(1589)|failed to cat /etc/hosts on this management node, exit status: 255, output: |10951|20:20|image| 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 |10951|20:20|image| 192.168.0.101 1vsphere 1vsphere.upb.pitt.edu ... On Feb 28, 2012, at 13:28 , Aaron Bryant wrote: Greetings, I completed installing Cygwin SSHD and I'm attempting to run the vcld -setup command. My problem occurs in this step while creating a base image. I am able to get through all of the prompts and start the creation before the script crashes. I have checked the '/var/log/vcld.log' log file and this is a portion of the output: --- VCL::Module::Provisioning::VMware::vSphere_SDK |10951|20:20|image| WARNING |10951|20:20|image| 2012-02-28 13:32:34|10951|20:20|image|VMware.pm:initialize(273)|no methods are available to control VM host vsphere, the vSphere SDK cannot be used to control the VM host and the host OS cannot be controlled via SSH |10951|20:20|image| ( 0) VMware.pm, initialize (line: 273)
Re: Creating a base image
Yes, I have had no problems using SSH between the management node and the VMWare host. On 3/16/2012 1:39 PM, Mike Haudenschild wrote: Hi Aaron, The first thing I notice in the log output is this: 13:32:34|10951|20:20|image|VMware.pm:initialize(273)|no methods are available to control VM host vsphere, the vSphere SDK cannot be used to control the VM host and the host OS cannot be controlled via SSH Are you able to SSH from the management node to the VMWare host? ssh -i /etc/vcl/vcl.key VM host Regards, Mike Sent via iPhone
Re: Creating a base image
Hi Aaron, Do you recall if install_perl_libs.pl complained about any missing modules when you installed the management node code? I'm not sure if this applies to your situation, but in all of my VCL 2.2.1 installs I've had to make some adjustments to get all the needed PERL modules installed properly. (I was on CentOS 5.7.) You're not using the vSphere SDK, right? Do you have a username/password entered in the fields on the VM Host Profile configuration page? Regards, Mike -- *Mike Haudenschild* Education Systems Manager Longsight Group (740) 599-5005 x809 m...@longsight.com www.longsight.com On Tue, Mar 20, 2012 at 13:47, Aaron Bryant amb...@pitt.edu wrote: Yes, I have had no problems using SSH between the management node and the VMWare host. On 3/16/2012 1:39 PM, Mike Haudenschild wrote: Hi Aaron, The first thing I notice in the log output is this: 13:32:34|10951|20:20|image|VMware.pm:initialize(273)|no methods are available to control VM host vsphere, the vSphere SDK cannot be used to control the VM host and the host OS cannot be controlled via SSH Are you able to SSH from the management node to the VMWare host? ssh -i /etc/vcl/vcl.key VM host Regards, Mike Sent via iPhone
Re: Creating a base image
Up to this point, I have been following the documentation exactly, so I have configured the machine to use SSH and I have configured the VMhost using the second link below. Since your suggestion, I am attempting to work with the vsphere SDK. I am having trouble with some of the dependencies getting installed, but I feel that they will be finished soon. Is there any documentation on incorporating the VSphere SDK into the VCL Server? Aaron Bryant On 3/16/2012 3:02 PM, Aaron Coburn wrote: Given that your VMhost is called vsphere, is it safe to assume that you plan to use the vSphere API to access the host? If that is the case, you need to make sure that the vSphere SDK for perl is installed. According to your logfile, the perl libraries are either not installed or not in perl's path (i.e. @INC). If you intend to use the perl SDK, you can install it from here: http://www.vmware.com/support/developer/viperltoolkit/ (be sure to select the release corresponding to your VMware version) If you are not going to use the vSphere API, then make sure to read through this page as you configure your VMhost: https://cwiki.apache.org/confluence/display/VCL/VMware+Configuration Aaron -- Aaron Coburn Systems Administrator and Programmer Academic Technology Services, Amherst College (413) 542-5451 acob...@amherst.edu On Mar 16, 2012, at 1:13 PM, Aaron Bryant wrote: After seeing your suggestion, I have done the following changes to no avail: - Disabled Selinux - Changed the syntax of the hosts file from IP Address - Alias - Hostname, to IP Address - Hostname - Alias (Just to make sure this wasn't causing a problem) I can't seem to find any problems with permissions. I also could not find any valid reason for the cat to fail, although directly after it fails, it prints the output of the cat command in the log file. The problem is still occurring even after the simple changes I have made. Any additional suggestions? On 2/28/2012 4:21 PM, Dmitri Chebotarov wrote: Aaron The problem seems to be with your /etc/hosts file. 'cat /etc/hosts' failed with exit status 255, when exit status 0 is expected. B/c of this, vcl couldn't get private ip address and didn't attempt to connect to the host. I cannot think of any valid reasons why 'cat /etc/hosts' would fail... Can you double-check syntax, permission, selinux, ... ? ... |10951|20:20|image| WARNING |10951|20:20|image| 2012-02-28 13:32:34|10951|20:20|image|DataStructure.pm:get_computer_private_ip_address(1589)|failed to cat /etc/hosts on this management node, exit status: 255, output: |10951|20:20|image| 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 |10951|20:20|image| 192.168.0.101 1vsphere 1vsphere.upb.pitt.edu ... On Feb 28, 2012, at 13:28 , Aaron Bryant wrote: Greetings, I completed installing Cygwin SSHD and I'm attempting to run the vcld -setup command. My problem occurs in this step while creating a base image. I am able to get through all of the prompts and start the creation before the script crashes. I have checked the '/var/log/vcld.log' log file and this is a portion of the output: --- VCL::Module::Provisioning::VMware::vSphere_SDK |10951|20:20|image| WARNING |10951|20:20|image| 2012-02-28 13:32:34|10951|20:20|image|VMware.pm:initialize(273)|no methods are available to control VM host vsphere, the vSphere SDK cannot be used to control the VM host and the host OS cannot be controlled via SSH |10951|20:20|image| ( 0) VMware.pm, initialize (line: 273) |10951|20:20|image| (-1) Module.pm, new (line: 207) |10951|20:20|image| (-2) Module.pm, create_provisioning_object (line: 423) |10951|20:20|image| (-3) State.pm, initialize (line: 117) |10951| 20:20|image| (-4) Module.pm, new (line: 207) |10951|20:20|image| (-5) vcld, make_new_child (line: 564) |10951|20:20| image| WARNING |10951|20:20|image| 2012-02-28 13:32:34|10951|20:20|image| Module.pm:create_provisioning_object(431)|provisioning object could not be created, returning 0 |10951|20:20|image| ( 0) Module.pm, create_provisioning_object (line: 431) |10951|20:20|image| (-1) State.pm, initialize (line: 117) | 10951|20:20|image| (-2) Module.pm, new (line: 207) |10951|20:20|image| (-3) vcld, make_new_child (line: 564) |10951| - I have checked and am able to ssh between the management node and the virtual machines using key authentication. Please see the log file attached for more information. Thanks, Aaron Bryant Logfile.txt Thank you. - Dmitri Chebotarov dcheb...@gmu.edu 703-993-6175 - Logfile.txt
addUserFunc in conf.php for Shibboleth
Afternoon -- I have Shib set up and working on an existing VCL installation, but in reviewing my conf.php I ran across this at the bottom of the file: # any affiliation that is shibboleth authenticated without a corresponding # LDAP server needs an entry in addUserFunc # $addUserFunc[affiliationid goes here] = create_function('', 'return 0;'); Currently, I don't have this configured. Everything *seems* to be working -- VCL is adding Shib users to the database, creating groups, etc. etc. The only strange issue I had was the Shib affiliation ID in the database didn't get set to the value I had specified in conf.php when the first Shib user logged-in. Am I setting myself up for disappointment? Regards, Mike -- *Mike Haudenschild* Education Systems Manager Longsight Group (740) 599-5005 x809 m...@longsight.com www.longsight.com