Skip to content

Instantly share code, notes, and snippets.

View epardee's full-sized avatar

Eric Pardee epardee

  • Atlas Digital
  • Los Angeles
View GitHub Profile
@epardee
epardee / tutorial.md
Created November 27, 2017 23:55 — forked from Hengjie/tutorial.md
How to passthrough SATA drives directly on VMWare ESXI 6.5 as RDMs

How to passthrough SATA drives directly on VMWare EXSI 6.5 as RDMs

There aren't many tutorials about this, the only tutorials I've found were about passing through entire PCIe cards to VMs, or refered to old ESXI versions (below 6.5) that used a more comprehensive desktop client instead of the web app. In v6.5, the web app was introduced and the desktop client was deprecated. This tutorial shows you how to pass SATA HDDs to the virtual machine on VMWare ESXI 6.5. This tutorial is partially based on VMWare's own KB and the now deprecated Forza IT blog post.

Summary

We attach the SATA HDDs as an RDM (Raw Device Mapper) into an existing virtual disk on command line, then on the web app, we attach a new SCSI controller to the VM, and attach the newly created RDM as an "existing HDD" to the newly created SCSI controlle

@epardee
epardee / gist:ecedeec30dd2bc42b1420b551b29e9f3
Last active May 3, 2016 23:17
Determine when EBS Snapshot completes
volumeid="vol-changeme" ; profile="changeme" ; description="New snap" ; nameofsnap="Changeme" ; snapid=$(aws ec2 create-snapshot --volume-id $volumeid --description "$description" --profile $profile | awk -F"\"SnapshotId\"\: \"" '{print $2}' | awk -F"\"" '{print $1}'); while [ $(aws ec2 describe-snapshots --snapshot-ids $snapid --profile $profile | grep Progress | awk '{print $2}' | awk -F"\"" '{print $2}' | awk -F"%" '{print $1}') -ne 100 ] ; do : ; done ; aws ec2 create-tags --resources $snapid --tags Key=Completed,Value="`date`" Key=Name,Value="$nameofsnap" --profile $profile