Translate

Total Pageviews

My YouTube Channel

Wednesday 31 December 2014

Check who is Connected with the VM and Disconnect the Connection

There are two ways to connect with the Guest Operating System:-
1. vSphere Web Client > vCenter Server > Select ESXi Host > Select VM > Open Console.
and then you can check the sessions and terminate the session when you will terminate the session from here then it will terminate the VM console as well.
2. RDP Client > Connect with VM through IP or Name.
Run the command quser or tsadmin to view the session and then from the tsadmin console you can terminate the particular session

Generally Second Option is used by the system admins and first option is used by the vmware admin to access the guest os.

Tuesday 30 December 2014

The esxcli network nic down/up commands fail to restart a NIC (2002233)

Details

  • Using the esxcli network nic down and esxcli network nic up commands fails to restart a physical network adapter that is connected to an HP Virtual Connect Flex-10 Ethernet Module and is in a non-standard speed mode or a physical network adapter that resides in a Cisco UCS sever.
  • Using the esxcli network nic down and esxcli network nic up commands fails to restart a physical network adapter that is connected to an Emulex OneConnect 10Gb UCNA and is in a non-standard speed mode or a physical network adapter that resides in a IBM Blade Center Server.
Another command that does not work with a HP Flex-10 or Cisco UCS network adapter is the esxcli network nic set -n vmnicX -a for autonegotiating the speed of an adapter with sequence number X.
This issue has been observed on  IBM Blade Servers utilizing the Emulex OneConnect 10Gb UCNA as well.
Errors that will be reported in the vmkernel.log file:
2013-10-23T05:41:42.588Z cpu36:10220)Uplink: 8603: Setting link down on physical adapter vmnic7.
2013-10-23T05:41:42.588Z cpu36:10220)Uplink: 8634: Requested link speed/duplex 0x9c4/0x2 is not valid.

Solution

Use these commands only with the network cards running auto-negotiation/10Mb/100Mb/1000Mb/10000Mb speeds. Do not use these commands on a  HP Flex-10Cisco UCS  / IBM Blade Center Server, Emulex OneConnect 10Gb UCNA network adapter with non-standard speed. These commands do not support HP Flex-10, Cisco UCS, Emulex OneConnect 10Gb UCNA and other cards with non-standard speeds.
  • To change the link state of the physical interface to down:

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

    esxcli network nic up -n vmnicX
  • To auto-negotiate the speed of an adapter:

    esxcli network nic set -n vmnicX -a 
Source KB:-
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2002233&src=vmw_so_vex_ragga_1012

Sunday 28 December 2014

vCAC Loading Tenant Info but now showing anything

When i was delivering the vCAC Session then while doing the lab one of my client did mistake in vCAC appliance configuration and then when i findout the issue it was misconfiguration of details those were needed for the certificate generation after rectifying the mistake default tenant info become visible.


Hope this will be helpful for everyone in resolving same kind of issue.

What's New in Site Recovery Manager 5.8?

VMware vCenter Site Recovery Manager 5.8 provides the following new features.

Integration of the Site Recovery Manager UI in vSphere Web Client.

VMware SRM 5.8 now added the plugin for the vSphere Web Client that means now you can use vSphere Web Client to manage the VMware SRM 5.8.

Saturday 27 December 2014

VMware vCenter Server shows VMware ESXi 5.x host with Lockdown Mode enabled when it is not enabled (2017394)

Symptoms

  • VMware vCenter Server shows Lockdown Mode as enabled, but is disabled on the host.
  • vCenter Server continues to show the incorrect status for the host even after:

    • The vSphere Client is restarted.
    • The host management services are restarted.
    • The VirtualCenter Server service is restarted.
    • The host is removed and re-added to the vCenter Server inventory.
  • This issue occurs when using Autodeployed ESXi 5.x hosts.
  • If the host is restarted, Lockdown Mode is disabled, but vCenter Server shows that it is enabled.
  • Changing Lockdown Mode from vCenter Server fails with the error:

    A general system error occurred: Invalid fault
    Call "HostSystem.EnableAdmin" for object "esxi host FQDN" on vCenter Server

Cause

This issue occurs because vCenter Server enables and disables Lockdown Mode for the ESXi hosts, without checking the current Lockdown status of the host to determine the current state. This means if vCenter Server (through the vSphere Client) puts a host into Lockdown Mode and the Direct Console User Interface (DCUI) is used to take the host out of Lockdown Mode, vCenter Server is not notified of the state change and still operates as if the host is in Lockdown Mode.
 
 

Resolution

This is a known issue.

Currently, there is no resolution.
 
To work around this issue, enable Lockdown Mode to make it consistent with vCenter Server and then disable Lockdown Mode through vCenter Server.

