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 / 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 / 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 / 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 / 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 / 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

Overview

This guide describes setting up a free, simple, lightweight openldap VM (512 ram, 0.5 cpu) to expose ldap/ldaps services. The VM also includes phpLDAPadmin for web based LDAP administration. The VM is provided as an OVA/ISO and can be downloaded from https://www.turnkeylinux.org/openldap

Getting started

  1. Download OVA and deploy
  2. Setup static IP
  3. (Optional) regenerate openldap certs with correct hostname/ip in SAN/CN
@ob1-sc
ob1-sc / win11-setup.ps1
Last active November 20, 2023 04:13
Windows 11 Setup Script
#Install WinGet
#Based on this gist: https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901
$hasPackageManager = Get-AppPackage -name 'Microsoft.DesktopAppInstaller'
if (!$hasPackageManager -or [version]$hasPackageManager.Version -lt [version]"1.10.0.0") {
"Installing winget Dependencies"
Add-AppxPackage -Path 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'
$releases_url = 'https://api.github.com/repos/microsoft/winget-cli/releases/latest'
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
@ob1-sc
ob1-sc / chrome-ignore-cert-warning.md
Created June 29, 2021 09:45
Ingnore certificate warning in Chrome

Click anywhere on page and type thisisunsafe

@ob1-sc
ob1-sc / speed-test-cli.md
Last active March 1, 2021 17:09
check bandwidth from cli
curl \
  https://github.com/gesquive/fast-cli/releases/download/v0.2.10/fast-cli-v0.2.10-linux-amd64.tar.gz \
  -Lo fast-cli-v0.2.10-linux-amd64.tar.gz
  
tar -xzf fast-cli-v0.2.10-linux-amd64.tar.gz

./fast-cli
@ob1-sc
ob1-sc / delete-files.md
Created January 6, 2021 14:21
Delete files older than x days
find /path/to/files -type f -mtime +7 -name '*.*' -print0 | xargs -r0 rm --