VMware ESXi 5.0 Reference                                                           ™




ESXCFG/               PowerCLI Cmdlet                      ESXCLI 5.0                         Boot Options                   ESXi                                                                                                                             ESXi Upgrade Path                                                                                              ESXCLI Name Spaces
                                                                                                                                        CIM broker         HA        NTP           syslog                           VM
VICFG
                                                                                                                                            CIM                                                                                                                                  Host on 32-bit
Command                                                                                               Stateless
                                                                                                      PXE                                providers        hostd      DCUI          vpxa         SNMP        VMX                  vSphere Client                                  or Incompatible                                                 Replace Server
                                                                                                                                                                                                                                                                                                                                                                                                                                                 esxcli5.0
                                                                                                                                                                                                                                                                                     Hardware
svmotion              Move-VM –Datastore                   No equivalent
                                                                                                                                                                                                                     VMM
esxcfg-advcfg         Get-VMHostAdvancedConfiguration       esxcli system settings advanced                                                   User mode API (fuller POSIX subset)                                                                                Running                                                                                                           fcoe          hardware           iscsi               network           software     storage     system           vm
vicfg-advcfg          Set-VMHostAdvancedConfiguration                                                                                                                                                                                                                                                    Host Running                            Upgrade to 4.x
                                                                                                      USB                                                                                                                          PowerCLI                    vCenter 5.0                              ESX/ESXi 3.5                                                           adapter         cpu             adapter                 fence             sources      core        boot          process
vicfg-cfgbackup       Get-VMHostFirmware                   No equivalent
                      Set-VMHostFirmware                                                                                                                                  Distributed               Virtual NIC                                                                                                                                                                nic             bootdevice      networkportal           firewall           acceptance   nmp         coredump
                                                                                                                                                                         VM file system               & Switch                                                                                                                                                                                  clock           physicalnetworkportal   ip                profile       vmfs        module
vicfg-dns             Get-VMHostNetwork                    esxcli network ip dns server
                                                                                                                                                      Resource                                                                                                                   Host on 64-bit                               Non-Upgradable                                                   memory          session                 vswitch           vib          filesystem   process
                      Set-VMHostNetwork                                                                                        VMkernel              Scheduling                                                                                                                   Compatible                                     Boot Disk
                                                                                                                                                                                                                                                                                                                                                 New 5.0 Install
                                                                                                                                                                                                                                                                                                                                                                                               pci             ibftboot                nic                            nfs         secpolicy
                                                                                                      SAN                                                                                                                                                                          Hardware
esxcfg-dumppart       Get-EsxCLI                           esxcli system coredump                                                                                        Storage Stack            Network Stack                   vMA/ESXCLI/                                                                                                                                                  platform        logicalnetworkportal                                               settings
                                                                                                                                                                                                                                     vCLI                                                                                                                                                                      plugin                                                             stats
vicfg-dumppart                                                                                                                                                                                                                                                                                                                                   Upgrade to 5.0
                                                                                                                                                                                                                                                                                                        Host Running                                                                                           software                                                           syslog
esxcfg-firewall        Get-VMHostFirewallDefaultPolicy      esxcli network firewall                                                                                                                                                                                                                       ESX/ESXi 4.x                              Using Update                                                                                                                    visorfs
                                                                                                                                                                                       Device Drivers
                      Get-VMHostFirewallException                                                                                                                                                                                                                                                                                                   Manager                                                                                                                       hostname
                      Set-VMHostFirewallDefaultPolicy                                             Local Disk                                                                                                                                                                                                                    Upgradable                                                                                                                                        time
                      Set-VMHostFirewallException                                                                                                                                                                                                                                                                                Boot Disk       Upgrade to 5.0                                                                                                                   uuid
vicfg-hostops         Get-VMHost                           No equivalent                                                                                                                                                                                                                                                                           Using ESXi                                                                                                                     version
                      Set-VMHost                                                                                                                                                                                                                                                                                                                                                                                                                                                  welcomemsg
                      Restart-VMHost
                                                                                                                                                                                                                                                                                                                                                    Installer
esxcfg-ipsec          No equivalent                        No equivalent
vicfg-ipsec
esxcfg-swiscsi
esxcfg-hwiscsi
                      Get-iScsiHBATarget
                      New-iScsiHBATarget
                                                           esxcli iscsi                      Performance and Troubleshooting                                                              Virtual Machine Commands                                                   Other Commands                                                             Network Commands                                                                         Storage Commands
vicfg-iscsi           Set-iScsiHBATarget
                      Remove-iScsiHBATarget                                                                                                                                               List Registered VMs (vCLI only)                                            Configure NTP                                                               vSwitches                                                                                 Scan Storage Devices
                                                                                             SCSI Performance Statistics (ESXi Shell only)
esxcfg-module         Get-EsxCLI                           esxcli system module              # vscsiStats {options}                                                                       # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> –l              Add NTP Server (vCLI only)                                                 List Defined Standard Virtual Switches                                                     # esxcli <conn_options> storage core adapter rescan
vicfg-module                                                                                                                                                                                                                                                         # vicfg-ntp <conn_options> --add <ip address>                              # esxcli <conn_options> network vswitch standard list
                                                                                             Show Open Ports (ESXi Shell only)                                                            Unregister a VM (vCLI only)                                                                                                                                                                                                                     VMFS
esxcfg-mpath          Get-ScsiLun                          esxcli storage core path          # nc –z <vcenter ip> <port range>                                                                                                                                       Remove NTP Server (vCLI only)                                              Add/Remove a vSwitch
                                                                                                                                                                                          # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> -s              # vicfg-ntp <conn_options> --delete <ip address>                                                                                                                     Show all VMFS Volumes
vicfg-mpath           Set-ScsiLun                                                                                                                                                                                                                                                                                                               # esxcli <conn_options> network vswitch standard                                          # esxcli <conn_options> storage filesystem list
                                                                                             Capture Network Tra c (ESXi Shell only)                                                      unregister /vmfs/volumes/<volume name>/<vm>/<vm>.vmx                                                                                                  [add|remove] --vswitch-name <name>
                                                                                                                                                                                                                                                                     Start NTP Service (vCLI only)
vicfg-mpath35         Get-ScsiLun                          No equivalent                     # tcpdump-uw –c 5 –n –I vmk0 host <vcenter ip> and port 123                                  <datacenter> <resource pool>                                               # vicfg-ntp <conn_options> --start                                                                                                                                   Attach a Datastore
                      Set-ScsiLun                                                                                                                                                                                                                                                                                                               Set MTU for a vSwitch
                                                                                             Test Network Connectivity (ESXi Shell only)                                                                                                                                                                                                                                                                                                  # esxcli <conn_options> storage core device detached list
                                                                                                                                                                                          Register a VM (vCLI only)                                                  List NTP Service (vCLI only)                                               # esxcli <conn_options> network vswitch standard set
esxcfg-nas            Get-Datastore                        esxcli storage nfs                # vmkping [–s 9000] <ip address>                                                                                                                                        # vicfg-ntp <conn_options> --start                                         --mtu=9000 --vswitch-name <name>                                                          # esxcli <conn_options> storage core device set –d naa.XXX
vicfg-nas             New-Datastore                                                                                                                                                       # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> -s
                                                                                                                                                                                          register /vmfs/volumes/<volume name>/<vm>/<vm>.vmx                         Stop NTP Service (vCLI only)                                                                                                                                         –state=on
                      Set-Datastore                                                          Memory/CPU Utilization                                                                                                                                                                                                                             List Network Policy Settings
                                                                                             # esxtop (ESXi Shell)                                                                        <datacenter> <resource pool>                                               # vicfg-ntp <conn_options> --stop                                          # esxcli <conn_options> network vswitch standard policy [                                 Mount a Datastore
esxcfg-nics           Get-VMHostNetworkAdapter             esxcli network nic                # resxtop (vCLI)
vicfg-nics            Set-VMHostNetworkAdapter                                                                                                                                                                                                                       Users                                                                      failover | security | shaping ] get                                                       # esxcli <conn_options> storage filesystem list
                                                                                                                                                                                          Get Guest OS Platform (vCLI only)                                          List Users (vCLI only)
vicfg-ntp             Get-VMHostNTPServer                  No equivalent                                                                                                                  # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip>                 # vicfg-user <conn_options> -e user –o list                                Port Groups                                                                               # esxcli <conn_options> storage filesystem volume mount
                      Set-VMHostNTPServer                                                                                                                                                 /vmfs/volumes/<volume name>/<vm>/<vm>.vmx getproductinfo                                                                                              List Defined Port Groups                                                                   –volume-label=label
                                                                                                                                                                                                                                                                     Add User (vCLI only)                                                       # esxcli <conn_options> network vswitch standard portgroup
esxcfg-rescan         Get-VMHostStorage –RescanAllHBA      esxcli storage core               Host Commands                                                                                platform                                                                   # vicfg-user <conn_options> -e user –o add –l <user> -p <password>         list                                                                                      NAS
vicfg-rescan                                                                                                                                                                                                                                                                                                                                                                                                                              List NAS Filesystems
                                                                                                                                                                                          Get Platform Hosting VM (vCLI only)                                        Change User Password (vCLI only)
esxcfg-route          Set-VMHostNetwork                    No equivalent                                                                                                                                                                                             # vicfg-user <conn_options> -e user –o modify –l <user> -p <password>      Add a Port Group                                                                          # esxcli <conn_options> storage nfs list
                                                                                             Display host ESXi version                                                                    # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip>                                                                                            # esxcli <conn_options> network vswitch standard portgroup
vicfg-route                                                                                  # esxcli <conn_options> system version get                                                   /vmfs/volumes/<volume name>/<vm>/<vm>.vmx getproductinfo                   Assign User Read Only Role (vCLI only)                                     [add|remove] --portgroup-name <portgroup> --vswitch-name                                  Add NAS Filesystem
esxcfg-scsidevs       Get-ScsiLun                          esxcli storage core                                                                                                            product                                                                    # vicfg-user <conn_options> -e user –o modify –l <user> --role read-only   <name>                                                                                    # esxcli <conn_options> storage nfs add –-host=<FQHN>
vicfg-scsidevs        Set-ScsiLun                          esxcli storage core filesystem     Set the system time                                                                                                                                                                                                                                                                                                                          --share=/path/to/share --volume-name=<share name>
                                                                                             # esxcli <conn_options> system time set --hour <16> --min <30> --sec <00>                                                                                               Remove User (vCLI only)                                                    Add Active Uplink to Port Group
                                                                                                                                                                                          Power on a VM (vCLI only)
vicfg-snmp            Get-VMHostSNMP                       No equivalent                                                                                                                                                                                             # vicfg-user <conn_options> -e user –o delete –l <user> -g <group>         # esxcli <conn_options> network vswitch standard portgroup                                Remove NAS Filesystem
                                                                                             Set the banner message                                                                       # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip>                                                                                            policy failover set –-active-uplinks=<uplink1, uplink2>
                      Set-VMHostSNMP
                                                                                             # esxcli <conn_options> system welcomemsg set --message                                                                                                                 Groups                                                                                                                                                               # esxcli <conn_options> storage nfs remove --volume-
                                                                                                                                                                                          /vmfs/volumes/<volume name>/<vm>/<vm>.vmx start [ soft | hard ]                                                                                                                                                                                 name=<share name>
