Friday, March 18, 2016

VMware Host Client uility: ESXi Embedded Host Client

The VMware Host Client is an HTML5-based client that is used to connect to and manage single ESXi host directly from web browser. It can be used to perform administrative tasks to manage host resources such as virtual machines, networking, and storage. The VMware Host Client can also be helpful for troubleshooting individual virtual machines or hosts if vCenter Server and the vSphere Client are unavailable.

The ESXi Host Client is part of ESXi 6.0 Update 2 now: Earlier it was available as a ESXi Embedded Host Client Fling only, so we have to install it before connecting to host via browser (supported for ESXi5.x and later).
The utility is bundled as a vib and can be installed on ESXi host via SSH without the need to reboot the host.
To use it on earlier versions of ESXi (prior to ESXi 6.0 Update 2), download and upload the Host Client VIB to any accessible datastore and then connect to host using putty and run following command,
#esxcli software vib install -d /vmfs/volumes/datastore1/esxui-signed-3623722.vib  

In case you downloaded the offline bundle, then

#esxcli software vib install -d /vmfs/volumes/datastore1/
Once the VIB is installed, you simply just point your web browser to the following URL to access the host,

https://ESXi_HostName_or_IP/ui/ For ESXi 5.5U2 and prior, and ESXi 6.0 hosts upgraded from any 5.5U2 or prior version, you will get a 503 error returned after visiting https://ESXi_HostName_or_IP/ui/. its a known issue and to resolve it, please remove the line starting with /ui from /etc/vmware/rhttpproxy/endpoints.conf and restart rhttpproxy with /etc/init.d/rhttpproxy restart
For ESXi 5.5U2 and prior hosts, you must ensure to append a trailing / (forward slash) to the URL after /ui. The URL must be https://ESXi_HostName_or_IP/ui/
In case if you want to remove the ESXi embedded host client from your ESXi host, then

#esxcli software vib remove -n esx-ui

In vSphere 6.0 Update 2, VMware continues to support the vSphere Client, but you now have the option of using the VMware Host Client instead of the vSphere Client to perform similar host-based operations.

VMware Host Client Features

The VMware Host Client 1.0.0 functions include, but are not limited to the following operations:
  • Support for the latest hardware version.
  • Basic virtualization operations, such as deploying, configuring, and editing virtual machines of various complexity, including console access to the virtual machines.
  • Creating and managing network and datastore resources.
  • Displaying current host and resource settings, including graphs of performance and utilization, and logs of host components to help troubleshooting.
  • Advanced tuning of host level options to improve performance.
Full Release Notes is available here: VMware Host Client Release Notes

That's it... :)

Wednesday, March 16, 2016

VM has network connectivity but network card showing as disconnected, having red cross on it

In this post I will talk about this minor issue where, System has network connectivity but network card showing as disconnected, having red cross on it.

Earlier I had seen this problem and drafted a blog post about it but never posted until recently when one of my friend faced the same issue but couldn’t find its cause/fix.

Now coming to the point, you might have seen this where you deployed a VM from template or rebooted a system and when the VM came up, you are able to connect to it but its network card in notification area having red cross on it (appearing disconnected).

If you would check from connectivity point of view, you wouldn’t find anything wrong here however most of the time you would like to get rid of this red cross sign.

If you would further investigate about the issue, then you will find this in Network and Sharing Center,

Here to fix this, you just need to check the status of  “Network Location Awareness service”, in this case either its stopped or set to disabled. This service should be set to automatic and in started state. 

As this issue was caused by a windows services so I don't think its specific to VM only, you might see this issue on a physical Windows system as well.

Note: “Network Location Awareness service” is responsible to collect and stores configuration information for the network and notifies programs when this information is modified. If this service is stopped, configuration information might be unavailable. If this service is disabled, any services that explicitly depend on it will fail to start. 

That’s it… :)

Unexpected AD Account Lockouts When Logging On to Outlook

Today one of my friend asked me a AD account lockout related question, i.e. "there are two users and when they open outlook on their system, their AD accounts getting locked out automatically".

