Sunday, 6 December 2015

Upgrading ESXi Host Via Update Manager

Written by Suhas Savkoor



If you have Update Manager (VUM), you can upgrade/patch your ESXi host using it. For GUI lovers, VUM seems to be an easy way out. 
My ESXi host is Currently 5.5 Build 1331820. This Build corresponds to 5.5 GA. You can find out about VMware Build numbers from this link


Step 1:

Select the host and click Update Manager tab. Under the baseline section notice that I do not have anything. Click the Admin View option.



Step 2:
Click ESXi Images and select Import ESXi Image.


Step 3:
Browse to the Datastore and Upload the file and click Next



The ESXi image upload will take a quick minute or two. 



Once the upload is done, click Next and Provide a Baseline Name for this ESXi ISO that was uploaded. Here, the baseline name given is Host_Upgrade. Click Finish



Step 4:
Go back to Compliance View. Right Click the ESXi host and Select Enter Maintenance Mode. Once the host enters maintenance mode, click Attach and check the baseline that was just created with the ESXi image. Click Attach 


Step 5:
Click Scan and Check Upgrades. Once the Scan task is complete the compliance status should come up as Non Compliant (Red)


If it comes up as Incompatible, then reboot the host and perform the Scan again. 

Step 6:
If HA is enabled on the cluster, then Disable HA prior to performing the Remediate option. Once the HA is disabled for the cluster where this ESXI host was, click Remediate


Step 7:
This is a simple wizard driven process with no changes required.
  • First, verify the baseline is seen Under Baseline section of Remediate wizard. Click Next
  • Accept End User License Agreement. Click Next.
  • Enter a Task Description. Click Next.
  • Uncheck DPM if it is enabled for any of the selected Clusters option. Click Next. Review and Finish.




if you observe the upgrade by opening a KVM console to the server hosting this ESXi you will see the upgrade in process.



The upgrade takes about 10-15 minutes and you can verify the upgrade by observing the updated build number.



Simple isn't it?

VDP 6.0.1: Server has a weak ephemeral Diffie-Hellman public key

Written by Suhas Savkoor



When you deploy a 6.0.1 VDP appliance in your vCenter, you configure it by going to the VDP configuration page.

               https://<vdp_ip>:8543/vdp-configure

Then, you receive this classic message, "Server has a weak ephemeral Diffie-Hellman public key"



5 simple steps to fix this issue:

Step 1:

SSH / Open Console to the VDP Appliance.
The Username is: root
Default Password: changeme



Step 2:

Change your directory to:

Open server.xml



Step 3:

Locate the following lines:





Step 4:

Replace them with the following lines: Press " i " to begin edit



Save changes by Pressing Esc and then :wq

Step 5:

Reboot the VDP appliance and login again to the management web page.
This time, you will be able to login to the web page without the Error.

Saturday, 5 December 2015

Configuring Serial Port For A Virtual Machine

Written by Suhas Savkoor



You can use virtual ports to send debugging data from a virtual machine to the host system or to another virtual machine.

In this video, I have configured Serial Port for two Windows 2008 virtual machines, and I am testing them by echoing a ext message to the configured COM port, COM1



Click this link for, Configuring Serial Port for a Loop-Back

Friday, 4 December 2015

Check For Virtual Machine Memory Reservation From Inside the VM's Guest

Written by Suhas Savkoor



If we wanted to check whether we have any memory reservations done for the VM, we go to the virtual machine's Edit Settings and under Resources tab we will be able to see the CPU and memory reservations. 

Now, I came across this issue when I was working with a customer:

The customer was trying to install a Mobile View software on his Windows virtual machine and this software was checking for memory reservation on the VM. 
This was very "peculiar" indeed, and we were having a discussion regarding how a virtual machine works. The discussion included that the virtual machine is not aware that it is actually virtual. It thinks that it is a physical machine and continues to behave like one. 

But the question remained, how the software was able to check memory reservations. The installation would not proceed further and would pop a error, "Not enough memory reserved" 

Then, I questioned, what about VMware tools? Can the guest query VMware tools for memory reservations done on it? 

Well, it turns out it can query VMware tools for this information.