vicfg-syslog          Get-VMHostSysLogServer               esxcli system syslog              <message string>                                                                                                                                                        List Groups (vCLI only)                                                    Set a Port Group vlan ID
                      Set-VMHostSysLogServer                                                                                                                                              Power o a VM (vCLI only)                                                   # vicfg-user <conn_options> -e group –o list                               # esxcli <conn_options> network vswitch standard portgroup
                                                                                             Configure a remote log host                                                                                                                                                                                                                                                                                                                   iSCSI
                                                                                                                                                                                          # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip>                 Add Group (vCLI only)                                                      set --portgroup-name <portgroup> --vlan-id=<vlanid>
vicfg-user            Get-VMHostAccount                    No equivalent                     # esxcli <conn_options> system syslog config set                                                                                                                                                                                                                                                                                             Enable Software iSCSI
                      Set-VMHostAccount                                                      --loghost=<ip address>                                                                       /vmfs/volumes/<volume name>/<vm>/<vm>.vmx stop [ soft | hard ]             # vicfg-user <conn_options> -e group –o add –d <groupname>                                                                                                           # esxcli <conn_options> iscsi software set –-enabled=true
                      New-VMHostAccount
                                                                                                                                                                                                                                                                                                                                                Add a Virtual Network Adaptor to Port Group
                                                                                             # esxcli <conn_options> system syslog reload                                                 Reset a VM (vCLI only)
                                                                                                                                                                                                                                                                     Add User to Group (vCLI only)                                              # esxcli <conn_options> network ip interface add
                      Remove-VMHostAccount                                                                                                                                                                                                                           # vicfg-user <conn_options> -e group –o modify –d <groupname>              --portgroup-name <portgroup>                                                              List iSCSI Adapters
                                                                                             Configure a remote dump host                                                                  # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip>                 --adduser <user1>,<user2>,<user3>                                                                                                                                    # esxcli <conn_options> iscsi adapter list
esxcfg-vmknic         Get-VMHostNetworkAdapter             esxcli network interface
vicfg-vmknic          Set-VMHostNetworkAdapter                                               # esxcli <conn_options> system coredump network set                                          /vmfs/volumes/<volume name>/<vm>/<vm>.vmx reset [ soft | hard ]                                                                                       Configure the IP Address and netmask for a Port Group
                                                                                             --interface-name <vmk#> --server-ipv4 <ip address> --server-port                                                                                                        Remove User from Group (vCLI only)                                         # esxcli <conn_options> network ip interface ipv4 set                                     Add iSCSI Adapters
esxcfg-volume         Get-View needed to call APIs         esxcli storage filesystem          <portnumber> 6500                                                                            Suspending a VM (vCLI only)                                                # vicfg-user <conn_options> -e group –o modify –d <groupname>              --interface-name=<vmk#> --ipv4=<ip address>                                               # esxcli <conn_options> iscsi networkportal add –n
vicfg-volume                                                                                                                                                                                                                                                         --removeuser <username>                                                    --netmask<netmask> --type=static                                                          <portal_name> -A <vmhba>
                                                                                             # esxcli <conn_options> system coredump network set --enable true                            # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip>
esxcfg-vswitch        Get-VirtualSwitch                    esxcli network vswitch                                                                                                         /vmfs/volumes/<volume name>/<vm>/<vm>.vmx suspend [ soft | hard ]          Remove Group (vCLI only)                                                                                                                                             Show iSCSI Status
                                                                                             Join host to Active Directory                                                                                                                                           # vicfg-user <conn_options> -e group –o delete –d <groupname>              List All Uplink Adapters
vicfg-vswitch         Set-VirtualSwitch                                                                                                                                                                                                                                                                                                         # esxcli <conn_options> network nic list                                                  # esxcli <conn_options> iscsi software get
                      Get-VirtualPortGroup                                                   Join host to AD domain (vCLI only)                                                           Resume a VM (vCLI only)                                                    Configure ESXi Dump Collector
                      Set-VirtualPortgroup                                                   # vicfg-authconfig --server=<ip address> --username=<user>                                   # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip>                 # esxcli <conn_options> system coredump network set                        List VMkernel Interfaces                                                                  Set the iSCSI Name and Alias
                                                                                             --password=<password> --authscheme AD --joindomain <domainname>                                                                                                         –-interface-name vmk0 --server-ipv4=<ip address> --port=<port name>        # esxcli <conn_options> network ip interface list                                         # esxcli <conn_options> iscsi adapter set –-adapter=<iscsi
                                                                                                                                                                                          /vmfs/volumes/<volume name>/<vm>/<vm>.vmx resume                                                                                                                                                                                                adapter> --name=<name>
vifs.pl               Copy-DatastoreItem                   No equivalent                     --adusername=<user> --adpassword=<password>
                      PSDrives                                                                                                                                                                                                                                       # esxcli <conn_options> system coredump network set –-enabled=true         Add VMkernel Interface
                                                                                                                                                                                          Show VM Uptime (vCLI only)                                                 # esxcli <conn_options> system coredump network get                                                                                                                  # esxcli <conn_options> iscsi adapter set –-adapter=<iscsi
                                                                                             Verify AD domain (vCLI only)                                                                                                                                                                                                                       # esxcli <conn_options> network ip interface add
vihostupdate          Install-VMHostPatch                  esxcli software                   # vicfg-authconfig --server <ip address> --authscheme AD –c                                  # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip>                                                                                            –-interface-name=<vmk#> --portgroup-name=<portgroup>                                      adapter> --alias=<alias>
                                                                                                                                                                                          /vmfs/volumes/<volume name>/<vm>/<vm>.vmx getuptime                        Configure ESXi Syslog Collector
vihostupdate35        Install-VMHostPatch                  No equivalent
                                                                                             Host Operations                                                                                                                                                         # esxcli <conn_options> system syslog config set –-loghost=<ip address>    List VMkernel Interfaces                                                                 TBD CHAP Authentication
                                                                                                                                                                                                                                                                                                                                                                                                                                         Set iSCSI
