Thursday, 31 May 2012

power off / get state of vm vim-cmd


from VMware's own www

Using the ESXi command-line utility vim-cmd to power off the virtual machine

  1. On the ESXi console, enter Tech Support mode and log in as root. 
  2. Get a list of all registered virtual machines, identified by their VMID, Display Name, and path to the .vmx configuration file, using this command:

    vim-cmd vmsvc/getallvms

  3. To get the current state of a virtual machine
    vim-cmd vmsvc/power.getstate VMID
  4. Power off the virtual machine using the VMID found in Step 2 and run:

    vim-cmd vmsvc/power.off VMID

    Note: If the virtual machine fails to power off, use the following command:
    vim-cmd vmsvc/power.shutdownVMID

vSphere CLI


From VMware's own website...vSphere CLI commands
Documentation Description
esxcli command Lists descriptions of esxcli commands.
esxcli fcoe FCOE (Fibre Channel over Ethernet) comands
esxcli hardware Hardware namespace. Used primarily for extracting information about the current system setup.
esxcli iscsi iSCSI namespace for minitoring and managing hardware and software iSCSI.
esxcli license License management commands.
esxcli network Network namespace for managing virtual networking including virtual switches and VMkernel network interfaces.
esxcli software Software namespace. Includes commands for managing and installing image profiles and VIBs.
esxcli storage Includes core storage commands and other storage management commands.
esxcli system System monitoring and management command.
esxcli vm Namespace for listing virtual machines and shutting them down forcefully.
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.

Wednesday, 30 May 2012

viclient reghack

edit registry to populate vi client with vcenter server names 
HKEY_CURRENT_USER\Software\VMware\VMware Infrastructure Client\Preferences\recentconnections change ip to hostname or vice versa

Thursday, 17 May 2012

ESX WWN & Firmware of HBA and NIC

Enable TSM
As root 
cd /proc/scsi/lpfc820
ls
3 4
cat 3
info given:
FC SCSI driver version
make and model on which pci bus
firmware version
portname = WWN
link up or down

TO GET FIRMWARE VERSION OF NIC:
as root
ethtool -i vmnic0


Wednesday, 2 May 2012


Results of tests conducted to see if there is a difference in performance for an 8 vCPU Windows 2008 R2 VM.



Summary: It makes no difference !

The test wanted to ascertain if there was a difference in performance between the following 3 configurations:
1 Socket 4 Cores
2 Sockets 2 Cores
4 Sockets 1 Core
A single Windows 2008 R2 VM was used.
PassMark PerformanceTest software was installed onto the VM – only the CPU Mark Test was used.
http://www.passmark.com/products/pt.htm
The TEST:
The VM started off configured with 1 Socket and 4 Cores.
The PassMark CPU test was run – the results collected by screenshot (see below). 
The VM was then shutdown. The VM settings were changed to a 2 Socket 2 Core configuration and the VM was then powered back on.
The CPU test was run again and the results collected before the VM was shutdown and reconfigured with 4 Sockets and 1 Core.
After powering on the PassMark CPU Test was run again and the results collected.
The Test was repeated an additional 2 times.
There were no other VMs running on the ESX host at the time.



The following is a summary of the results:


Place
Configuration
Score
1
1 Socket 4 Cores
4811.7
2
2 Sockets 2 Cores
4811.3
3
4 Sockets 1 Core
4809.2
4
1 Socket 4 Cores
4808
5
2 Sockets 2 Cores
4806.9
6
4 Sockets 1 Core
4806.6
7
4 Sockets 1 Core
4789.4
8
2 Sockets 2 Cores
4651.6
9
1 Socket 4 Cores
4564.4
                           


reactivate rearm windows eval licence

slmgr /rearm
reboot windows

slmgr /dlv
displays detailed info about licence