Reconfiguring NTP settings vCenter-wide

I recently started reinstalling all my ESX hosts, so I wrote up a short script that is reconfiguring all hosts and sets the NTP configuration according to my wish:

As you can see, the script takes the vCenter hostname and two NTP servers and basically applies it to each host in your vCenter environment.

Rename a Standard Port Group on all hosts in a cluster

Well, I recently decided to rename a bunch of my Standard Port Groups, since they did no longer reflect the network they were providing. Since I’m a lazy bastard (well lazy as in click lazy), I wrote this little PowerCLI script:

This script basically takes a vCenter instance and a single cluster, then creates a new Port Group on each host, after which it reconfigures all VMs possessing a virtual NIC with that Port Group and then deletes the old Port Group.

VMware Auto Deploy already registered / RuleEngine

I had this weird plugin error the other day which bothered me on Friday. I decided to go fixing it. So after poking around in the vCenter installed software list. I couldn’t find the Auto Deploy in the list, so I figured due to my recent vCenter reinstallation while keeping the database, I forgot to reinstall Auto Deploy.

I went ahead and started the Auto Deploy setup from the DVD again, until I received this weird looking error. Apparently the setup thought (and decided correctly) that Auto Deploy was already installed in my vCenter.

So after a bit of googling, I found this nice explanation on how to manually deregister Auto Deploy from my vCenter. So here are steps retyped:

  1. Run the setup an hold at the window where you’re informed that Auto Deploy is already installed. Copy the MSI package from %TEMP%{RANDOM-GUID} to C:TEMP
  2. Unpack the setup files from the msi
  3. Manually deregister Auto Deploy using autodeploy-register
  4. Run the Auto Deploy setup again

2. Unpack the setup files:

Open a command prompt and extract the msi using msiexec

3. Switch to C:TEMPautodeployProgram FilesVMwareVMware vSphere Auto Deploy and run autodeploy-register.exe against your vCenter installation

4. After that command completes, you simply can run the setup from the DVD again. Afterwards the RuleEngine errors were gone (simply because Auto Deploy is installed again) and Auto Deploy is working again.

Using HPs vibdeposit with VMware Update Manager

As we’re finally at the point, where I only need to bother with HP hardware (which in itself is troublesome enough), I wanted to use HPs vibdeposit with our Update Manager. The whole purpose of the repository is the integration of HPs custom vibs (download able on each hardware under VMware ESXi 5.0) into the VMware Update Manager. That makes it easy to integrate, say the nmi-sourcing driver, into the VMware built ESXi images.

So basically what you do is, add the VIB repository to your vCenter Update Manager download list, and then create a dynamic baseline for everything “Hewlett-Packard” and attach that to the desired level of your environment (I did it at the root level, as I only have Hewlett-Packard). But I’ll show you.

First, visit your Update Manager (you’ll find it under Solutions > Update Manager). We need to update the Configuration of Update Manager in two places. First under “Configuration“, the second is under “Baseline and Groups“. But lets start with “Configuration“, since you can’t add something to a baseline that isn’t there.

Now, you want to add a new Update source:

The URL for that repository is http://vibsdepot.hp.com/index.xml. After that is done, you can click on “Apply” and “Download Now” to add the packages to your local software repository. After this, the VIB’s from HP just need to be applied to a set of hosts.

Now, we’re going to “Baseline and groups“.

As I mentioned before, we need to create the baseline, otherwise you can’t apply the VIBs to your hosts. So we create a new Baseline named “HP Update Bundles” only containing updates/patches labeled “Host Patch”.

Next we want to select the baseline type. Based on your requirements you may either select Fixed or Dynamic. Since I don’t want to update the baseline each time HP releases a new VIB, I chose “Dynamic”. Keep in mind if you select Fixed, you need to select the VIB’s in the dialog window.

But since I selected Dynamic, I just need to apply a filter criteria in this next dialog, telling the baseline to select only VIB’s originating from the vendor “Hewlett-Packard Company”.

You may also exclude specific patches from this baseline using this following dialog, which I decided not to do. Next we need to switch to a set of hosts (for me, it is the root level of the vCenter as I only operate HP hosts). So navigate to the desired folder, cluster, host and select the “Update Manager” tab on the upper right.

Simply click on “Attach” and a new dialog opens from which you can select the newly created Baseline.

After this the baseline is attached to the selected folder and when you Scan/Update your hosts, this baseline is being pulled in also and applied.