Skip to content

paulsbestscriptlets


Re-signature LUNs script. 

Manual method
esxcfg-volume -l | grep VMFS
 
touch /tmp/luns.txt
 
vi /tmp/luns.txt
copy output to file
:wq! so save data.
cat /tmp/luns.txt | awk -F “/” ‘{print $2}’ | awk ‘{print $2}’ | while read i ; do esxcfg-volume -r “$i” ; done
 
 
 
In theory this should work also
esxcfg-volume -l | grep VMFS | awk -F “/” ‘{print $2}’ | awk ‘{print $2}’ | while read i ; do esxcfg-volume -r “$i” ; done
Tag all hosts for vSphere Replication traffic. 
$esxlistvr = get-vmhost
foreach ($_ in $esxlistvr) {$esxcli = Get-EsxCli -VMHost $_; $esxcli.network.ip.interface.tag.get("vmk0");}
foreach ($_ in $esxlistvr) {$esxcli =  Get-EsxCli -VMHost $_; $esxcli.network.ip.interface.tag.add("vmk0", "vSphereReplicationNFC" );}

foreach ($_ in $esxlistvr) {$esxcli =  Get-EsxCli -VMHost $_; $esxcli.network.ip.interface.tag.add("vmk0", "vSphereReplication" );}
 

Categories

Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: