Skip to content

Instantly share code, notes, and snippets.

View ericgray's full-sized avatar

Eric Gray ericgray

View GitHub Profile
@ericgray
ericgray / gcloud-iam-gcve.sh
Last active January 11, 2023 00:04
Shell script to demonstrate Google Cloud VMware Engine IAM role, service account, and Compute Engine instance. See https://vmc.techzone.vmware.com/add-google-cloud-vmware-engine-iam-role-authenticate-compute-engine-gcloud-cli
#!/usr/bin/env bash
# 10Jan2023 - Eric Gray
# Simple script to quickly create a GCE instance with IAM role for GCVE
SVC_ACCT_NAME=${SVC_ACCT_NAME:-gce-to-gcve}
NEW_INSTANCE=${NEW_INSTANCE:-automation-vm}
ZONE=${ZONE:-us-west2-a}
PROJECT_ID="cibg-tmm"
IAM_ROLES="roles/vmwareengine.vmwareengineAdmin roles/storage.admin roles/compute.admin"
@ericgray
ericgray / esxiso2pxe
Created March 17, 2014 18:21
Shell script that automates the process of extracting and modifying contents of ESXi ISO for install via PXE boot. See http://www.vcritical.com/2014/03/automatically-prepare-an-esxi-iso-image-for-pxe-booting/
#!/bin/bash
# esxiso2pxe - quickly extract contents of ESXi ISO image for use on a PXE server
# 17Mar2014 - egray
if [ $# != 3 ]; then
echo "Usage: $0 <tftpboot dir> <new dir name> <ESXi ISO file>" >&2
exit 1
fi