Skip to content

VMWare ESX

VMWare ESX

Get ESX server parameters

smbiosDump — dumps all the config data, including asset tags if your hardware supports that.

Change ESX network port parameters

esxcfg-nics <options> [nic]

  -s|--speed <speed>         Set the speed of this NIC to one of 10/100/1000/10000.
                             Requires a NIC parameter.
  -d|--duplex <duplex>       Set the duplex of this NIC to one of 'full' or 'half'.
                             Requires a NIC parameter.
  -a|--auto                  Set speed and duplexity automatically.
                             Requires a NIC parameter.
  -l|--list                  Print the list of NICs and their settings.
  -r|--restore               Restore the nics configured speed/duplex settings (INTERNAL ONLY)
  -h|--help                  Display this message.

To change the link state of the physical interface to down:
  esxcli network nic down -n vmnicX

To change the link state of the physical interface to up:
  esxcli network nic up -n vmnicX

To auto-negotiate the speed of an adapter:
  esxcli network nic set -n vmnicX -a

List installed NICs with status info:
  esxcli network nic list

Scan for VMware servers

nmap -sV -p 80,443 192.168.1.0/24 -oA vmware-scan
cat vmware-scan.gnmap | grep "open" | grep "VMware"

Suppress SSH warning on ESXi / VMware

By default, VMware causes a yellow warning triangle on any host that has SSH enabled. This can be hidden by setting the UserVars.SuppressShellWarning flag to 1, in host/configuration/Software/Advanced Settings.

Restart services

services.sh restart will restart the web interface to ESX. It will not restart the running VMs.

Accessing Dell iDrac data from ESX

enum_instances OMC_IPMIIPProtocolEndpoint root/cimv2

This reports all the network info for the iDrac.

Converting from KVM

There are a couple of ways to do this. For Windows, it's simplest to use the VMware Converter tool and digest the guest from the inside.

Otherwise, use qemu-img to convert the qcow or raw disk image into a vmdk image:

sudo qemu-img convert -O vmdk virtual-machine.img converted-virtual-machine.vmdk

Then copy it to ESX and run a second conversion from the ESX machine:

vmkfstools -i converted-virtual-machine.vmdk -d thin converted-virtual-machine-out.vmdk

That file can be added as a 'new hard disk' when a new VM is created. Delete the default disk first.