I hereby claim:
- I am lamw on github.
- I am lamw (https://keybase.io/lamw) on keybase.
- I have a public key whose fingerprint is E88C 6F19 C677 D636 B010 D47B 5106 881E 8111 94BD
To claim this, I am signing this object:
opts :add_host2 do | |
summary "Add a host to a cluster" | |
arg :cluster, nil, :lookup => VIM::ClusterComputeResource | |
arg :hostnames, nil, :multi => true | |
opt :username, "Username", :short => 'u', :default => 'root' | |
opt :password, "Password", :short => 'p', :default => '' | |
opt :force, "Force, e.g when host is already managed by other VC" | |
end | |
def add_host2 cluster, hostnames, opts |
#!/usr/bin/env python | |
# William Lam | |
# www.virtuallyghetto.com | |
import json | |
import urllib2 | |
# download json | |
response = urllib2.urlopen('http://partnerweb.vmware.com/service/vsan/all.json') |
#!/usr/bin/env python | |
# William Lam | |
# www.virtuallyghetto.com | |
# Lists of all VSAN Storage Controller sorted from smallest to largest Queue Depth | |
import json | |
import urllib2 | |
# download json | |
response = urllib2.urlopen('http://partnerweb.vmware.com/service/vsan/all.json') |
####### PS Script (test2.ps1) | |
if ( !(Get-Module -Name VMware.VimAutomation.Core -ErrorAction SilentlyContinue) ) { | |
. "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Scripts\Initialize-PowerCLIEnvironment.ps1" | |
} | |
$vcserver = "172.30.0.112" | |
$vcusername = "administrator@vghetto.local" | |
$vcpassword = "VMware1!" |
$clusterName = "VSAN-Cluster" | |
$cluster = Get-Cluster -Name $clusterName | |
$vms = Get-View ($cluster| Get-VM) | |
$cluster_view = Get-View ($cluster) | |
foreach ($vm in $vms) { | |
# Using new vSphere 6.0 API (http://www.virtuallyghetto.com/2015/02/handy-new-vsphere-6-0-apis-to-be-aware-of.html) | |
$cluster_view.FindRulesForVm($vm.MoRef) | |
} |
#!/usr/bin/perl -w | |
use strict; | |
use warnings; | |
use VMware::VIRuntime; | |
use VMware::VILib; | |
Opts::parse(); | |
Opts::validate(); | |
Util::connect(); |
#!/bin/bash | |
# Create temp workign directory | |
mkdir -p /mnt/vmw-tools | |
# Mount VMware Tools ISO | |
mount /dev/cdrom /mnt/vmw-tools | |
# Retrieve the VMware Tools package name from the directory | |
VMW_TOOLS=$(ls /mnt/vmw-tools/ | grep .gz) |
I hereby claim:
To claim this, I am signing this object:
$esxcli = Get-EsxCli | |
### To retrieve Major/Update version number of ESXi via ESXCLI | |
PS C:\Users\lamw\Desktop> $esxcli.system.version.get().version + " Update" + $esxcli.system.version.get().update | |
6.0.0 Update1 | |
### To retrieve all version information from ESXi via ESXCLI | |
PS C:\Users\lamw\Desktop> $esxcli.system.version.get() |
{ | |
"Deployment": "tiny", | |
"DiskProvisioning": "thin", | |
"IPAllocationPolicy": "dhcpPolicy", | |
"IPProtocol": "IPv4", | |
"InjectOvfEnv": true, | |
"Name": "VCSA-60u2-Embedded", | |
"PowerOn": true, | |
"PropertyMapping": [ | |
{ |