Showing posts with label esxi. Show all posts
Showing posts with label esxi. Show all posts

Tuesday, August 18, 2015

vMA 6.0 esxcli thumbprint

By now everyone should be upgraded to the vMA 6.0 and you've got your ESXi hosts linked in through vifastpass. But now you get those stupid thumbprint error messages ala KB2108416.

Do not fear, the fix is simple ish.
  • gather together your esxi thumbprints. There's probably a one-liner that could do this, I found this 2012 virtuallyghetto link that'll hook it together: lamw saves the day again
  • ~> cd /usr/lib/vmware-vcli/apps/general
  • ~> ./credstore_admin.pl add --server <server name in vifp> --thumbprint <thumbprint>
Now,  something interesting happened after the first time I ran this command. The default credstore is /home/vi-admin/.vmware/credstore/vmacredentials.xml and I thought that there would be a new line in the xml with the thumbprint but there wasn't.. a new file is created in that directory called vicredentials.xml (version 1.1 vs version 1.0 in vmacredentials.xml) and has the host you just ran the credstore_admin script in <thumbprintEntry>.

So your next step can be to run credstore_admin.pl against all the ESXi hosts you have OR you can manually edit the vicredentials.xml file with all the info. Your choice. Use William's option 3 to gather the thumbprints and just add the credstore command to the for loop. Easy peasy.

If I was really smart I'd update /opt/vmware/vma/samples/perl/bulkAddServers.pl to get the thumbprint. Looks like it doesn't enter it...

Thursday, December 13, 2012

ESXi 3.5 build 207095 to 5.0 current build steps

A client has the free version of ESXi 3.5 using local storage and wanted to move up to a current version of ESXi. I wasn't able to find a one-stop shop that said how to get from A -> E and for a while there I thought I could at least skip 4.0...nope. If you're not using local storage, please do yourself a favor and just do a fresh install.

It's possible that there's a slightly more efficient way to do this, but this was the way I was guaranteed not to loose the local datastore data. vmware.com was giving me some grief when I was trying to finish this post so I don't have links up to some of the packages. You should be able to search around and find them.

Things you'll need:
- vMA (current version is fine)
- vSphere Client 4.0 with Host Update Utility (here VMware-viclient-all-4.0.0-208111.exe)
- vSphere 4.0 update 1 upgrade package (here ESXi-4.0.0-1.9.208167-upgrade-release.zip)
- vSphere 4.0 to 4.1 upgrade package (here upgrade-from-esxi4.0-to-4.1-update03-800380.zip)
- vSphere 5.0 iso (standard one here VMware-VMvisor-Installer-5.0.0.update02-914586.x86_64.iso)
- vSphere 5.0 current build (here) if needed

Things you might want:
- vSphere 4.0 upgrade guide (here)
- vSphere 4.1 upgrade guide (here)

Ready?
- SCP the 4.1 patch to your vMA
- SCP the 5.0 patch to the ESXi datastore * 
- Login to vMA
- Make a backup copy of your host config via vMA
vicfg-cfgbackup --server <ESXi-host-ip> --portnumber <port_number> --protocol
<protocol_type> --username username --password <password> -s <backup-filename>
- Check that there's a scratch partition setup on your host via vMA
vicfg-advcfg --server <ESXi-host-ip> --username root -g ScratchConfig.ConfiguredScratchLocation
if not found:
vifs --server <ESXi-host-ip> --username root --mkdir "[datastore1] .locker-esxtest"
vicfg-advcfg --server <> --username root -s /vmfs/volumes/datastore1/.locker-esxtest ScratchConfig.ConfiguredScratchLocation
- Shutdown VMs and put into maintenance mode
vicfg-hostops --server <ESXi-host-ip> --operation enter
- Start up the Host Update Utility, add your host and patch with the 4.0u1 upgrade package.
-- Yeah. 4.0u1. Not current version of 4.0, that gave back an error that it wasn't compatible.
- Wait a bit. I'm not sure what files are created when, but there was a directory called /vmupgrade that was created and then deleted while the HUU stayed at 3%
- One or two reboots. My test ESXi system rebooted at 3% and 34%, prod ESXi only did the reboot at 34%.
- ESXi reboots to 4.0, HUU eventually will say that the upgrade failed when installing packages after the initial base reboot. Do not fret...keep moving.
- You can login via the vSphere Client & test that everything still looks good.
- Log into vMA and run vihostupdate with the 4.1 upgrade against the host.
 vihostupdate --server <ESXi-host-ip> -i -b <zip bundle>
- Reboot again.
- Test again after starting up into 4.1.
- Reboot system and boot to the 5.0 CD.
- The installer will see your current install and happily upgrade.
- And another reboot. I hope your server doesn't have too much memory that it's set to check upon each reboot..
- Back to vMA and run the esxcli command to patch
esxcli software profile update -d <depot url or offline bundle zip file> -p <profile_name>
- Reboot
- Yes, you are done. Luckily, ESXi patches are cumulative so once you're at a major revision you only need to grab the most recent patch.


* If, like me, you've drawn a blank on how to get ssh enabled on ESXi 3.5:
From console: 
- Alt-F1 unsupported
- enter root pw
- vi /etc/inetd.conf -> unhash #ssh
- ps | grep inetd
- kill -HUP <processID>

Wednesday, January 12, 2011

ESXi log file location

Damned if I had a brain freeze today and couldn't remember the url path where ESXi has it's log files:
https://hostname/host


There.