Skip to content

Instantly share code, notes, and snippets.

View hasusuf's full-sized avatar

Hassan Youssef hasusuf

View GitHub Profile
@hasusuf
hasusuf / vm-evacuate-flows.md
Last active October 7, 2026 15:58
VM Evacuate - Deferred Cleanup Flows (TSCP-8857)

VM Evacuate - Deferred Cleanup Flows

Terminology

Term Meaning
Destroy vCenter Destroy_Task API - deletes VM + files. Requires host communication.
UnregisterVM vCenter API - removes VM from inventory. Files remain on datastore.
EvacuateVM Our flow - offboard VM from TCP when host is unavailable, track cleanup for later. Covers both Unregistered and Abandoned outcomes.
Abandoned Neither Destroy nor Unregister succeeded. VM + files remain on host.
@hasusuf
hasusuf / install-megacli.md
Created October 8, 2024 09:05 — forked from metajiji/install-megacli.md
Install LSI MegaCli

download

wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip

or

curl -LO https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip
@hasusuf
hasusuf / 01_extract_crt.rb
Created June 26, 2018 15:15 — forked from miry/01_extract_crt.rb
Extract certificate from the kubernetes config.
require 'optparse'
require 'yaml'
require 'base64'
options = {
config_path: File.join(ENV['HOME'], '.kube', 'config'),
write_dir: File.join(ENV['HOME'], '.kube')
}
OptionParser.new do |opts|
@hasusuf
hasusuf / extract_kubecfg_cert.sh
Created June 26, 2018 15:15 — forked from xueshanf/extract_kubecfg_cert.sh
Extract kubernetes cluster credentials from kubecfg
#!/bin/bash
# Input: ./extract_kubecfg_cert.sh my-cluster-name username
# Output: ./my-cluster-name-ca.crt ./username.crt ./username.key
# Exit on error
abort(){
echo $1 && exit 1
}
# Prerequistes