How-to get SNMP Data from VMWare ESXi 5 with Dell OpenManage, Cacti, Nagios, Munin or Ganglia

 

So you want to access your VMware ESX 5 host over SNMP? Here is the quick steps to get Dell OpenManage and SNMP on your ESX 5 host up and running fast.  You will need the VIB’s from Dell, also will need to download and install the VMware CLI client for accessing ESX hosts from remote. For the SNMP setups below we are using a generic password inside of quotes(“password”) you should remove the quotes and place the root password of the esx host where you see the quoted password text. We also are setting up SNMP to send traps to 192.168.24.120, you will need to change this to any host you want to receive traps. You will need to replace the server IP address with the address of your ESX5 host. If you use network monitoring applications like Cacti, Nagios, Munin or Ganglia then this is just what you need to start capturing network statistics and graphs.

 

Steps  to install OpenManage.

  1. Downloaded OpenManage VIB from Dell http://www.dell.com/support/drivers/us/en/g_5/DriverDetails/DriverFileFormats?DriverId=N3R0H&FileId=2773322235
  2. Uploaded VIB to ESX host and placed in /var/log/vmware/
  3. SSH to host as root
  4. ran command esxcli software vib install -d /var/log/vmware/OM-SrvAdmin-Dell-Web-6.5.0-542907.VIB-ESX50i_A02.zip
  5. After software install, I rebooted the host.

Steps to configure SNMP

  1. Started vmWare CLI
  2. vicfg-snmp.pl –server 192.168.24.10 –username root –password “password” -c public
  3. vicfg-snmp.pl –server 192.168.24.10 –username root –password “password” -t 192.168.24.120@161/public
  4. vicfg-snmp.pl –server 192.168.24.10 –username root –password “password” -E
    Current SNMP agent settings:
    Enabled  : 1
    UDP port : 161
    Communities :
    public
    Notification targets :
    192.168.24.120@161/public
    Options :
    EnvEventSource=indications

Openmanage Web Interface:

  1. Download OpenManage Server Administrator Managed Node http://www.dell.com/support/drivers/us/en/555/DriverDetails/DriverFileFormats?DriverId=R300521
  2. Navigate to https://localhost:1311, type in ESX host IP address, login and password.
  3. You should be able to view the all the good stuff like “Main System Chassis”, Software, Storage

 

I hope this helps someone out there in cyber space!

Cubert 😎

[How To] – Patching Standalone vSphere 5 ESXi Hosts

