To configure the ESXi SNMP Agent:
Open an SSH session to the ESXi host.
Run this command to show the current SNMP config:
Set the SNMP parameters of the ESXi Host:
1
2
3
esxcli system snmp set --communities public,eastnoc,westnoc
esxcli system snmp set --syscontact user
esxcli system snmp set --syslocation "location, world"
Enable the SNMP Agent:
1
esxcli system snmp set --enable true
To configure a local device as an RDM disk:
Open an SSH session to the ESXi host.
Run this command to list the disks that are attached to the ESXi host:
1
ls -l /vmfs/devices/disks
From the list, identify the local device you want to configure as an RDM and copy the device name.
Note: The device name is likely be prefixed with t10. and look similar to: t10.F405E46494C4540046F455B64787D285941707D203F45765
To configure the device as an RDM and output the RDM pointer file to your chosen destination, run this command:
1
vmkfstools -z /vmfs/devices/disks/diskname /vmfs/volumes/datastorename/vmfolder/vmname.vmdk
For example:
1
vmkfstools -z /vmfs/devices/disks/t10.F405E46494C4540046F455B64787D285941707D203F45765 /vmfs/volumes/Datastore2/localrdm1/localrdm1.vmdk
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1017530
1
2
3
4
5
$hbas
=
Get-VMHostHba
-VMHost
$vmHost
-Type
FibreChannel
foreach
(
$hba
in
$hbas
) {
$wwpn
= (&{
param
(
$s
)
for
(
$i
=14;
$i
-gt
0;
$i
-=2) {
$s
=
$s
.insert(
$i
,
":"
)}
return
$s
}(
"{0:x}"
-f
$hba
.PortWorldWideName))
Write-Host
"`t"
$hba
.Device
"|"
$hba
.model
"|"
"World Wide Port Name:"
$wwpn
}
Change all adapters of a vm named ‘myvm’ to while keeping all other settings like mac address:
E1000:
1
get-vm
'myvm'
|
get-networkadapter
|
set-networkadapter
-type
e1000
vmxnet3:
1
get-vm
'myvm'
|
get-networkadapter
|
set-networkadapter
-type
vmxnet3
all possible values:
1
e1000; Flexible; Vmxnet; EnhancedVmxnet; Vmxnet3
To enable Copy and Paste option for a specific virtual machine:
Note: VMware Tools must be installed for the Copy and Paste option to work.
Log in to a vCenter Server system using the vSphere Client and power off the virtual machine.
Select the virtual machine and click the Summary tab.
Click Edit Settings.
Navigate to Options > Advanced > General and click Configuration Parameters.
Click Add Row.
Type these values in the Name and Value columns:
isolation.tools.copy.disable FALSE
isolation.tools.paste.disable FALSE
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1026437
Posts navigation
random code and config snippets by iiidefix & friends