Tuesday, December 18, 2012

Installing Syslog Collector and ESXi Dump Colector for vSphere 5.1

This is not quite as simple as it seems. But, once you know how to do it, it is easy. It took me a couple hours to figure it out.

Of course,  you first need to install these applications on a Windows server. You can use your vCenter Server since they do not take up much space or resources. This part is pretty straight forward.

Once the applications are installed, you must configure your esxi servers. This took me some time to figure out.

For syslog, start by enabling the security port for "syslog" in your firewall settings on each esxi server from the vsphere client. This step is not documented and can easily be overlooked.

Your next step is to go to syslog under "Advanced Settings" on each esxi server. Go to syslog.global.loghost and enter: tcp://<vcenter51 fully qualified server name>:514   This assumes you installed Syslog Collector on your vCenter 5.1 server. If not, use the name of the server you installed it on. And to use port 514.


Once this is done, you will immediately see syslog files being generated.

ESXi Dump Collector is just as easy, but you need to do it from your vSphere Management Server or from the command line on your esxi servers. There is no firewall port to enable for this.

From either vma or the command line on your host, execute the following commands:

> esxcli system coredump network set -v vmk0 -i <ip address where you are running Dump Collector> -o 6500
>esxcli system coredump network set --enable true
>esxcli system coredump network get

The first command tells your host to use the vmkernel port for your Management Port, lets it know the IP address where ESXi Dump Collector is running (probably your vCenter 5.1 Server), and  use port 6500

The second command enables the esxi host to use ESXi Dump Collector

The third command verifies this is working correctly.

Now you have a central location configured for your syslog files and coredumps.

Wednesday, December 12, 2012

Using vSphere ESXi Image Builder

You need to use vSPhere ESXi Image Builder if you want to upgrade you ESX 4 hosts to ESXi5.1. Minimally you will need to build a custom ISO that contains your updated server drivers. If you use 10GB, you will need to add that as well.

One important task is you must add all your offline bundles into a depot and then list the software packages to verify they are there. After that, it is a simple matter to add the software packages into your image. You will need to do this to upgrade your ESXi 4 hosts to ESXi5.1.

The first step is to download your ESXi 5.x depot zip file. If you are creating an image for esxi5.1, it is called: VMware-ESXi-5.1.0-799733-depot.zip. This can be download from VMware's download page. Make sure you download the zip file and not the ISO.

Once your ESXi zip is downloaed, download all the drivers you will need for your ESXi server. If you are using HP servers, you will need the latest drivers (zip) from HP's site. I also needed the Intel 10GB driver.

Download all your drivers and copy them and the ESXi zip file to a folder on your C drive where you are running vSphere PowerCLI.

Once your files are in a folder, look at the properties of each file and make sure it is unblocked.

Assuming you have Power Shell and VMware vSphere PowerCLI5.1 installed , you are ready to go.

Step 1: Open vSphere PowerCLI and run: Add-ESXSoftwareDepot -DepotUrl c:\folder\zipfile
       This will add your offline bundle or ESXi zip file to a depot

Step 2: Repeat Step 1 for all the drivers you downloaded. These must be in the form of a bundle or offline_bundle and have a zip extension. (vib files do not work here). If you do not do this for your downloaded drivers, you will not be able to add them to your image later.

Step 3: Run: Get-ESXImageProfile to list your current profiles. You will have to clone one of these.

Step 4: Now you need to create a new profile by cloning an existing one you just listed. Run the following:
  New-ESXImageProfile -CloneProfile "current profile" -Name "give it a name" -Vendor "Tom"
   -AcceptanceLevel  "CommunitySupported"  ;  Name yourself as the vendor. Use CommunitySupported to avoid not being able to add a software package to your profile. If you run Get-ESXImageProfile again, you should see your newly created cloned profile listed.

Step5: List the software packages and look for the ones from your vendors (ie...HP , Intel, etc....)
  Run: Get-ESXSoftwarePackage  ; Look for the vendor packages and document them

Step 6: Now that you have done all the above, here comes the easy part. Run the following to add your software packages you documented in step 5 to the profile you created in step 4
  Add-SoftwarePackage -ImageProfile "your profile"  -SoftwarePackage "partner-package"

Step 7: You will need to repeat step 6 for every softwre package

Step 8: Export your Image Profile to an ISO. You can use this to install ESXi or upload the ISO into Update Manager to upgrade your existing hosts. I recommend using the name of the ISO -custom.iso For example VMware-VMvisor-Installer-5.1.0-799733.x86_64-custom.iso
Run: Export-ESXImageProfile -ImageProfile "clone created in step 4" -ExportToISO -FilePath "c:\folder\ISO name".