Monday 16 November 2015

VMware vMA thumbprint error

Yesterday I installed the version 6.0 of the vmware vMA.
While trying to use remote hosts as vifptarget for remote access, I kept getting thumbprint error
such as theses:

“Unable to verify the authenticity of the specified host. The SHA1 thumbprint of the cerificate is:
XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
Do you wish to proceed with connecting anyway? Choose “Yes” if you trust the host. The above information will be remembered until the host is removed from the inventory. Choose “No” to abort connecting to the host at this time.”


I am going to describe the process I used to automate (as much as possible), how I added all my hosts thumbprints to vMA credential store.

  1. First, open PowerCLI and list your hosts
    1. Get-VMHost | Get-View | Format-Table -Property Name, Name
  2. Now, add theses in a file named "esxcli" in VMA:
    1. while read LINE; do vifp addserver $LINE --username root --password **root_password** ;done<esxi
  3.  Now, retrieve each SHA1 thumbprint, from every host, output this in a file called "out" (yes, I am quite original when it comes to file naming):
    1. while read SERVER; do  echo -n ${SERVER}, && echo -n | openssl s_client -connect ${SERVER}:443 2>/dev/null | openssl x509 -noout -fingerprint -sha1 | awk -F= '{print $2}';done<esxi >out
  4. Now paste this script in a file of your choice, run chmod +x on it, and run it:
    1. #!/bin/sh

      while read SERVER; do
              STR1=$(echo $SERVER | awk -F, '{print $1}')
              STR2=$(echo $SERVER | awk -F, '{print $2}')
              /usr/lib/vmware-vcli/apps/general/credstore_admin.pl add -s $STR1 -T $STR2
      done<out

And you are done ! I hope it help.

Tuesday 19 May 2015

Avamar VMware stuck snapshots

  1. Log in as admin to the utility node
  2.  Disable the firewall
    • /usr/local/avamar/lib/admin/security/avfirewall stop
  3. Download proxycp.jar

Using proxycp.jar

To see a list of commands, run the following from the Avamar Utility Node:            
java -jar proxycp.jar


To view VM’s with hidden Snapshot Files, run this command:
java -jar proxycp.jar –listsnapshots 2>/dev/null | grep Snapshot

To remove original disk from the proxy that they were still mounted to, use this command.
java -jar proxycp.jar –listproxydisk –cleanup

Next clean up Avamar only snapshots with this command if any are present
java -jar proxycp.jar –listsnapshots –cleanup

Using the above list you may proceed using the command below to attempt to consolidate the vm’s that are failing.  Warning, proceed with caution.
java -jar proxycp.jar –consolidatesnapshots –vm REPLACEWITHVMNAME



** Thank you Hugh Griffin for the above content. I'm only duplicating content in case EMC decide it is too dangerous for our frail little hands. **