vmkfstools            Get-HardDisk                         No equivalent                     Enter/Exit Maintenance Mode (vCLI only)                                                      Show VMware Tools Status (vCLI only)                                       # esxcli <conn_options> system syslog reload                               # esxcli <conn_options> network ip interface ipv4 set                                     # esxcli <conn_options> iscsi adapter auth chap set
                                                                                             # vicfg-hostops <conn_options> --operation [enter | info | exit]                                                                                                                                                                                   –-ip=<ip address> --netmask=<subnetmask> --interface-                                     –-direction=mutual –mchap_username=<name>
                      Copy-HardDisk                                                                                                                                                       # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip>                 Attaching Devices                                                                                                                                                    --mchap_password=<pwd> --level=required --secret=<string>
                      Set-HardDisk                                                                                                                                                                                                                                                                                                              name=<vmk#>
                                                                                                                                                                                          /vmfs/volumes/<volume name>/<vm>/<vm>.vmx gettoolslastactive               Connect CDROM (vCLI only)                                                                                                                                            --adapter=<vmhba>
                                                                                             Shutdown/reboot a single host (vCLI only)                                                                                                                               # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> /vmfs/
vmware-cmd            Various cmdlets including:           No equivalent                                                                                                                      0 = not installed/not running
                                                                                             # vicfg-hostops <conn_options> --operation [ shutdown | reboot ]                                                                                                        volumes/<volume name>/<vm>/<vm>.vmx connectdevice <CD Drive>
                      Get-VM Set-VM      Get-Snapshot                                                                                                                                         1 = normal                                                                                                                                                                                                                                  Discover iSCSI Storage Devices
                      Set-Snapshot       Get-VMGuestInfo                                     Host Backup/Restore                                                                              5 = intermittent heartbeat                                                                                                                                                                                                                  # esxcli <conn_options> iscsi adapter discovery rediscover
                      Start-VM           Stop-VM
                                                                                             Backup host configuration (vCLI only)                                                             10 = no heartbeat
                                                                                                                                                                                                                                                                     Disconnect CDROM (vCLI only)
                                                                                                                                                                                                                                                                     # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> /vmfs/          ESXi Resources and Quick Links
                      Restart-VM
                                                                                             # vicfg-cfgbackup <conn_options> -s </path/filename>                                                                                                                    volumes/<volume name>/<vm>/<vm>.vmx disconnectdevice <CD Drive>
                                                                                                                                                                                          Create VM Snapshot (vCLI only)
esxtop                Get-EsxTop                           No equivalent                                                                                                                                                                                             Manage Routes                                                              Download ESXi: http://downloads.vmware.com/d/
resxtop                                                                                      Restore host configuration (vCLI only)                                                        # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip>
                                                                                                                                                                                                                                                                     Set Gateway (vCLI only)
                                                                                             # vicfg-cfgbackup <conn_options> -l </path/filename>                                         /vmfs/volumes/<volume name>/<vm>/<vm>.vmx createsnapshot                                                                                              ESXi Documentation: http://www.vmware.com/support/pubs/
esxupdate             Get-VMHostPatch                      esxcli software vib                                                                                                                                                                                       # vicfg-route <conn_options> <gateway>
                                                                                                                                                                                          <name> <desc> 0 0
                      Install-VMHostPatch                                                    Managing Modules                                                                                                                                                        Add Route (vCLI only)
vmkfstools            No equivalent                        No equivalent                     List all modules                                                                             Check if VM Has a Snapshot (vCLI only)                                     # vicfg-route <conn_options> -add <ip address> <netmask> <gateway>
                                                                                                                                                                                                                                                                                                                                                ESXi Frequently Asked Questions: http://www.vmware.com/                                   Authentication
                                                                                             # esxcli <conn_options> system module list [--enabled=true]                                                                                                                                                                                        products/vsphere/esxi-and-esx/faqs.html#c177114
                                                                                                                                                                                          # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip>                 List Routes (vCLI only)
vmkping               No equivalent                        No equivalent
                                                                                             List all loaded modules                                                                      /vmfs/volumes/<volume name>/<vm>/<vm>.vmx hassnapshot                      # vicfg-route <conn_options>                                               vSphere Install and Upgrade Community: http://communities.vmware.com/                    Setting up vMA FastPass
vmware-cmd            Multiple VM cmdlets available        No equivalent                     # esxcli <conn_options> system module list --loaded=true                                         0 = snapshot exists                                                    Configure DNS                                                               community/vmtn/server/vsphere/upgradecenter                                              # vifp addserver <hostname> --username <user> --password
                                                                                                                                                                                              1 = no snapshot                                                        Set Fully Qualified Hostname                                                                                                                                         <password>
