Press "Enter" to skip to content

VCAP5-DCA Objective 8.2 : Administer vSphere Using the vSphere Management Assistant

  • Install and configure vMA

Download the vMA appliance from VMware and install it using OVF template thats available.

Basically follow the bouncing ball, configure network and then enter vi-admin password.

The only other configuration that could be done is adding the vMA appliance to the domain. this is done with this command: sudo domainjoin-cli join <Domain> <domain user>

vi-admin@vma:~> sudo domainjoin-cli join acme.corp administrator
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
 #2) Think before you type.
 #3) With great power comes great responsibility.
vi-admin's password:
Sorry, try again.
vi-admin's password:
Joining to AD Domain: acme.corp
With Computer DNS Name: vma.acme.corp
administrator@ACME.CORP's password:
Warning: System restart required
Your system has been configured to authenticate to Active Directory for the
first time. It is recommended that you restart your system to ensure that all
applications recognize the new settings.
  • Add/Remove target servers

Adding target servers is a pretty simple process by using this command:

note this command because no authentication is defined will use fpauth which is a local account of this ESXi hosts. by adding –authpolicy adauth will authenticate with AD credenticals

vifp addserver esxi01.acme.corp


Then list the targets available use the command as in the above image

vifp listservers

Removing the servers or targets use the command:

vifp removeserver esxi01.acme.corp

This will remove the server from your target list.

  • Perform updates to the vMA

Updates to vMA is a simple process and can be done from the web GUI, automatic checking for updates can be applied also.


Updates using VMware Update Manager is also another option.

  • Use vmkfstools to manage VMFS datastores

vmkfstools has allot more options for configuring Virtual Machine VMDK disks than it does VMFS Datastores. the available commands for Datastore administration is:

    • List Attributes – vmksftools -P /vmfs/volumes/<Datastore name>
    • Create VMFS Datastore – vmkfstools -C vmfs5 -S <Name> /vmfs/devices/disks/<Disk ID>
    • Extend VMFS datastore using the -Z option
  • Use vmware-cmd to manage VMs

vmware-cmd has been around as long as I have been working with ESX(i) and has allot of power for administering virtual machines. Here are the commands that can be used:

vi-admin@vma:~[esxi01.acme.corp]> vmware-cmd
 Usage: vmware-cmd <options> <vm-cfg-path> <vm-action> <arguments>
 vmware-cmd -s <options> <server-action> <arguments>
 Connection Options:
 -H or --server <host> specifies an ESX host or a vCenter Server
 -h or --vihost <target host> specifies a target host if host is a virtual center
 -O <port> specifies an alternative port
 -Q <protocol> specifies an alternative protocol
 -U or --username <username> specifies a username
 -P or --password <password> specifies a password
 --sessionfile specifies a sessionfile path
 --passthroughauth specifies a login by sspi option
 --credstore specifies to fetch Credential store information
 --encoding specifies encoding option
 General Options:
 -h More detailed help.
 -q Quiet. Minimal output
 -v Verbose.
Server Operations:
 vmware-cmd -l
 vmware-cmd -s register <config_file_path> <datacenter> <resource pool>
 vmware-cmd -s unregister <config_file_path>
VM Operations:
 vmware-cmd <cfg> getstate
 vmware-cmd <cfg> start <powerop_mode>
 vmware-cmd <cfg> stop <powerop_mode>
 vmware-cmd <cfg> reset <powerop_mode>
 vmware-cmd <cfg> suspend <powerop_mode>
 vmware-cmd <cfg> setguestinfo <variable> <value>
 vmware-cmd <cfg> getguestinfo <variable>
 vmware-cmd <cfg> getproductinfo <prodinfo>
 vmware-cmd <cfg> connectdevice <device_name>
 vmware-cmd <cfg> disconnectdevice <device_name>
 vmware-cmd <cfg> getconfigfile
 vmware-cmd <cfg> getuptime
 vmware-cmd <cfg> answer
 vmware-cmd <cfg> gettoolslastactive
 vmware-cmd <cfg> hassnapshot
 vmware-cmd <cfg> createsnapshot <name> <description> <quiesce> <memory>
 vmware-cmd <cfg> revertsnapshot
 vmware-cmd <cfg> removesnapshots

I have really only used the vmware-cmd -l to list the active virtual machines on a host, this is when a vmx file is locked, other than that all commands now can be done simply through the vSphere client.

  • Use esxcli to manage ESXi Host configurations

Available namespaces of sections of esxcli are as below

Available Namespaces:
  esxcli                Commands that operate on the esxcli system itself allowing users
                        to get additional information.
  fcoe                  VMware FCOE commands.
  hardware              VMKernel hardware properties and commands for configuring
  iscsi                 VMware iSCSI commands.
  network               Operations that pertain to the maintenance of networking on an ESX
                        host. This includes a wide variety of commands to manipulate
                        virtual networking components (vswitch, portgroup, etc) as well as
                        local host IP, DNS and general host networking settings.
  sched                 VMKernel system properties and commands for configuring scheduling
                        related functionality.
  software              Manage the ESXi software image and packages
  storage               VMware storage commands.
  system                VMKernel system properties and commands for configuring properties
                        of the kernel core system.
  vm                    A small number of operations that allow a user to Control Virtual
                        Machine operations.

best thing about esxcli it will always tell you the options, in this objective we want host configurations so lets use esxcli network, this is what you get:

vi-admin@vma:~[esxi01.acme.corp]> esxcli network
Usage: esxcli network {cmd} [cmd options]

Available Namespaces:
  fence                 Commands to list fence information
  firewall              A set of commands for firewall related operations
  ip                    Operations that can be performed on vmknics
  nic                   Operations having to do with the configuration of Network
                        Interface Card and getting and updating the NIC settings.
  port                  Commands to get information about a port
  sriovnic              Operations having to do with the configuration of SRIOV enabled
                        Network Interface Card and getting and updating the NIC settings.
  vm                    A set of commands for VM related operations
  vswitch               Commands to list and manipulate Virtual Switches on an ESX host.
  diag                  Operations pertaining to network diagnostics


So lets just use firewall with the following command esxcli network firewall ruleset:

vi-admin@vma:~[esxi01.acme.corp]> esxcli network firewall ruleset
Usage: esxcli network firewall ruleset {cmd} [cmd options]

Available Namespaces:
  allowedip             Commands to list and add/remove allowedip on ruleset
  rule                  Commands to list rules in the ruleset

Available Commands:
  list                  List the rulesets in firewall.
  set                   Set firewall ruleset status (allowedAll flag and enabled status).

As you can see ever step you take it tells you what the options are, here was can list, add set Firewall rules.

  • Troubleshoot common vMA errors and conditions

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Anti SPAM BOT Question * Time limit is exhausted. Please reload CAPTCHA.