oi ip config

ifconfig -a

svcadm disable network/physical:nwam
svcadm enable network/physical:default

dladm show-phys

ifconfig e1000g0 broadcast + up


iscsi setup and stuff!

Here is a nice powercli way to setup iscsi networking, and set the vlans and all sorts of fun stuff! 🙂

$h = get-vmhost rey-esxi-03*
$vs = $h | Get-VirtualSwitch -name vSwitch0

New-VMHostNetworkAdapter -VMHost $h -PortGroup vmk-iscsi-01 -VirtualSwitch $vs -SubnetMask -IP
$vpg = $h | get-virtualportgroup -name vmk-iscsi-01
$vpg | Set-VirtualPortGroup -vlanid 152
$vpgo = $vpg | get-nicteamingpolicy
$vpgo | set-NicTeamingPolicy -makenicactive vmnic1

New-VMHostNetworkAdapter -VMHost $h -PortGroup vmk-iscsi-02 -VirtualSwitch $vs -SubnetMask -IP
$vpg = $h | get-virtualportgroup -name vmk-iscsi-02
$vpg | Set-VirtualPortGroup -vlanid 152
$vpgo = $vpg | get-nicteamingpolicy
$vpgo | set-NicTeamingPolicy -makenicactive vmnic3

New-VMHostNetworkAdapter -VMHost $h -PortGroup vmk-iscsi-03 -VirtualSwitch $vs -SubnetMask -IP
$vpg = $h | get-virtualportgroup -name vmk-iscsi-03
$vpg | Set-VirtualPortGroup -vlanid 152
$vpgo = $vpg | get-nicteamingpolicy
$vpgo | set-NicTeamingPolicy -makenicactive vmnic5

New-VMHostNetworkAdapter -VMHost $h -PortGroup vmk-iscsi-04 -VirtualSwitch $vs -SubnetMask -IP
$vpg = $h | get-virtualportgroup -name vmk-iscsi-04
$vpg | Set-VirtualPortGroup -vlanid 152
$vpgo = $vpg | get-nicteamingpolicy
$vpgo | set-NicTeamingPolicy -makenicactive vmnic7

openssl.cfg for vcenter 5.0 (not 5.1)

for god sakes please use ver .9.8, if you use 1.0, the pfx wont work correctly and web services will be broke and you will be pulling your hair out.


add sans to openssl.cfg
# Extensions to add to a certificate request

basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName= @alt_names

req_extensions = v3_req
And in the v3_req section:

[ v3_req ]
subjectAltName = @alt_names

DNS.1 = in2vc01
DNS.2 = in2vc01.corp.allscripts.com
IP.1 =

openssl.exe genrsa 1024 > rui.key

mine had to be 2048

openssl.exe genrsa 2048 > rui.key

openssl req -config openssl.cfg -new -key rui.key > rui.csr
openssl req -text -noout -in rui.csr
to verify

submit as 64 to cert, approve

openssl pkcs12 -export -in rui.crt -inkey rui.key -name in2vc01.corp.allscripts.com -passout pass:testpassword -out rui.pfx

# Get the hostsystem object for every host currently disconnected.
$VMhosts = Get-View -ViewType ‘Hostsystem’ `
-Property ‘name’ `
-Filter @{"Runtime.ConnectionState"="disconnected"}

Foreach ($VMhost in $VMhosts)
# Create a reconnect spec
$HostConnectSpec = New-Object VMware.Vim.HostConnectSpec
$HostConnectSpec.hostName = $VMhost.name
$HostConnectSpec.userName = ‘root’
$HostConnectSpec.password = ‘password’

# Reconnect the host
$taskMoRef = $VMhost.ReconnectHost_Task($HostConnectSpec,$null)

# optional, but i like to return a task object, that way I can
# easily integrate this into a pipeline later if need be.
Get-VIObjectByVIView -MORef $taskMoRef

vCenter 5 upgrade leaves convertor red in health for service status

I ran into an issue where an upgrade to vCenter 5 left some trails of convertor behind… very annoying as i want it to be all green!!
here is the fix

Click me

get ldp, you don’t have to if you are server 2008 r2
run click cmd run as admin

connection -> connect to your vc
connection -> bind

view -> tree
leave base dn blank
double click dc=virtualcenter,DC=vmware,DC=int
double click on OU=Health,DC=virtualcenter,DC=vmware,DC=int
double click on
double click on random string below it

right click

and choose delete

restart vc, log back in, and go click refresh!

welcome back all green!!


find vms with resource settings and set ram

$vms = Get-VM
foreach ($vm in $vms){
$vmre = $vm | Get-VMResourceConfiguration
if ($vmre.MemLimitMB -ne ‘-1’){
$rp = $vm | Get-VMResourceConfiguration
$rpvmmb = $rp.MemLimitMB
write-host $vm ", mem granted= " $vm.memorymb ", mem resources = " $rpvmmb

cooler one to only show when they don’t match!

$vms = get-vm
foreach ($vm in $vms){
$vmre = $vm | Get-VMResourceConfiguration
if ($vmre.MemLimitMB -ne ‘-1’){
$rp = $vm | Get-VMResourceConfiguration
$rpvmmb = $rp.MemLimitMB
if ($vm.memorymb -ne $rpvmmb){
write-host $vm ", mem granted= " $vm.memorymb ", mem resources = " $rpvmmb

Dell OSMA in esxi

vihostupdate.pl –server ncvm18 –username root –password * -i -b “Z:\VMware\4.1U1\OM-SrvAdmin-Dell-Web-6.5.0-2247.VIB-ESX41i_A01.zip”

vicfg-advcfg.pl –server ncvm19 –username root –password * –set 1 UserVars.CIMEnabled

vicfg-advcfg.pl –server ncvm19 –username root –password * –set 1 UserVars.CIMoemProviderEnabled