vm-support            Get-Log                              No equivalent                     Enable/Disable modules                                                                                                                                                  # esxcli <conn_options> system hostname set --fdn=<hostname>               ESXi 5 Community: http://communities.vmware.com/community/                               # viftptarget --set <hostname>
                                                                                             # esxcli <conn_options> system module list                                                   Revert to VM Snapshot (vCLI only)
                                                                                             --enabled = [ true | false ]                                                                                                                                            Display DNS Servers                                                        vmtn/server/vsphere/esxi5
                                                                                                                                                                                          # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip>                                                                                                                                                                                     ESXCLI Command-Line Authentication
                                                                                                                                                                                                                                                                     # esxcli <conn_options> network ip dns server list                                                                                                                  # esxcli --server=<vcenter ip> --vihost=<hostname> --user
                                                                                                                                                                                          /vmfs/volumes/<volume name>/<vm>/<vm>.vmx revertsnapshot                                                                                              ESXi 4 Community: http://communities.vmware.com/community/
  vMA Deployment Tips                                                                                                                                                                                                                                                Add/Remove DNS Server                                                      vmtn/server/vsphere/esxi                                                                 <user> --password <password> <command>
                                                                                                                                                                                          Remove VM Snapshot (vCLI only)                                             # esxcli <conn_options> network ip dns server [add|remove]
                                                                                                                                                                                                                                                                                                                                                                                                                                         ESXCLI Creating a Session File
  vMA Docs: https://www.vmware.com/support/developer/vima/                                   vCLI Supported Platforms                                                                     # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip>                 --server=<ip address>                                                      ESXi O cial Blog: http://blogs.vmware.com/esxi/                                          # save_session --savesessionfile <file> --server <vcenter ip>
                                                                                                                                                                                          /vmfs/volumes/<volume name>/<vm>/<vm>.vmx removesnapshot                   Display DNS Search Domain                                                                                                                                           --username <user> --password <pass>
  vMA Downloads: http://www.vmware.com/downloads/login.do                                                                                                                                                                                                            # esxcli <conn_options> network ip dns search list                         Twitter: @VMwarevSphere, @VMwareESXi
                                                                                             vMA                                                                                          Forcibly Stop a VM with ESXCLI                                                                                                                                                                                                                 ESXCLI Using Windows Pass-Through Authentication
  vMA Community: http://communities.vmware.com/community/                                    Linux-based appliance that includes              Windows                                                                                                                Add/Remove DNS Search Domain                                               vSphere Automation Tools Community: http://communities.vmware.com/                       C:esxcli --server <vcenter ip> --passthroughauth
                                                                                                                                                                                          # esxcli <conn_options> vm process list                                    # esxcli <conn_options> network ip dns server [add|remove]
  vmtn/server/vsphere/automationtools/vima                                                   the vCLI and vSphere SDK for Perl                - Windows Vista Enterprise SP1                                                                                                                                                                    community/vmtn/server/vsphere/automationtools?view=overview                              --passthroughauthpackage “Kerberos” --vihost <hostname> network
                                                                                                                                                                                          # esxcli <conn_options> vm process kill --type soft|hard|force             --domain=<domain>                                                                                                                                                   ip interface list
                                                                                             Linux                                              (32-bit and 64-bit)
  vSphere SDK and Perl Documentation:                                                                                                                                                     --world-id <id>                                                            Enable DHCP                                                                Training: vSphere Transition to ESXi Essentials: http://mylearn.vmware.com/
                                                                                             - RHEL 5.5 Server (32-bit and 64-bit)            - Windows 2008 64-bit                                                                                                  # esxcli <conn_options> network ip interface ipv4 set                                                                                                               ESXCLI Using Environment Variables
  https://www.vmware.com/support/developer/viperltoolkit/                                                                                                                                                                                                                                                                                       mgrreg/courses.cfm?ui=www_edu&a=one&id_subject=23970                                     # VI_USERNAME=root <username>
                                                                                             - SLES 10 SP1 (32-bit and 64-bit)                - Windows 7 32-bit and 64-bit                                                                                          --interface-name=<vmk#> --type=dhcp
  vSphere Knowledge Base:                                                                                                                                                                                                                                                                                                                       Training: What Is New in ESXi 5.0: http://mylearn.vmware.com/mgrreg/                     # VI_PASSWORD=vmware123 <password>
                                                                                             - SLES 11 (32-bit and 64-bit)                                                                                                                                           Set Static IP
  http://kb.vmware.com/selfservice/microsites/microsite.do                                                                                                                                                                                                           # esxcli <conn_options> network ip interface ipv4 set --                   courses.cfm?ui=www_edu&a=one&id_subject=24417                                            # VI_SERVER=<IP of vCenter Server or ESXi host>
                                                                                             - Ubuntu 10.04 (32-bit and 64-bit)                                                                                                                                      interface-name=<vmk#> --ipv4=<ip address>
                                                                                                                                                                                                                                                                     --netmask=<subnetmask> --type=static



Summary of all ESXCLI commands: # esxcli <conn_options> esxcli command list                                                                   •      ESXCLI connection options when connecting through vCenter Server: --server <vcenter ip> --vihost <ESXi host ip>                                                            •    ESXCLI connection options when connecting directly to ESXi host: --server <ESXi host ip>