Open a Command prompt from the VM:

For Memory Reservation:

Change Directory to 
C:\Program Files\VMware\VMware Tools

Run the command 

For CPU Reservation:

Change Directory to 
C:\Program Files\VMware\VMware Tools

Run the command 

The output is something as seen below:


So the guest does know!!

Configuring vSphere Web Client On A Custom Port

Written by Suhas Savkoor



During installation of Web Client you will come across a step in the wizard for configuring the port. The default https port used is 9443

Now, you decide that you want to change this https port to a custom port of your choice. Do you really want to reinstall web client? Not a wise choice. You can perform a little tweak to change this.

All you need to do is edit the Web Client configuration file.

Where is this file located?

C:\Program Files\VMware\Infrastructure\vSphereWebClient\server\configuration

Make a copy of the tomcat-server.xml file. Then, edit the original file.

And what to edit here?

Locate the following line

<Connector port="9443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="500" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" 

And change the 9443 Port value to the required unused port. I changed it to 9444

Once the change is done, go ahead and restart the Web Client Service.

Then login to web client and there you go you have your own Custom port. 

Thursday, 3 December 2015

VPXD Process Reports 100 Percent CPU Usage

Written by Suhas Savkoor



In task manager, you notice the VMware vpxd.exe process is using almost 100 percent of CPU and also a high memory usage. Sometimes, this also hinders you from logging into vCenter Server via a vSphere client saying the application took too long to respond.

What do we do in this case? We might end up rebooting the vCenter machine, and it might work good for sometime, but then again after a couple of hours or days it might start throwing up this 100 percent CPU usage causing lethargic behavior.

What did I do when I came across this issue? Well, the vCenter Logs is what came to the rescue.

From the vCenter vpxd logs located in:
C:\ProgramData\VMware\VMware VirtualCenter\Logs\vpxd-X.log



Here, we have excessive calls being done to the Performance Manager API and this causing the vpxd.exe process to consume 100 percent CPU.

Here we see, we have a process ID 3b863d5f-99a5-f4d0-0cce-667f34d1c3a4  Now what we need to do is track which process ID is this or a source making this repeated API Calls. 

For this, we need to open the vpxd-profiler.log (Again located in the same directory as your vpxd.log) 

My vpxd-profiler.log looked like this:



Here, we see we have a service account MYCMSC\svc_vdmadmin and an IP 172.25.20.193 making this repeated API calls.

The vpxd-profiler.log also recorded the following information.




CPU usage mean/min and max is 10000, which corresponds to 100 percent

To mitigate this issue, you need to see the service account triggering this API call, and disable/prevent it for access to vCenter. In my case, it was a third party security software making this API call. This software was no where related or required for vCenter, and I went ahead and disabled it, resolving the 100 percent CPU usage.


Free the usage!



Tuesday, 1 December 2015

HTTP 404 Error While Logging Into Web Client

Written by Suhas Savkoor



So, you might have deployed a fresh instance of vCenter and everything is going well. You are able to login to the vCenter using the Windows C# client. Then you think, why not I use web client too, and you open up a browser and enter the vCenter IP and the web client port and it pops up a message saying HTTP 404 Error.


Well, what now?

It looks like this is a known issue with Web Client 5.1 and 5.5. There are a couple of workarounds.

First one:

1. Uninstall and reinstall the Web Client
2. During installation do not specify any specific paths, keep all the values to default.

Unfortunately this did not work for my case. What was happening in my case was, the default installation directory was going to C:\Program Files\VMware.....
Now, this space between Program and Files can cause the HTTP 404 Issue. Note that this won't be the case for everyone.

So in this case, we need to specify a Custom Directory, this brings to next path.

Second One:

1. Uninstall Web Client
2. Reinstall with a Custom directory with no spaces at all. My directory in this case was C:\WebClient

Well, this worked. I gave a couple of minutes for the service to kick in and I was able to login to web Client.

Third One:

If you install Web Client on a different directory, then you will have to perform some additional steps. You will have to create a symbolic link for the registry update.

These steps can be found in this KB.

Well, if you are lucky everything will run well. If not, workarounds save the day.