Wednesday, May 24, 2017

How to log all PuTTY sessions

Here's a quick tip on how to set up logging in PuTTY.  It's great for reviewing the changes made and for documentation purposes. 

1. Launch PuTTY and go to Logging.  I personally select All Session Output and also like to specify the Host, Month, Date, Year and Time of each log.  It makes the management of the logs easier.

ex.   E:\PuTTYLogs\&H_&M&D&Y_&T.log



2.  Now go up to Session, select Default Settings and click Save.

3. Test - SSH into a host and confirm a log files has been automatically created.



vCenter 6.5 upgrade: A problem occurred while - Starting VMware vCenter Server...

After an initial failed attempt at migrating a Windows based vCenter 5.5 to vCSA 6.5, I received the following error during the subsequent retry:

A problem occurred while - Starting VMware vCenter Server


The \var\log\firstboot\vpxd_firstboot.ph_xxxxx_stdout.log within the vm-support bundle revealed that a service was already registered in component manager.  

This was  due to a previously failed upgrade attempt:


Make note of the id number in red in the example above.  Launch JXplorer and connect to your PSC.  Details regarding JXplorer can be found here:

http://kenumemoto.blogspot.com/search?q=Jxplorer

Drill down to the following location.  Select the offending service and view the details.  As you can see,  it's incorrectly showing as Version 6.5.


Right-Click on the offending service, then click Delete.   Now restart the upgrade\migration process.

How To Find Your vCSA Embedded Database Password

To perform an export of your vCSA VCDB you need to supply the user and password to the PostgreSQL Database.  During the vCSA setup process, we were not prompted to provide one and there is no default password for the VCDB.

Fortunately, there is an easy way to access the password.  (It's actually FRIGHTENINGLY easy....).  Run the following command on your vCSA:

cat /etc/vmware-vpx/vcdb.properties

This will provide the VCDB password along with other details about your VCDB.

WinSCP and vCSA - Host is not communicating for more than 15 seconds. Still waiting...

I recently needed to pull a backup of the VCDB off a vSphere 6.5 vCSA.  I started WinSCP and received the following error:


To resolve this issue, SSH into your vCSA and run the following command to change the user's login shell to BASH:

chsh -s /bin/bash root

You will now be able to successfully connect to the vCSA.

To reverse the change run the following:

chsh -s /bin/appliancesh root