In such kind of cases, most of the time the issue is caused by a saved password, where user recently changed his account password but somehow outlook is not asking for new password and trying to connect using the old saved credentials instead.

To fix this account lockout issue, what one need to do is....remove the saved credentials from the system where your outlook account is configured.

To do so, Go to Start=> Control Panel => Credential Manager 

or open, Run => control keymgr.dll , this will also open the Credential Manager

You will find any saved credentials here,

Here Edit or Remove the saved outlook credentials and this will fix the AD account lockout issue. 

Alternatively we can do the same by using this method,

Click Start, Run => rundll32.exe keymgr.dll, KRShowKeyMgr (case sensitive)
 This will open the Stored User Names and Passwords window,
from here you can Edit/Remove or Add new credentials as well as Backup or restore the saved 

Update: As per my discussion with a fellow Sys admin, Removing the credentials from Credentials Manager doesn't necessarily remove them from Key manager so sometimes we also need to check and remove the same from Stored User Names and Passwords. I am not sure if it's true as never seen this behaviour.

That's it... :)

Wednesday, March 9, 2016

Windows 7 VM auto suspend issue- reason and fix

Last day one of my colleague built a new VM with Windows 7 guest OS and after some time he noticed, once he logged off from this VM, its being automatically suspended after some time.
As he couldn't figure out the issue so asked me to take a look at this newly created VM to figure out why its being suspended automatically every now and then. When I checked, found the VM in suspended state, when taken a look at related task & events from vSphere client, couldn’t find anything in tasks however found suspend events under event tab.

However I couldn’t find any specific reason for this auto suspend from VMware end, then I logged in on to the Guest windows 7 OS  to check from inside the VM and started digging  System event logs and came across this,
Here it clearly mentioned, system was entered in sleep mode because it was ideal… what’s now…. Here we need to check from inside the guest, if the power plan for the Windows 7 is set to move the system to sleep if system is ideal for a specified time.

Now go to power options, Control Panel => Power Options => Click on Change when the computer sleeps
as you can see  here, this VM was set to enter in sleep mode if the system is ideal for 15 minutes.

Now what we need to do is,  set "Put the computer to sleep" to "Never" and you are done.

Note: I believe the same will be applicable for Windows 8 or any other client OS VM too.

This power plan setting is something that's by default set to never on server operating systems and that is why we never faced such issue with Server VMs.

That's it... :)

Wednesday, March 2, 2016

Uploading ESXi image to vSphere Update Manager failing with the error: Failed to import data

When it comes to ESXi host patching, I am a big fan of VMware Update Manager as it makes the upgrade process flawless. Using VUM, you just need to create upgrade baseline, download patches then attach baseline to host and finally stage/remediate the patches then update manger will initiate the patch installation and reboot the host once done.

Now coming to the point, we had few ESXi 5.0 hosts and wanted to upgrade them to ESXi5.1 update3 so I thought of upgrading them using VUM instead of command line.

As most of us know, to upgrade ESXi on an host using VUM, one first need to download ESXi iso image and import it to VUM ESXi image repository, here while trying to import the ESXi5.1 image to update manager5.5’s ESXi image repository, ESXi image import failed with below error,
"Failed to import data, The uploaded upgrade package cannot be used with VMware vSphere Update Manager"
I was aware about the fact that one need to upgrade the version of VUM before importing a newer image to update manager repository as the minimum version of VUM required should match the version of the ESXi image you are trying to import but here I was trying to upload ESXi5.1 image to VMware Upgrade Manager 5.5 and unable to do so. I tried with different ESXi5.1 images like Cisco or HP’s customized images as well as standard VMware ESXi5.1 image but the end result was same however when tried to import ESXi5.5 image to VUM, was able import it without any issue.

This is something that was very strange for me so started looking for the cause of this issue and my search end on the VMware KB articles# 2009812if you would see the Note section of this KB, its clearly mentioned there,

“ You must use the same version of vSphere Update Manager to upgrade to the corresponding version of ESXi

Later I checked with VMware support about this and they also confirmed the same.
Related KB article: 2097168

That’s it… :)