Category Archives: VMWare

Fix: ESXi health status showing unknown and cannot reset sensors

When ESXI 5.1 in vSphere is launched,  you click on the configuration tab and click the system health, you will get all gray question marks on the items and when you click the reset sensors you get the below error.

Call “HostHealthStatusSystem.ResetSystemHealthInfo” for object “healthStatusSystem” on ESXi “esxi_srv01” failed.

To solve this issue you must go on the Configuration, click on the Security profile, click on the Firewall and click on Properties.

Find the CIM-SERVER entry, click on the Options and Restart the service.

Close the vSphere and re-open it. Try to reset the Sensors.

(7888)

How to: Install Hyper-V environment on top of ESXi 5.1 onwards

Of course, mainly this post is related to testing environments where you would need to setup a Hyper-V Cluster on one ESXi virtual server. So we start off by creating the virtual machine as per instructions below.

Create new Virtual Machine
Select Custom type
Enter the name of the Virtual Machine
Select Virtual Machine Version 8

As Guest Operating System select Other
As Version Select Other (64-bit)
Select 2 virtual sockets
Select 2 cores per virtual socket
On the Network Connections select the E1000E as the adapter type

Select the LSI Logic SAS as SCSI Controller

Finish answering any other questions required to create the Virtual Machine. Once it has been created and placed into your inventory, do the following modifications.

Right click on the machine and click on Edit Settings
Go to Options tab and click on General under Advanced Node
Click on the Configuration Parameters button

Click on Add Row
As the name, enter hypervisor.cpuid.v0
As the value enter FALSE

Now under the Options Tab, click on General Options
Change the version of the OS to VMWare ESXi 5.x (Experimental)

Press OK to apply the changes, when ready right-click on the server and select Upgrade Virtual Hardware

Now browse the data-store and edit the VMX file of the virtual Machine

On the guestOS parameter enter "winhyperv"

At the very end of the file enter the below line:

featMask.vm.hv.capable = "Min:1"

Now upload the edited VMX file. Start the machine and install Hyper-V and virtual machines.

(10084)

How To: Setup a USB drive on a guestVM on an ESXi server

When you need to setup a USB hard drive or pen to an ESXi 5 onwards, it doesn’t supported directly. You need to setup a controller and add the USB device. To do so follow the below instructions, in the vSphere Client.

Setup USB Controller
Log onto the server.
Right click on the guest machine and select Edit Settings.
Click on the Add Button.
Select USB Controller and click OK.
On the Controller type screen, click OK.
Click OK to exit the Virtual Machine settings page and affect the changes.
This will setup the controller.

Setting up the USB Device
Plug in the desired device.
Right click on the guest machine and select Edit Settings.
Click on the Add Button.
Select USB Device and click OK.
On the next screen you should see the USB drive in the list of devices.
Select the device and click OK.
Click OK and OK to affect changes.

Open your virtual machine and you should see the USB drive in your computer.

(449)

Fix: VMWare VirtualCenter server service is stopped with event ID 1105

When making a backup of a VMWareCenter server and noticing that the VMWare VirtualCenter Server service is stopped and in the event viewer you will have the below log, it means that the SQL database of the VCenter Server is full and reached the SQL Express limit of 4GB or more.

Log Name: Application
Source: MSSQL$SQLEXP_VIM
Date: 06/06/2012 14:14:48
Event ID: 1105
Task Category: (2)
Level: Error
Keywords: Classic
User: SYSTEM
Description:
Could not allocate space for object
‘dbo.VPX_HOST_VM_CONFIG_OPTION’.'PK_VPX_HOST_VM_CONFIG_OPTION’ in
database ‘VIM_VCDB’ because the ‘PRIMARY’ filegroup is full. Create disk space by deleting
unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or
setting autogrowth on for existing files in the filegroup.

To fix this, follow the below solution:

– Stop the VMWare VirtualCenter Server service (Note, this will not stop the virtual machines)
– Open the SQL Management Studio
– Log into the SQL instance SQLEXP_VIM
– Open the table VPX_PARAMETER from the table VIM_VCB and set the fields below with the value specified

event.maxAge - 30
event.maxAgeEnabled - true
task.maxAge - 30
task.maxAgeEnabled - true

Open a new Query, type and execute the following:

USE VIM_VCB
EXEC cleanup_events_tasks_proc

Once completed, right click on the database VIM_VCB and select Tasks/Shrink/Database and one the Shrink window, select OK.

Once finished, start the VMWare VirtualCenter Server service and vuala!

(15512)

How to: Setup ESXi alerting monitor with email notification

Many times I wanted to see if I could send a notification by mail about the status of my ESXi machines. There seems to be a solution by using PERL and VMWare VSphere CLI. Firstly you will need to download and install the PERL and VMWare VSphere CLI and here are the links to download them.

Note: This is for the free ESXi version

PERL
http://strawberryperl.com/

VMWare VSphere CLI
https://my.vmware.com/group/vmware/details?downloadGroup=VSP510-VCLI-510&productId=285

After you download the above, install them. It’s simple as it’s just Next, Next, Next.

Now to create the batch file script. Use the following to send an email of the ESXi server with all the information including alerts.

"C:\Program Files\VMware\VMware vSphere CLI\Perl\bin\perl.exe" script.pl --server [serverip] --username [username] --password [password] --mailhost [smtpserver] --maildomain [domain name] --mailfrom noreply@myserver.com --mailto reports@mydomain.com;otheruser@mydomain.com

If you want to send only an email with alerts (if there are) use the following batch file script

"C:\Program Files\VMware\VMware vSphere CLI\Perl\bin\perl.exe" script.pl --server [serverip] --username [username] --password [password] --mailhost [smtpserver] --maildomain [domain name] --mailfrom noreply@myserver.com --mailto reports@mydomain.com;otheruser@mydomain.com --cpuwarnpc 85 --memwarnpc 85 --dswarnpc 25 --dscriticalpc 10 --warnofsnapshots --warnonchange --warnonalerts --concise --logfile esx-health.log --statusfile esx-health-status.txt

Note: The script is looking for the perl.exe under the VMWare CLI. If you change the location of the CLI installation, change the first part of the script.

Script download: http://noelpulis.com/files/esxi_monitor_script.zip
Source: http://blog.peacon.co.uk/hardware-health-alerting-with-esxi/

(12455)