To enable Lockdown Mode from the DCUI:
  1. Log in directly to the ESXi host.
  2. Open DCUI on the host.
  3. Press F2 for Initial Setup.
  4. Toggle to Configure Lockdown Mode setting.
To enable Lockdown Mode from the ESXi command line:
Check if Lockdown Mode is enabled, run the command:

vim-cmd -U dcui vimsvc/auth/lockdown_is_enabled
  • To enable Lockdown Mode, run the command:

    vim-cmd -U dcui vimsvc/auth/lockdown_mode_enter
  • To enable Lockdown Mode from the PowerCLI: 

    Run the command:

    (get-vmhost hostname | get-view).EnterLockdownMode() get-vmhost | select Name,@{N="LockDown";E={$_.Extensiondata.Config.adminDisabled}} | ft -auto Name LockDown

    Note: If Lockdown Mode is disabled in DCUI, running the PowerCLI command creates a task in vCenter Server, but the task can fail with the message:

    The Administrator permission is already disabled on the host (Except for the vim user)
  • In My case i ENABLED it from DCUI and DISABLED it using vSphere Client/vSphere Web Client but from the client i connected with vCenter. 
  • Source KB:-
  • http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2017394&src=vmw_so_vex_ragga_1012  

Monday 22 December 2014

Format of the ESXi 5.x vmksummary log file (2004566)

Purpose

This article provides information about the format of the ESXi 5.x vmksummary.log file.
 
Note: This article pertains to ESXi 5.x. For information about other versions, see Heartbeat messages in an ESX /var/log/vmksummary log file (1009016).

Resolution

The ESXi 5.x log file /var/log/vmksummary.log contains information regarding ESXi host startup and shutdown, and an hourly heartbeat with uptime and other metrics.

Startup and Shutdown

The vmksummary.log file contains bootstop messages indicating startup and shutdown of the ESXi host. For example:
  • yyyy-mm-ddThh:mm:ssZ bootstop: Host has booted
  • yyyy-mm-ddThh:mm:ssZ bootstop: Host is rebooting
  • yyyy-mm-ddThh:mm:ssZ bootstop: Host is powering off
  • yyyy-mm-ddThh:mm:ssZ bootstop: Host is halting

Hourly Heartbeats

Every hour, a heartbeat message is written to the vmksummary log. This information can be useful to indicate the liveliness of the ESXi host and its logging, or to review virtual machine quantities or component memory usage over time.
  • yyyy-mm-ddThh:mm:ssZ heartbeat: up UPTIME, NNN VMs; [memory leaderboards]
Memory usage leader boards show the three userworld processes on ESXi which have the highest resident, non-swapped memory usage:
  • Absolute usage measured in kilobytes: [PID ProcessName nnnkB]
  • Usage as a percentage of maximum allocation for the group: [PID ProcessName nnn%max]

    Note: Process names are truncated to 16 characters.
For example:
  • 2011-08-30T04:00:01Z heartbeat: up 0d17h24m17s, 0 VMs; [[3411 sfcb-pycim 12516kB] [3041 vpxa-worker 12668kB] [2723 hostd-worker 33844kB]] [[3348 sfcb-vmware_int 2%max] [3423 sfcb-vmware_bas 5%max] [3411 sfcb-pycim 16%max]]

Coredump Reporting

During ESXi host startup following a purple diagnostic screen, the host checks for new contents in the configured Diagnostic Partition on disk. For more information, see Collecting diagnostic information from an ESX or ESXi host that experiences a purple diagnostic screen (1004128)and Configuring an ESX/ESXi host to capture a VMkernel coredump from a purple diagnostic screen (1000328).
  • yyyy-mm-ddThh:mm:ssZ bootstop: Core dump found

Performing common virtual machine-related tasks with command-line utilities (2012964)

Purpose

This article provides a side-by-side comparison of performing virtual machine-related tasks using different VMware utilities and command line methods.

Resolution

In these examples:
  • vcenter is your vCenter Server hostname
  • esxhost is your ESX/ESXi hostname
  • datastore is the display name of your datastore
  • path_to_vmx_on_datastore is the path to the virtual machine's vmx file relative to the datastore on which it resides
  • vm_name is the display name of a virtual machine
  • path_to_vmx_file is the full path to a virtual machine's vmx file
  • snapshot_name is the name given to a virtual machine snapshot
  • guest_admin_user is a user account with administrative access within a virtual machine's guest OS
  • guest_admin_password is the password for the account noted by guest_admin_user
