Quick and Dirty HTTP Based Deployment

A lot of the scripted installation tools that VMware offers allows the usage of a central HTTP based repository for hosting the files. Today I stumbled over a little gem that might just help you create a “quick and dirty” HTTP based deployment scenario by running a simple command in your terminal. By default, this command works on any system that has Python installed on it, so OS X and Linux should be ready to go as is. As for you Windows users out there, well, your mileage will vary.

The trick here is a one line Python command that simply creates a HTTP server listing the files in your current directory over a given port. On my MacBook, I opened Terminal and ran the following command:

1
2
python -m SimpleHTTPServer 8000
Serving HTTP on 0.0.0.0 port 8000 ..

If I then open my browser, and point it to the IP address of my MacBook, I get a directory listing showing the contents of the current directory.

Quick and Dirty HTTP Deployment #01

 

As you can see, the directory contains a few files, namely a Damn Small Linux appliance packaged as an OVA, as well as the Linux installation files for ovftool.

In this particular case, I wanted to install ovftool inside a running vMA instance I had in my infrastructure. So, by running the following commands I got ovftool downloaded via HTTP, from my MacBook, inside a running vMA instance by only downloading the files in to a given directory and serving it via HTTP from there to vMA.

By running the following command (output edited for verbosity)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
vi-admin@record:> wget http://192.168.5.62:8000/VMware-ovftool-3.0.1-801290-lin.x86_64.bundle && sudo sh VMware-ovftool-3.0.1-801290-lin.x86_64.bundle
100%[======================================>] 36,631,447  1.46M/s   in 23s
2013-05-14 12:13:06 (1.52 MB/s) - `VMware-ovftool-3.0.1-801290-lin.x86_64.bundle.saved [36631447/36631447]
...
vi-admin's password:
Extracting VMware Installer...done.
...
Do you agree? [yes/no]: yes
...
Installing VMware OVF Tool component for Linux 3.0.1
Configuring...
[######################################################################] 100%
Installation was successful.
[email protected]:/tmp>

I was able to download and install ovftool, in one command.

The same deployment method could also easily be used to install host patches, deploy OVF based appliances and even install VIB files from a central repository. In fact, that`s the next thing to do here, deploy the Damn Small Linux appliance, by using the newly installed ovftool package.
The flexibility of having a small HTTP server available by running a single command is great, and I`m sure there are many other use cases that I have yet to consider.

Backing up vCenter DB with Veeam B&R 6.5

It´s a well known problem that with Veeam Backup & Recovery Replication 6.5, and earlier, backing up the SQL server that hosts the vCenter DB poses a problem. KB1051 VSS for vCenter outlines the issue well, and provides a workaround.

If you experience this problem, you will see entries like this in your Veeam B&R backup logs:

Veeam vCenterDB Backup Error
Veeam vCenterDB Backup Error

The workaround provided by Veeam is to create host VM-Host Affinity Rules, effectively pinning a VM to a given host, and then perform the VM backup through the host rather than through the vCenter.

While this might be a way to work around the failed backup scenario, it effectively limits some of the flexibility you have in a virtualized environment. I want to have my VMs roaming around my datacenter utilizing DRS, and by pinning the VM to a given host that flexibility is reduced for the VMs in question.

I can appreciate why this issue appears, and why the workaround works, but frankly there has to be a better way of doing this. Hopefully this issue will be sorted in the next v7 version of Veeam B&R, as there certainly are ways for Veeam to work around the issue and make this a more seamless experience for the backup administrator.

Proposal

Why not create a new option in the backup job, where you define that this particular job should run through a host, instead of the vCenter?

If selected, Veeam B&R would query the vCenter for which host the given VM resides on, then connect to the host itself and perform the backup through that?

That way we could work without having to set VM-host Affinity Rules, yet still keep vCenter out of the loop when the actual backup is performed.

Doing such a query is pretty easy,  below is an example using PowerCLI:

1
2
Get-VMHost -VM dbserv | fl -Property Name
Name : esx02

 

This simple query returns the host that the given VM resides on at the given time, why not do something like this inside of Veeam B&R to make sure that vCenter DB backups work, without having to resort to VM-Host Affinity Rules?

VMware vSphere Health Check – What´s in it for You?

VMware vSphere Health Check is a service provided by VMware Professional Services, either by their own consultants or by a consultant from a VMware Certified Solution Provider.

I´m lucky enough to be employed by a Premier VMware Solution Provider who offers this service to our customers, and I´ve completed a fair number of these health checks in the last couple of months.

You might ask what the value of the Health Check is, and for the end customer it´s pretty clear cut. They get a very detailed report on the current status of their vSphere infrastructure, complete with action items and concise recommendations for improvements. Of course, I sell these service professionally and therefore I´m biased by default.

What I want to focus on here though, is not the value customers get out of the Health Check, but rather the incredible learning opportunity this service provides for you as a consultant.

The data gathering part of the Health Check is done via software developed by VMware. The software is provided in two flavors, either as a ThinApped Windows Application or as a virtual appliance that you deploy in the customers environment. Pick your poison, but I´ve mostly worked with the ThinApp version. It gathers a lot of interesting data from the target vCenter, and you can then take that data with you and generate a report based on that.

That´s where the fun starts. The HealthAnalyzer software comes with a web interface where you can look at everything it collected and prioritize the different findings. Of course, it also comes with suggested priorities from VMware, for the given data. This is where the learning is for everyone conducting the health checks.

By reading, and understanding the automated observations generated through the data collection you have a wealth of information available, complete with “best practices” recommendations from VMware (These are updated quarterly). “Best practices” is in itself a loaded term, and you should not blindly follow them without knowing what actually makes a best practice just that. It might not be applicable in the environment you are analyzing, but the thought process involved with looking at the data and determining if this is applicable has a lot of value in and of itself. Of course, like any good consultant the real answer is always “it depends…”

Examples:

It´s hard to come up with arguments against the situation in the screenshot, but this is just an example of how detailed the information provided is.

Some observations even come with links to relevant documentation providing more background on why something is recommended:

For me, this has been an invaluable resource for learning and understanding why VMware recommends certain practices.

If you work for a service provider, do yourself a big favor and check if you have access to the HealthAnalyzer software on VMware Partner Central and if you do, download and play around with it.

Even if you don´t plan on doing these checks as a service for new or existing customers, running it after you have done an install is a great, and automated, way of checking if your installation adheres to the standards it should. And who knows, chances are that you´ll end up learning a lot in the process. There is just no way that can be wrong.