ESXi Stuff

Get Free ESXI Evaluation

Apparently, this URL isn’t always easy to find: http://vmware.com/go/get-free-esxi

Common Issue: Windows VM NIC not active after reboot

To work around this issue, turn off gratuitous ARP in the guest operating system. To turn off gratuitous ARP in the guest operating system:

  1. Shut down the guest operating system and power off the virtual machine.
  2. Change the virtual machine to a network vSwitch with no uplink. You can create one for this procedure.
  3. Power on the virtual machine and log in.
  4. Open the Registry editor. (Click Start, type ‘regedit’)
  5. Locate the key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  6. Click Edit > New, and click DWORD Value.
  7. Type ‘ArpRetryCount’.
  8. Right-click the ArpRetryCount registry entry and click Modify.
  9. In the Value box, type 0 and click OK.
  10. Exit the Registry Editor.
  11. Shut down the guest operating system and power off the virtual machine.
  12. Change the virtual machine back to a network vSwitch with the uplink.
  13. Power on the virtual machine.

Common Commands

Provide console screen to ssh session

dcui

Top

esxtop

VMware interactive shell

vsish

Logs

tail to look at the end of a file

tail /var/log/hostd.log
tail -f /var/log/hostd.log (-f to follow updates on screen)

cat to read logs

cat /var/log/hostd.log

grep to search for terms

tail /var/log/hostd.log | grep -i Power

List vmkernel errors

vmkerrcode -l

Host Management

List information about the host

esxcfg-info

Get NIC options

esxcfg-nics (Add -l to list NICs and their configs)

List information about virtual switching. can also be used for configuration.

esxcfg-vswitch -l

Accomplish the same as esxcfg-nics -l

esxcli network nic list

Show license information

vim-cmd vimsvc/license --show

Provide information about hypervisor networking

vim-cmd hostsvc/net/info

Set a time server to sync with

yast2 ntp-client add server=<your_chosen_time_server>
yast2 ntp-client enable

Request immediate sync with the time server

sntp -P no -r <your_chosen_time_server>

Packages & Services

List installed packages (ESXi 4.1)

ipkg list_installed

List installed packages (ESXi 5.0)

esxcli software vib list

Restart host services

services.sh restart

Show daemons running on hypervisor, can also be used for configuration

chkconfig -l

VM Management

List all running vms and vmid

vim-cmd vmsvc/getallvms

Power off vmid referenced from getallvms command

vim-cmd vmsvc/power.off vmid

Power on vmid referenced from getallvms command

vim-cmd vmsvc/power.on vmid

Reboot vmid referenced from getallvms command

vim-cmd vmsvc/power.reboot vmid

Delete the vmdk and vmx files from disk

vim-cmd vmsvc/destroy vmid

Register vm in hypervisor inventory

vim-cmd solo/registervm /vmfs/vol/datastore/dir/vm.vmx

Unregister vm with hypervisor

vim-cmd vmsvc/unregister vmid

Start vmware tools installation for VM

vim-cmd vmsvc/tools.install vmid

Maintenance Mode

Put into maintenance mode

vim-cmd hostsvc/maintenance_mode_enter

Take out of maintenance mode

vim-cmd hostsvc/maintenance_mode_exit

Check the state of maintenance mode on the host

vim-cmd hostsvc/hostsummary | grep inMaintenanceMode

categories · links · piano · posts · scripts · THEAARBS · home