Skip to content

Instantly share code, notes, and snippets.

View ob1-sc's full-sized avatar

Simon O'Brien ob1-sc

  • VMware
  • United Kingdom
View GitHub Profile
@ob1-sc
ob1-sc / vcenter_certs
Created August 6, 2023 12:44
Reset vCenter Certs
login to vCenter via SSH as root
/usr/lib/vmware-vmca/bin/certificate-manager
Option 8
@ob1-sc
ob1-sc / vcenter_sso_pwd
Created August 6, 2023 12:45
Reset vCenter SSO password
Login to vCenter via ssh
/usr/lib/vmware-vmdir/bin/vdcadmintool
Option 3
Enter username to reset (including domain)
@ob1-sc
ob1-sc / cp-change-owner
Created February 14, 2024 12:03
Copy file and change ownership
rsync \
--remove-source-files \
--chown=wanteduser:wantedgroup \
/home/oldfolder /home/newfolder
@ob1-sc
ob1-sc / zsh-profile.md
Created August 1, 2024 07:47
Make zsh respect ~/.profile

The easiest solution to both work with zsh and run ~/.profile is to create a ~/.zprofile that enters sh emulation mode while it runs ~/.profile:

emulate sh
. ~/.profile
emulate zsh

If you have a recent enough zsh (on Ubuntu, that means since lucid, I think), you can simplify this to emulate sh -c '. ~/.profile'

@ob1-sc
ob1-sc / esxi-host-upgrade.md
Last active October 26, 2024 23:16
How to upgrade single esxi host
  1. Check current ESXI version and build numbers - ESXI Host > Help > About
  2. Chose newer version and build number from: https://knowledge.broadcom.com/external/article/316595/build-numbers-and-versions-of-vmware-esx.html
  3. Download 'depot.zip' from Broadcom portal > VCF > VMware vSphere > Solutions > Standard > 8.0 > SEARCH FOR NEWER BUILD NUMBER FROM PREVIOUS STEP and follow the download link
  4. Upload depot.zip to /vmfs/volumes/ds_standard/esxi-updates/
  5. Shutdown VMs on host and place into maintenance mode.
  6. Enable SSH > right click on host > services > enable ssh
  7. SSH to host<
  8. Pick profile to use (matching newer build number) for update: esxcli software sources profile list -d /vmfs/volumes/ds_standard/esxi-updates/<depot.zip>
  9. Run upgrade: esxcli software profile update -d /vmfs/volumes/ds_standard/esxi-updates/<depot.zip> -p
  10. reboot
@ob1-sc
ob1-sc / om-install.md
Last active March 31, 2025 11:12
download and install om cli

set om release url and install path

export OM_RELEASE=https://github.com/pivotal-cf/om/releases/download/7.15.0/om-linux-amd64-7.15.0
export OM_INSTALL_LOCATION=$HOME/.local/bin

install with curl

curl -o om -L $OM_RELEASE && chmod +x om && mv om $OM_INSTALL_LOCATION