Vmware management-with-vcli-5.0

  • 1.
    VMware ESXi 5.0Reference ™ ESXCFG/ PowerCLI Cmdlet ESXCLI 5.0 Boot Options ESXi ESXi Upgrade Path ESXCLI Name Spaces CIM broker HA NTP syslog VM VICFG CIM Host on 32-bit Command Stateless PXE providers hostd DCUI vpxa SNMP VMX vSphere Client or Incompatible Replace Server esxcli5.0 Hardware svmotion Move-VM –Datastore No equivalent VMM esxcfg-advcfg Get-VMHostAdvancedConfiguration esxcli system settings advanced User mode API (fuller POSIX subset) Running fcoe hardware iscsi network software storage system vm vicfg-advcfg Set-VMHostAdvancedConfiguration Host Running Upgrade to 4.x USB PowerCLI vCenter 5.0 ESX/ESXi 3.5 adapter cpu adapter fence sources core boot process vicfg-cfgbackup Get-VMHostFirmware No equivalent Set-VMHostFirmware Distributed Virtual NIC nic bootdevice networkportal firewall acceptance nmp coredump VM file system & Switch clock physicalnetworkportal ip profile vmfs module vicfg-dns Get-VMHostNetwork esxcli network ip dns server Resource Host on 64-bit Non-Upgradable memory session vswitch vib filesystem process Set-VMHostNetwork VMkernel Scheduling Compatible Boot Disk New 5.0 Install pci ibftboot nic nfs secpolicy SAN Hardware esxcfg-dumppart Get-EsxCLI esxcli system coredump Storage Stack Network Stack vMA/ESXCLI/ platform logicalnetworkportal settings vCLI plugin stats vicfg-dumppart Upgrade to 5.0 Host Running software syslog esxcfg-firewall Get-VMHostFirewallDefaultPolicy esxcli network firewall ESX/ESXi 4.x Using Update visorfs Device Drivers Get-VMHostFirewallException Manager hostname Set-VMHostFirewallDefaultPolicy Local Disk Upgradable time Set-VMHostFirewallException Boot Disk Upgrade to 5.0 uuid vicfg-hostops Get-VMHost No equivalent Using ESXi version Set-VMHost welcomemsg Restart-VMHost Installer esxcfg-ipsec No equivalent No equivalent vicfg-ipsec esxcfg-swiscsi esxcfg-hwiscsi Get-iScsiHBATarget New-iScsiHBATarget esxcli iscsi Performance and Troubleshooting Virtual Machine Commands Other Commands Network Commands Storage Commands vicfg-iscsi Set-iScsiHBATarget Remove-iScsiHBATarget List Registered VMs (vCLI only) Configure NTP vSwitches Scan Storage Devices SCSI Performance Statistics (ESXi Shell only) esxcfg-module Get-EsxCLI esxcli system module # vscsiStats {options} # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> –l Add NTP Server (vCLI only) List Defined Standard Virtual Switches # esxcli <conn_options> storage core adapter rescan vicfg-module # vicfg-ntp <conn_options> --add <ip address> # esxcli <conn_options> network vswitch standard list Show Open Ports (ESXi Shell only) Unregister a VM (vCLI only) VMFS esxcfg-mpath Get-ScsiLun esxcli storage core path # nc –z <vcenter ip> <port range> Remove NTP Server (vCLI only) Add/Remove a vSwitch # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> -s # vicfg-ntp <conn_options> --delete <ip address> Show all VMFS Volumes vicfg-mpath Set-ScsiLun # esxcli <conn_options> network vswitch standard # esxcli <conn_options> storage filesystem list Capture Network Tra c (ESXi Shell only) unregister /vmfs/volumes/<volume name>/<vm>/<vm>.vmx [add|remove] --vswitch-name <name> Start NTP Service (vCLI only) vicfg-mpath35 Get-ScsiLun No equivalent # tcpdump-uw –c 5 –n –I vmk0 host <vcenter ip> and port 123 <datacenter> <resource pool> # vicfg-ntp <conn_options> --start Attach a Datastore Set-ScsiLun Set MTU for a vSwitch Test Network Connectivity (ESXi Shell only) # esxcli <conn_options> storage core device detached list Register a VM (vCLI only) List NTP Service (vCLI only) # esxcli <conn_options> network vswitch standard set esxcfg-nas Get-Datastore esxcli storage nfs # vmkping [–s 9000] <ip address> # vicfg-ntp <conn_options> --start --mtu=9000 --vswitch-name <name> # esxcli <conn_options> storage core device set –d naa.XXX vicfg-nas New-Datastore # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> -s register /vmfs/volumes/<volume name>/<vm>/<vm>.vmx Stop NTP Service (vCLI only) –state=on Set-Datastore Memory/CPU Utilization List Network Policy Settings # esxtop (ESXi Shell) <datacenter> <resource pool> # vicfg-ntp <conn_options> --stop # esxcli <conn_options> network vswitch standard policy [ Mount a Datastore esxcfg-nics Get-VMHostNetworkAdapter esxcli network nic # resxtop (vCLI) vicfg-nics Set-VMHostNetworkAdapter Users failover | security | shaping ] get # esxcli <conn_options> storage filesystem list Get Guest OS Platform (vCLI only) List Users (vCLI only) vicfg-ntp Get-VMHostNTPServer No equivalent # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> # vicfg-user <conn_options> -e user –o list Port Groups # esxcli <conn_options> storage filesystem volume mount Set-VMHostNTPServer /vmfs/volumes/<volume name>/<vm>/<vm>.vmx getproductinfo List Defined Port Groups –volume-label=label Add User (vCLI only) # esxcli <conn_options> network vswitch standard portgroup esxcfg-rescan Get-VMHostStorage –RescanAllHBA esxcli storage core Host Commands platform # vicfg-user <conn_options> -e user –o add –l <user> -p <password> list NAS vicfg-rescan List NAS Filesystems Get Platform Hosting VM (vCLI only) Change User Password (vCLI only) esxcfg-route Set-VMHostNetwork No equivalent # vicfg-user <conn_options> -e user –o modify –l <user> -p <password> Add a Port Group # esxcli <conn_options> storage nfs list Display host ESXi version # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> # esxcli <conn_options> network vswitch standard portgroup vicfg-route # esxcli <conn_options> system version get /vmfs/volumes/<volume name>/<vm>/<vm>.vmx getproductinfo Assign User Read Only Role (vCLI only) [add|remove] --portgroup-name <portgroup> --vswitch-name Add NAS Filesystem esxcfg-scsidevs Get-ScsiLun esxcli storage core product # vicfg-user <conn_options> -e user –o modify –l <user> --role read-only <name> # esxcli <conn_options> storage nfs add –-host=<FQHN> vicfg-scsidevs Set-ScsiLun esxcli storage core filesystem Set the system time --share=/path/to/share --volume-name=<share name> # esxcli <conn_options> system time set --hour <16> --min <30> --sec <00> Remove User (vCLI only) Add Active Uplink to Port Group Power on a VM (vCLI only) vicfg-snmp Get-VMHostSNMP No equivalent # vicfg-user <conn_options> -e user –o delete –l <user> -g <group> # esxcli <conn_options> network vswitch standard portgroup Remove NAS Filesystem Set the banner message # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> policy failover set –-active-uplinks=<uplink1, uplink2> Set-VMHostSNMP # esxcli <conn_options> system welcomemsg set --message Groups # esxcli <conn_options> storage nfs remove --volume- /vmfs/volumes/<volume name>/<vm>/<vm>.vmx start [ soft | hard ] name=<share name> vicfg-syslog Get-VMHostSysLogServer esxcli system syslog <message string> List Groups (vCLI only) Set a Port Group vlan ID Set-VMHostSysLogServer Power o a VM (vCLI only) # vicfg-user <conn_options> -e group –o list # esxcli <conn_options> network vswitch standard portgroup Configure a remote log host iSCSI # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> Add Group (vCLI only) set --portgroup-name <portgroup> --vlan-id=<vlanid> vicfg-user Get-VMHostAccount No equivalent # esxcli <conn_options> system syslog config set Enable Software iSCSI Set-VMHostAccount --loghost=<ip address> /vmfs/volumes/<volume name>/<vm>/<vm>.vmx stop [ soft | hard ] # vicfg-user <conn_options> -e group –o add –d <groupname> # esxcli <conn_options> iscsi software set –-enabled=true New-VMHostAccount Add a Virtual Network Adaptor to Port Group # esxcli <conn_options> system syslog reload Reset a VM (vCLI only) Add User to Group (vCLI only) # esxcli <conn_options> network ip interface add Remove-VMHostAccount # vicfg-user <conn_options> -e group –o modify –d <groupname> --portgroup-name <portgroup> List iSCSI Adapters Configure a remote dump host # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> --adduser <user1>,<user2>,<user3> # esxcli <conn_options> iscsi adapter list esxcfg-vmknic Get-VMHostNetworkAdapter esxcli network interface vicfg-vmknic Set-VMHostNetworkAdapter # esxcli <conn_options> system coredump network set /vmfs/volumes/<volume name>/<vm>/<vm>.vmx reset [ soft | hard ] Configure the IP Address and netmask for a Port Group --interface-name <vmk#> --server-ipv4 <ip address> --server-port Remove User from Group (vCLI only) # esxcli <conn_options> network ip interface ipv4 set Add iSCSI Adapters esxcfg-volume Get-View needed to call APIs esxcli storage filesystem <portnumber> 6500 Suspending a VM (vCLI only) # vicfg-user <conn_options> -e group –o modify –d <groupname> --interface-name=<vmk#> --ipv4=<ip address> # esxcli <conn_options> iscsi networkportal add –n vicfg-volume --removeuser <username> --netmask<netmask> --type=static <portal_name> -A <vmhba> # esxcli <conn_options> system coredump network set --enable true # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> esxcfg-vswitch Get-VirtualSwitch esxcli network vswitch /vmfs/volumes/<volume name>/<vm>/<vm>.vmx suspend [ soft | hard ] Remove Group (vCLI only) Show iSCSI Status Join host to Active Directory # vicfg-user <conn_options> -e group –o delete –d <groupname> List All Uplink Adapters vicfg-vswitch Set-VirtualSwitch # esxcli <conn_options> network nic list # esxcli <conn_options> iscsi software get Get-VirtualPortGroup Join host to AD domain (vCLI only) Resume a VM (vCLI only) Configure ESXi Dump Collector Set-VirtualPortgroup # vicfg-authconfig --server=<ip address> --username=<user> # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> # esxcli <conn_options> system coredump network set List VMkernel Interfaces Set the iSCSI Name and Alias --password=<password> --authscheme AD --joindomain <domainname> –-interface-name vmk0 --server-ipv4=<ip address> --port=<port name> # esxcli <conn_options> network ip interface list # esxcli <conn_options> iscsi adapter set –-adapter=<iscsi /vmfs/volumes/<volume name>/<vm>/<vm>.vmx resume adapter> --name=<name> vifs.pl Copy-DatastoreItem No equivalent --adusername=<user> --adpassword=<password> PSDrives # esxcli <conn_options> system coredump network set –-enabled=true Add VMkernel Interface Show VM Uptime (vCLI only) # esxcli <conn_options> system coredump network get # esxcli <conn_options> iscsi adapter set –-adapter=<iscsi Verify AD domain (vCLI only) # esxcli <conn_options> network ip interface add vihostupdate Install-VMHostPatch esxcli software # vicfg-authconfig --server <ip address> --authscheme AD –c # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> –-interface-name=<vmk#> --portgroup-name=<portgroup> adapter> --alias=<alias> /vmfs/volumes/<volume name>/<vm>/<vm>.vmx getuptime Configure ESXi Syslog Collector vihostupdate35 Install-VMHostPatch No equivalent Host Operations # esxcli <conn_options> system syslog config set –-loghost=<ip address> List VMkernel Interfaces TBD CHAP Authentication Set iSCSI vmkfstools Get-HardDisk No equivalent Enter/Exit Maintenance Mode (vCLI only) Show VMware Tools Status (vCLI only) # esxcli <conn_options> system syslog reload # esxcli <conn_options> network ip interface ipv4 set # esxcli <conn_options> iscsi adapter auth chap set # vicfg-hostops <conn_options> --operation [enter | info | exit] –-ip=<ip address> --netmask=<subnetmask> --interface- –-direction=mutual –mchap_username=<name> Copy-HardDisk # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> Attaching Devices --mchap_password=<pwd> --level=required --secret=<string> Set-HardDisk name=<vmk#> /vmfs/volumes/<volume name>/<vm>/<vm>.vmx gettoolslastactive Connect CDROM (vCLI only) --adapter=<vmhba> Shutdown/reboot a single host (vCLI only) # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> /vmfs/ vmware-cmd Various cmdlets including: No equivalent 0 = not installed/not running # vicfg-hostops <conn_options> --operation [ shutdown | reboot ] volumes/<volume name>/<vm>/<vm>.vmx connectdevice <CD Drive> Get-VM Set-VM Get-Snapshot 1 = normal Discover iSCSI Storage Devices Set-Snapshot Get-VMGuestInfo Host Backup/Restore 5 = intermittent heartbeat # esxcli <conn_options> iscsi adapter discovery rediscover Start-VM Stop-VM Backup host configuration (vCLI only) 10 = no heartbeat Disconnect CDROM (vCLI only) # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> /vmfs/ ESXi Resources and Quick Links Restart-VM # vicfg-cfgbackup <conn_options> -s </path/filename> volumes/<volume name>/<vm>/<vm>.vmx disconnectdevice <CD Drive> Create VM Snapshot (vCLI only) esxtop Get-EsxTop No equivalent Manage Routes Download ESXi: http://downloads.vmware.com/d/ resxtop Restore host configuration (vCLI only) # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> Set Gateway (vCLI only) # vicfg-cfgbackup <conn_options> -l </path/filename> /vmfs/volumes/<volume name>/<vm>/<vm>.vmx createsnapshot ESXi Documentation: http://www.vmware.com/support/pubs/ esxupdate Get-VMHostPatch esxcli software vib # vicfg-route <conn_options> <gateway> <name> <desc> 0 0 Install-VMHostPatch Managing Modules Add Route (vCLI only) vmkfstools No equivalent No equivalent List all modules Check if VM Has a Snapshot (vCLI only) # vicfg-route <conn_options> -add <ip address> <netmask> <gateway> ESXi Frequently Asked Questions: http://www.vmware.com/ Authentication # esxcli <conn_options> system module list [--enabled=true] products/vsphere/esxi-and-esx/faqs.html#c177114 # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> List Routes (vCLI only) vmkping No equivalent No equivalent List all loaded modules /vmfs/volumes/<volume name>/<vm>/<vm>.vmx hassnapshot # vicfg-route <conn_options> vSphere Install and Upgrade Community: http://communities.vmware.com/ Setting up vMA FastPass vmware-cmd Multiple VM cmdlets available No equivalent # esxcli <conn_options> system module list --loaded=true 0 = snapshot exists Configure DNS community/vmtn/server/vsphere/upgradecenter # vifp addserver <hostname> --username <user> --password 1 = no snapshot Set Fully Qualified Hostname <password> vm-support Get-Log No equivalent Enable/Disable modules # esxcli <conn_options> system hostname set --fdn=<hostname> ESXi 5 Community: http://communities.vmware.com/community/ # viftptarget --set <hostname> # esxcli <conn_options> system module list Revert to VM Snapshot (vCLI only) --enabled = [ true | false ] Display DNS Servers vmtn/server/vsphere/esxi5 # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> ESXCLI Command-Line Authentication # esxcli <conn_options> network ip dns server list # esxcli --server=<vcenter ip> --vihost=<hostname> --user /vmfs/volumes/<volume name>/<vm>/<vm>.vmx revertsnapshot ESXi 4 Community: http://communities.vmware.com/community/ vMA Deployment Tips Add/Remove DNS Server vmtn/server/vsphere/esxi <user> --password <password> <command> Remove VM Snapshot (vCLI only) # esxcli <conn_options> network ip dns server [add|remove] ESXCLI Creating a Session File vMA Docs: https://www.vmware.com/support/developer/vima/ vCLI Supported Platforms # vmware-cmd --server <vcenter ip> --vihost <ESXi host ip> --server=<ip address> ESXi O cial Blog: http://blogs.vmware.com/esxi/ # save_session --savesessionfile <file> --server <vcenter ip> /vmfs/volumes/<volume name>/<vm>/<vm>.vmx removesnapshot Display DNS Search Domain --username <user> --password <pass> vMA Downloads: http://www.vmware.com/downloads/login.do # esxcli <conn_options> network ip dns search list Twitter: @VMwarevSphere, @VMwareESXi vMA Forcibly Stop a VM with ESXCLI ESXCLI Using Windows Pass-Through Authentication vMA Community: http://communities.vmware.com/community/ Linux-based appliance that includes Windows Add/Remove DNS Search Domain vSphere Automation Tools Community: http://communities.vmware.com/ C:esxcli --server <vcenter ip> --passthroughauth # esxcli <conn_options> vm process list # esxcli <conn_options> network ip dns server [add|remove] vmtn/server/vsphere/automationtools/vima the vCLI and vSphere SDK for Perl - Windows Vista Enterprise SP1 community/vmtn/server/vsphere/automationtools?view=overview --passthroughauthpackage “Kerberos” --vihost <hostname> network # esxcli <conn_options> vm process kill --type soft|hard|force --domain=<domain> ip interface list Linux (32-bit and 64-bit) vSphere SDK and Perl Documentation: --world-id <id> Enable DHCP Training: vSphere Transition to ESXi Essentials: http://mylearn.vmware.com/ - RHEL 5.5 Server (32-bit and 64-bit) - Windows 2008 64-bit # esxcli <conn_options> network ip interface ipv4 set ESXCLI Using Environment Variables https://www.vmware.com/support/developer/viperltoolkit/ mgrreg/courses.cfm?ui=www_edu&a=one&id_subject=23970 # VI_USERNAME=root <username> - SLES 10 SP1 (32-bit and 64-bit) - Windows 7 32-bit and 64-bit --interface-name=<vmk#> --type=dhcp vSphere Knowledge Base: Training: What Is New in ESXi 5.0: http://mylearn.vmware.com/mgrreg/ # VI_PASSWORD=vmware123 <password> - SLES 11 (32-bit and 64-bit) Set Static IP http://kb.vmware.com/selfservice/microsites/microsite.do # esxcli <conn_options> network ip interface ipv4 set -- courses.cfm?ui=www_edu&a=one&id_subject=24417 # VI_SERVER=<IP of vCenter Server or ESXi host> - Ubuntu 10.04 (32-bit and 64-bit) interface-name=<vmk#> --ipv4=<ip address> --netmask=<subnetmask> --type=static Summary of all ESXCLI commands: # esxcli <conn_options> esxcli command list • ESXCLI connection options when connecting through vCenter Server: --server <vcenter ip> --vihost <ESXi host ip> • ESXCLI connection options when connecting directly to ESXi host: --server <ESXi host ip>