content top

Vsphere Command-Line Reference

No Gravatar

vSphere Command-Line Interface Reference

Also check here: http://www.vmware.com/pdf/vsphere4/r41/vsp4_41_vcli_inst_script.pdf

Data taken from: http://www.vmware.com/support/developer/vcli/vcli41/doc/reference/

The vSphere CLI command set allows you to run common system administration commands against vSphere systems from an administration server of your choice.

Linux Installation: If you accepted the defaults during installation, you can find the installed software in the following locations:

  • vSphere CLI scripts – /usr/bin
  • vSphere SDK for Perl utility applications – /usr/lib/vmware-vcli/apps
  • vSphere SDK for Perl sample scripts – /usr/share/doc/vmware-vcli/samples

Windows Installation: vSpere CLI commands are installed in C:\Program Files\VMware\VMware vSphere CLI\bin by default.

The vSphere CLI includes the commands listed below, as well as the resxtop and esxcli commands.

  • For resxtop, see the documentation in the Resource Management Guide.
  • For esxcli, see the online help. This command differs depending on the system you are running it on.

To display usage information, click the command name in the Documentation column of Table 1.

Table 1: vSphere CLI commands

Documentation Description
svmotion Moves a virtual machine’s configuration file and optionally its disks while the virtual machine is running. Must run against a vCenter Server system.
vicfg‑advcfg Performs advanced configuration including enabling and disabling CIM providers. Use this command as instructed by VMware.
vicfg‑authconfig Manages Active Directory authentication.
vicfg‑cfgbackup Backs up the configuration data of an ESXi system and restores previously saved configuration data.
vicfg‑dns.pl Specifies an ESX/ESXi host’s DNS (Domain Name Server) configuration.
vicfg‑dumppart Manages diagnostic partitions.
vicfg‑hostops Allows you to start, stop, and examine ESX/ESXi hosts and to instruct them to enter maintenance mode and exit from maintenance mode.
vicfg‑ipsec Supports setup of IPSec.
vicfg‑iscsi Manages iSCSI storage.
vicfg‑module Enables VMkernel options. Use this command with the options listed, or as instructed by VMware.
vicfg‑mpath Displays information about storage array paths and allows you to change a path’s state.
vicfg‑mpath35 Configures multipath settings for Fibre Channel or iSCSI LUNs.
vicfg‑nas Manages NAS file systems.
vicfg‑nics Manages the ESX/ESXi host’s NICs (uplink adapters).
vicfg‑ntp Specifies the NTP (Network Time Protocol) server.
vicfg‑rescan Rescans the storage configuration.
vicfg‑route Lists or changes the ESX/ESXi host’s route entry (IP gateway).
vicfg‑scsidevs Finds available LUNs.
vicfg‑snmp Manages the Simple Network Management Protocol (SNMP) agent.
vicfg‑syslog Specifies the syslog server and the port to connect to that server for ESXi hosts.
vicfg‑user Creates, modifies, deletes, and lists local direct access users and groups of users.
vicfg‑vmknic Adds, deletes, and modifies virtual network adapters (VMkernel NICs).
vicfg‑volume Supports resignaturing a VMFS snapshot volume and mounting and unmounting the snapshot volume.
vicfg‑vswitch Adds or removes virtual switches or vNetwork Distributed Switches, or modifies switch settings.
vifs.pl Performs file system operations such as retrieving and uploading files on the remote server.
vihostupdate Manages updates of ESX/ESXi hosts. Use vihostupdate35 for ESXi 3.5 hosts.
vihostupdate35 Manages updates of ESX/ESXi version 3.5 hosts.
vmkfstools Creates and manipulates virtual disks, file systems, logical volumes, and physical storage devices on ESX/ESXi hosts.
vmware‑cmd Performs virtual machine operations remotely. This includes, for example, creating a snapshot, powering the virtual machine on or off, and getting information about the virtual machine.

VMware welcomes your suggestions for improving technical publications. Email your feedback to docfeedback@vmware.com

Read More

resxtops and troubleshooting Memory for ESXi/ESX hosts from the vMA

No Gravatar

Here is a quick cheat sheet for the vMA (if you need it).

  • The default user name is vi-admin password is set on install
  • To add an esx host type vifp addserver <your esxhostname.company.com>
  • To show a quick list of your servers vifp listservers
  • To initialize a connection to a particular host type vifpinit esxhostname.company.com
  • To capture logs from an esx host type vilogger enable –server <fqdn of esxhost you want to monitor> –numrotation 30 –maxfilesize 1023 –collectionperiod 100

How can I launch resxtop remotely?

$resxtop –server <fqdn of your vCenter> –vihost <fqdn of esxhost you want to monitor> –username <your username to login Virtual Center>

(Note: you will be prompted for your password)

How can I run resxtop in batch mode and store all that in a .csv ?  The command below batches it takes 60 samples every 5 seconds then stores it in a file named data.csv

$resxtop -b -a -n 60 –server <fqdn of your virtualcenter server> –vihost <fqdn of your esxhost> –username (for your virtualcenter)

Why would I ever want to run resxtops when this stuff is in vCenter?  lol.

Some quick notes now that were in esxtops remotely using the vMA….

1) resxtops updates every 5 seconds to delay it type s then the refresh interval (20 would be 20 seconds)
2) Type V to just show virtual machines
3) To drill down into a virtual machine and look at the worlds type e then the gid
4) typing c will bring up cpu, m will bring up memory, d will bring up disk and n will bring up network

Troubleshooting Memory from the vMA with resxtops

1) Determine if the balloon driver is installed in a Virtual Machine  type m for memory view then f to toggle fields select MCTL
–Now that it is selected return back to the screen looking at the MCTL if the MCTL collumn says N on a virtual machine then the balloon driver isnt installed

2) Look at MEMSZ and GRANT counters…GRANT\MEMSZ = %memory used

3) To check demand of virtual machines memory  a  quick peak at Memory Usage Counter, the Average column and the Maximum (peak) column will help greatly if average> 80 or peak >90 high demand for virtual machines memory might be causing problem. ( I know virtual center)

4) Too check to see if you ESX host swapped in the past look at SWAP/MB if the value > 0 it has swapped virtual machine memory in the past.  If the answer is no, the ESX host doesnt have any virtual machine memory swapped.

5) Look at your SWCUR for your virtual machine if  the value> 0 then the ESX host has swapped memory from your test VM.

6) Look at your MCTLSZ if this > 0 your vm is balloning, if SWR/s or SWW/s your virtual machine is swapping

7) Look at MCTLSZ for your test virtual machine if value > 0 then vm is balloning

Read More
Page 10 of 16« First...89101112...Last »
content top