Dell ESXI tweaks for EqualLogic SAN

change login timeout to 60
turn off delay AK

run the following:
ethtool –pause vmnic0 autoneg off tx on rx on
ethtool –pause vmnic1 autoneg off tx on rx on
ethtool –pause vmnic2 autoneg off tx on rx on
ethtool –pause vmnic3 autoneg off tx on rx on

then past the above into: /etc/rc.local.d/local.sh

Dell esxi script for esxi hosts using equalogic:

esxcli storage nmp satp set –default-psp=VMW_PSP_RR –satp=VMW_SATP_EQL ; for i in `esxcli storage nmp device list | grep EQLOGIC|awk ‘{print $7}’|sed ‘s/(//g’|sed ‘s/)//g’` ; do esxcli storage nmp device set -d $i –psp=VMW_PSP_RR ; esxcli storage nmp psp roundrobin deviceconfig set -d $i -I 3 -t iops ; done

ESXI: How to power on-off vms via cli

To power on a virtual machine from the command line:
List the inventory ID of the virtual machine with the command:

vim-cmd vmsvc/getallvms |grep <vm name>

Note: The first column of the output shows the vmid.

Check the power state of the virtual machine with the command:

vim-cmd vmsvc/power.getstate <vmid>

Power-on the virtual machine with the command:

vim-cmd vmsvc/power.on <vmid>

How to power off an unresponsive vm via cli

From: https://www.vladan.fr/esxi-5-unresponsive-vm-h/

Step 1 – connect via SSH by using puty for example and enter esxtop.

Enter “esxtop”, then press “c” for the CPU resource screen and shift + V to display VMs only.

ESXi 5 Unresponsive VM

Step 2 – changing the display and locating the LWID number

Press “f” to change the display fields and press “c” in order to show the LWID (Leader World Id) and press ENTER.

How to kill unresponsive VM in VMware ESXi 5

Step 3 – Invoking the k (kill) with the number does it…..

Now when you have the LWID column there, you can see the VM which interests you by the LWID number.

You can press “k” and enter the LWID number of the VM which you want to stop. Note that this is hard stop so, the next time that the VM will boot you’ll probbably see this screen (depending on your guest OS of course).

VMware ESXi 5 – How to kill an unresponsive VM through command line

If this method don’t work, you can’t vmotion the VM elsewhere or any other option don’t work either, there might be a hardware problem with the host which can lead into PSOD.

VMWare CLI: List VM’s, power on/off from cli and resize from cli

# vim-cmd vmsvc/getallvms
Vmid Name File Guest OS Version Annotation
1 QMain [ESX03] QMain/QMain.vmx windows8Server64Guest vmx-10
2 exch01 [ESX02] exch01/exch01.vmx winNetStandardGuest vmx-10
3 rdp01 [ESX02] rdp01/rdp01.vmx winNetStandardGuest vmx-10
4 VC02 [ESX01] VC02/VC02.vmx windows7Server64Guest vmx-10
5 tts1 [ESX01] tt1/tts1.vmx winNetStandardGuest vmx-10

~ # vim-cmd vmsvc/power.getstate 4
Retrieved runtime info
Powered off

~ # vmkfstools -X 100G /vmfs/volumes/ESX01/VC02/VC02.vmdk
Grow: 100% done.

~ # vim-cmd vmsvc/power.on 4
Powering on VM:

~ # vim-cmd vmsvc/getallvms
Vmid Name File Guest OS Version Annotation
1 QMain [ESX03] QMain/QMain.vmx windows8Server64Guest vmx-10
2 exch01 [ESX02] exch01/exch01.vmx winNetStandardGuest vmx-10
3 rdp01 [ESX02] rdp01/rdp01.vmx winNetStandardGuest vmx-10
4 VC02 [ESX01] VC02/VC02.vmx windows7Server64Guest vmx-10
5 tts1 [ESX01] tts1/tts1.vmx winNetStandardGuest vmx-10
~ #

Enable service in VMWare ESXI firewall

To list your current configuration:
# esxcli network firewall ruleset list

To enable sshClient to enable copying using ssh:

#esxcli network firewall ruleset set -e true -r sshClient

For older esxi versions (5 and below)
# esxcli network firewall ruleset set –ruleset-id sshClient –enabled yes

To refresh the configuration:
# esxcli network firewall refresh

Linux: Output your microphone to other computer’s speaker & vise-versa over SSH

$ dd if=/dev/dsp | ssh username@host dd of=/dev/dsp

The default sound device on Linux is /dev/dsp. It can be both written to and read from. If it’s read from then the audio subsystem will read the data from the microphone. If it’s written to, it will send audio to your speaker.

This one-liner reads audio from your microphone via the dd if=/dev/dsp command (if stands for input file) and pipes it as standard input to ssh. Ssh, in turn, opens a connection to a computer at host and runs the dd of=/dev/dsp (of stands for output file) on it. Dd of=/dev/dsp receives the standard input that ssh received from dd if=/dev/dsp. The result is that your microphone gets output on host computer’s speaker.

Want to scare your colleague? Dump /dev/urandom to his speaker by dd if=/dev/urandom.

It works the other way as well:
ssh -C user@ipaddress arecord -f dat -D plughw:1,0|aplay -f dat