When discussing vSphere 5.0 internally someone came up with the idea to list all new features that vSphere brings. Let me warn you that this is a long list, and the list could even be longer if we would have included all API changes and back-end changes.
For us Unix guys, the idea of doing everything in ESX via a GUI is very hard to swallow. Especially when it comes to repetitive tasks like setting up vSwitches and Port Groups. Sure you can spend and arm and a leg on Enterprise Advanced licenses so that you can have distributed switches, but why when you can just script your commands and run that script on each box in your cluster. Below are a few examples of how to use the esxcfg-vswitch command.
Delete a Port Group:
esxcfg-vswitch -D “Service Console” vSwitch1
Add a nic (vmnic2) to a vswitch (vswitch1):
esxcfg-vswitch -L vmnic2 vswitch1
Remove a pnic (vmnic3) from a vswitch (vswitch0):
esxcfg-vswitch -U vmnic3 vswitch0
Create a portgroup (VM Network3) on a vswitch (vswitch1):
esxcfg-vswitch -A “VM Network 3” vSwitch1
Assign a VLAN ID (3) to a portgroup (VM Network 3) on a vswitch (vswitch1):
esxcfg-vswitch -v 3 -p “VM Network 3” vSwitch1
Change your Service Console (vswif0) IP and Subnet Mask:
iostat (input/output statistics) is a computer operating system monitoring tool used to collect and show storage input and output statistics. ( I stole this from Wiki)
It is often used to identify performance issues with local disks or networked file systems such as NFS.
For local disks and SAN disks I usually run it like so.
Use the key below to figure out what each heading means.
The fields have the following meanings:
disk name of the disk r/s reads per second w/s writes per second Kr/s kilobytes read per second Kw/s kilobytes written per second wait average number of transactions waiting for service (Q length)
actv average number of transactions actively
being serviced (removed from the
queue but not yet completed) %w percent of time there are transactions waiting for service (queue non-empty) %b percent of time the disk is busy (transactions in progress)
Most of the time I am troubleshooting hot application mount points, which are usually SAN disks controlled by Veritas. So at this point you need to correspond the OS's long ass disk name with Veritas' short and clean name. Use vxdisk list
vxdisk -e list
SUN6140-0_0 auto disk disgroup online c7t600A0B800029A7A000000E8447DFA700d0s2 SUN6140-0_2 auto disk disgroup online c7t600A0B800029A76800000C4548200237d0s2 SUN6140-0_3 auto disk disgroup online c7t600A0B800029A76800000C444820020Dd0s2
At this point know Solaris' name for each disk and can look for hotspots on these disks.