So you have a standalone ESXi host or 2 that needs to be patched with the latest updates coming out of VMWare and you do not have a VCenter or are otherwise using the VMWare Update Manager. Here is the basic steps to get you updated and all patched up.

 

 Here are the steps to getting your ESXi 5 Host patched.

  1. Download the patch file you want directly -> Get VMware Patches Here
  2. Enable SSH for remote support on the ESXi Host by accessing the (Security Profile) under Host Configuration.
  3. Place ESXi host is in Maintenance Mode.
  4. Using the vShpere Client browse your local datastore and make a directory called “Updates”, select this new folder and upload the patch zip file bundle to this folder.
  5. SSH into Host and execute the following command.  (Replace [DATASTORE] and [PATCH_FILE] with your actual file information.

 

esxcli software vib install -d /vmfs/volumes/[DATASTORE]/Updates/[PATCH_FILE].zip

You should get the following installation result.

   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.

Afterwards you should reboot the ESX host and upon it’s return it should now be patched with the build you applied above.

NOTE: If you try and use the old esxupdate command, which  is still there, you will get this message:

~ # esxupdate Usage: This program is not meant to be used directly. Please use esxcli image/software instead.
esxupdate: error: Command must be specified Usage: This program is not meant to be used directly. Please use esxcli image/software instead.

 
 

Fix: Remove all snapshots Unable to access file since it is locked

Solved!

You are running ESX and have a VDR or 2 setup to do backups? Somewhere the VDR was rebooted or stopped working during backup and now has left snapshots on you VMs. You try to manually remove the snapshots and BAMB!

Error: Remove all snapshots  Unable to access file <unspecified filename> since it is  locked.

Here is how to fix it:

Shutdown your VDRs and then try to remove your snapshots. If they fail to remove then take another snapshot then try using the removing all “Delete All”  function. This is a safe process at this point, the delta files are not deleted until the successful merge of the delta and the flat file. This means if it fails you should still be no worse off than you are currently, no data was lost.

Now once all snaps are deleted, you may get a similar error trying to start your VDR. The VDR mounts the VM disks and does it’s backup . The mounts may still exist and this will cause the VDR issues booting.  Edit the settings in the VDR and look for Hard disks 2+ and remove them from the VM (Do NOT Delete Then!!! Just Remove them leaving HardDisk1) .

Once all but HardDisk1 has been removed from the VDR VM then reboot the VDR and you should be ready to start backing up again.

 

I hope this helps someone out there..

Cubert.

RetrieveStorageInfo request is ignored because the VM is in an invalid state: bad config = false

RetrieveStorageInfo request is ignored because the VM is in an invalid state: bad config = false could be produced as a possible error when the VMX file is invalid. During different activities that the ESX system is doing and during this activity the ISCSI disks are lost or something get in the way where a snaphot or some other process gets funked up. Can leave items in your VMX file that are invalid. When you recover from a loss you may find a system in a “Unknown” state.

Look throught your VMX file for odd spaces or items that may have invalid data in it.

Then re-attach the VM and see if it will showup correctly in your Vcenter server.

How-to: ESX4.1 using Vmotion with Local Host Only Storage

Can you vMotion using local ESX host storage?

 

Oh man the VCPs out there are screaming “No!!! You can’t vMotion Local Storage!”. Oh to the contrary my friend, with a wee bit of ingenuity you can do many things. Now before I go any further I will state the obvious. As any VCP will tell you, you can’t vMotion the local host storage.  But… but.. You can convert the local storage in to shared storage. This is not supported by VMware so do not expect a lot of tech support but let me lay it out for you.

You have several ESX or ESXi hosts running on “Local” storage and have a license in vCenter for the vMotion abilities, but if you don’t want or can’t afford to buy some big ISCSI SANS unit, you will not be able to use your vMotion. The standard Dell Power Vault cost a few pennies and you just don’t have the doe. Here is what you can do.

Virtualize the Local Storage with a SAN VM

 

That’s right!! Create a single VM that consumse all your local storage and let it present ISCSI LUNS back to your ESX hosts.

 

We will build our first VM on the ESX host as a virtual SANdevice. The reason we do the first VM as we will be using it’s storage to build the rest of our VMs on. Leveraging the power of open source software and using the google archive of information on how to setup and use the Openfiler SANS OS is imperative. You want to look at Open Filer. It is a simple ISO image you can run from CD or just mount using NFS or from your vCenter client. It installs very easily and can be configured in less than 20 minutes.

You would build the first VM with all the storage you have available giving this storage then to the Openfiler system to use for your SANS storage. I will not go in to the install of Openfiler here but if you follow the simple instructions you will have a ISCSI SANS with the total amount of available storage of your host system.

You will now have the first host storage shared out as ISCSI and you will connect all hosts via ISCSI to these new LUNs you created in the SANS. See VMware knowledge base for information on how to do this. (It is simple, just outside the scope of this conceptiul article). Now repeat this on all host in your infrastructure. You now have some number of host all with 1 VM installed as a virtual SAN with ISCSI sharing out LUNs to all the host in your infrastructure.

You will now in vCenter set the priority boot options to make sure that the SAN VM is the first to boot and has time to come up and get going before any other VMs boot and you can now install VMs on any of the ISCSI LUNs presented to the hosts.  Do vMotion, Storage vMotion, HA, DRS and the new FT on any of the VMs.

ESX is  available to download as a 60 day full eval, so give it and vCenter a try for sixty days while trying this platform layout. You can use VMware workstation to virtualize the whole thing, from the ESX Hosts to the vSAN VM and any VMs after that. That is also correct… You can virtualize ESX hosts now and then run VMs on those ESX VMs. Is that not just the bomb! I can create and test different ESX deployments inside a VM group inside of VMware workstation.  Build and test complex layouts with out bringing your production environments in to the picture.

Now that I have your mind turning and thinking of all the posibilities, get out and VM something!

Good luck and enjoy…

Cubert

Kaseya 2 Agent procedures and free scripts

 

www.kaseya.com

 

Do you run Kaseya RMM and need some free scripts?

Here is a compilation of scripts I have created for Kaseya to do different tasks, feel free to use them but keep in mind there is no guarantee. Use at your own discretion!

# Blackberry Enterprise Server ( BES

 

www.kaseya.com


 

Do you run Kaseya RMM and need some free scripts?

Here is a compilation of scripts I have created for Kaseya to do different tasks, feel free to use them but keep in mind there is no guarantee. Use at your own discretion!

# Blackberry Enterprise Server ( BES ) server services restart script.

This script uploads a bat file “Blackberry_Restart.bat” that stops and restarts the Blackberry Enterprise server services in the correct order they need to be done. It the writes a event log entry to the local application event log on windows and then to the script log in Kaseya. Lastly it sends a email to help desk to let them know it ran. Download the zip file, unzip and import the XML file into Kaseya then upload the bat file to your public side Kaseya.

BlackberryES_Restart

# Retrieve IE History

Use this script to collect a logged in users IE history. When the boss wants to know what a users been surfing you can run this against the system and have it email all the links the user has gone to.

This script uploads and executes a VB scrpt (iehistory2.vbs) on the remote system that uses NirSoft’s IE History View utility (iehv.exe) to dump IE URL history addresses for all user profiles on the system into a text file (history.txt). The contents of the text file are then captured into a Kaseya variable and emailed to an address or addresses specified in STEP 7.  Download the zip file, unzip and import xml file in to scripts on Kaseay server then upload the vb script and iehv.exe to Kaseya public file store. Edit the Kaseya script at line item 7 and place in your email address.

IEHistory

# VMware VCenter Health Check

The script grabs the basic state of things on your VMware ESX VCenter VSphere server and posts an HTML file to the “get file” area in Kaseya KLC. It uses a PowerTools Shell to collect the data and create the file. Download the zip, unzip and import the XML file it scripts. Upload the ps1 file to Kaseya Public folder and then edit script and locate the file in script and save script. This will update the script with the location of where you saved the ps1 file.

VMWare VCenter Health Check

#Windows Systems CCleaner Script

This script is a great tool for cleaning of temp files and caches from a users profile on any Windows system. The script looks at the system and determines if it is 64 bit or 32 bit, then it downloads the correct ccleaner.exe file and runs it against the system. In auto mode this script does not clean the registry so it is safe to schedule and run on a regular bases. This works on all 32 and 64 it windows including Windows 2008 R2. A user must be logged in for script to run on users profile.

Kaseya-CCLeaner-Script

Look for more of my scripts here on Squidworks.net

Enjoy

Cubert

Error during the configuration of the host: Failed to update disk partition information

VMware ESX 4 -> Failed to update disk partition information.

After creating a new LUN on a Dell MD3000i, I wanted to add the new iSCSI LUN to my ESXi server. Everything went fine, the LUN was presented and the Add storage wizard has found the new LUN. But when i wanted to complete the wizard, the following error came up:

VMware ESX 4 -> Failed to update disk partition information.

After creating a new LUN on a Dell MD3000i, I wanted to add the new iSCSI LUN to my ESXi server. Everything went fine, the LUN was presented and the Add storage wizard has found the new LUN. But when i wanted to complete the wizard, the following error came up:

Now if you go on the Internet a search around you will find several references to this issue. Most if not all of them tell you to:

1. Use fdisk on the /dev/sd[a-z]* device. Create a partition with type 0xfb.
2. Format the VMFS datastore using
vmkfstools -C vmfs3 vmhbaI:T:L:P
In this example, I corresponds to the initiator of the VMware host bus adapter, T corresponds to the target number of the disk, L is the LUN number, and P is the partition number of the newly created partition.

3. Reboot ESX server

This is not always required, It may be just a hickup in your ISCSI registration on the ESX servers. Here is how I fixed mine and it worked with out any reboots or major adjustments.

Steps to take first before following the CLI instructions:

  1. Go create another 5Gb LUN on Power Vault.
  2. Set the access group assigned to new LUN to allow ESX servers
  3. On ESX Host GUI go back to configuration menu and select Storage Adapters menu
  4. Select your ISCSI Software Adapter from Storage Adapter list and select “Rescan” (even if you see your LUN)
  5. Go back to the Storage menu and select add storage, select Disk/LUN and follow through the menus to mount and format the 5gb LUN and it should go through now.
  6. Remove the 5gb LUN from the ESX Storage menu.
  7. Remove the 5gb LUN from Dell Vault.
  8. Go back to your ESX and rescan HBAs and make sure the 5gb LUN is gone and you see your original LUN you want to mount.
  9. Go back to the Storage menu and select add storage, select Disk/LUN and follow through the menus to mount and format the  LUN and it should go through now.

If this does not work then change the access to the LUN on the vault to a new access group. Rescan for LUN on ESX then go reset the LUN back to the original access group you want to use and then rescan again from ESX.  Try to remount LUN and format. This should now connect and no errors should appear. If you still are getting errors then you may have other issues and you can now try the CLI method or call in support.

Good Luck, I hope  this helps a few of you out there from dealing with production systems and not wanting to spend all day VMotioning, reboots and such.

Enjoy