PowerCLI
vMA
cli
Register a VM
New-VM –vmfilepath “[datastore]path_to_vmx_on_datastore” –vmhostesxhost
vmware-cmd --server esxhost –s register path_to_vmx_file
vmware-cmd --server vcenter --vihostesxhost –s register path_to_vmx_file
vim-cmd solo/registervmpath_to_vmx_file
Unregister a VM
Remove-VM vm_name
vmware-cmd --server esxhost –s unregister path_to_vmx_file
vmware-cmd --server vcenter --vihostesxhost –s unregisterpath_to_vmx_file
vim-cmd
vmsvc/unregister vmid
Delete a VM
Remove-VM vm_name -deletepermanently
vmware-cmd --server esxhost –s unregister path_to_vmx_file
vmware-cmd --server vcenter --vihostesxhost –s unregisterpath_to_vmx_file vifs --serveresxhost --rm “[datastore]path_to_vmx_on_datastore
vim-cmd vmsvc/destroy vmid
Get a listing of VMs on a host
Get-VM –location esxhost
vmware-cmd –-server esxhost –-username root –l
vmware-cmd --server vcenter –-vihost esxhost -l
esxcli vm process list
vim-cmd vmsvc/getallvms
Determine if a VM has a snapshot
Get-VM –name vm_name | Get-Snapshot
vmware-cmd --server esxhostpath_to_vmx_file hassnapshot
vmware-cmd --server vcenter --vihostesxhost path_to_vmx_file hassnapshot
vim-cmd vmsvc/get.snapshotvmid
Take a snapshot of a VM
Get-VM –name vm_name | New-Snapshot –name snapshot_name
vmware-cmd --server esxhostpath_to_vmx_file createsnapshotsnapshot_name
vmware-cmd --server vcenter --vihostesxhost path_to_vmx_filecreatesnapshot snapshot_name
vim-cmd vmsvc/snapshot.create vmidsnapshot_name
Remove a snapshot of a VM
Get-VM –name vm_name | Get-Snapshot –name snapshot_name | Remove-Snapshot
vmware-cmd --server esxhostpath_to_vmx_file removesnapshots
vmware-cmd --server vcenter --vihostesxhost path_to_vmx_fileremovesnapshots
vim-cmd vmsvc/snapshot.remove vmid
Get the current power state of a VM
Get-VM –name vm_name
vmware-cmd --server esxhostpath_to_vmx_file getstate
vmware-cmd --server vcenter --vihostesxhost path_to_vmx_file getstate
vim-cmd vmsvc/power.getstate vmid
Get the uptime for a VM
Get-Stat -entity vm_name -stat sys.uptime.latest -MaxSamples 1
vmware-cmd --server esxhostpath_to_vmx_file getuptime
vmware-cmd --server vcenter --vihostesxhost path_to_vmx_file getuptime
vim-cmd vmsvc/get.summaryvmid |grep uptimeSeconds
Power on a VM
Start-VM –vm vm_name
vmware-cmd --server esxhostpath_to_vmx_file start
vmware-cmd --server vcenter --vihostesxhost path_to_vmx_file start
vim-cmd vmsvc/power.on vmid
Shutdown a VM
Shutdown-VMGuest –vm vm_name
vmware-cmd --server esxhostpath_to_vmx_file stop soft
vmware-cmd --server vcenter --vihostesxhost path_to_vmx_file stop soft
vim-cmd vmsvc/power.shutdown vmid
Power off a VM
Stop-VM –vm vm_name
vmware-cmd --server esxhostpath_to_vmx_file stop hard
vmware-cmd --server vcenter --vihostesxhost path_to_vmx_file stop hard
esxcli vm process kill –wworld_id
vim-cmd vmsvc/power.offvmid
Reboot a VM
Restart-VMGuest –vm vm_name
vmware-cmd --server esxhostpath_to_vmx_file reset soft
vmware-cmd --server vcenter --vihostesxhost path_to_vmx_file reset soft
vim-cmd vmsvc/power.rebootvmid
Reset a VM
Restart-VM –vm vm_name
vmware-cmd --server esxhostpath_to_vmx_file reset hard
vmware-cmd --server vcenter --vihostesxhost path_to_vmx_file reset hard
vim-cmd vmsvc/power.resetvmid
Upgrade VMware Tools in a VM
Update-Tools –vm vm_name
N/A
vim-cmd vmsvc/tools.upgradevmid
Display the IP address of a VM
Get-VMGuestNetworkInterface –vmvm_name -guestuserguest_admin_user -guestpasswordguest_admin_password
vmware-cmd --server esxhostpath_to_vmx_file getguestinfo ip
vmware-cmd --server vcenter --vihostesxhost path_to_vmx_file getguestinfo ip
vim-cmd vmsvc/get.guestvmid |grep -m 1 "ipAddress = \""

Additional Information

The VMware vCLI can also be used. The commands are almost the same as the vMA commands, but vmware-cmd and vifs are vmware-cmd.pl and vifs.pl, respectively.
For more information about VMware scripting solutions, see:
Note : The vim-cmd command is not supported.
Source:-
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2012964&src=vmw_so_vex_ragga_1012