Guest startup and vMotion

I completed an experiment on ESXi 4.0 to confirm what many people have known about guest startup and vmotion since vsphere 3.x which is that the two features don’t work together.

Guest A set to 1 on host X
Guest B set to 1 on host Y
Migrate B from Y to X
B appears in “Any Order”
migrate B back to to Y from X
B appears in “Any Order”

It seems the startup feature is host based and doesn’t know what to do if a guest arrives at or leaves. I will do a bit of digging and see where the startup data is stored: probably on the host somewhere (as opposed to in the guest config).

I think to provide a solution where all the guests in a given datacentre have a defined startup sequence will require a virtualcenter plug-in which stores that information in the database. It will need a “startup resolution” algorithm and a human interface to manage it. As far as I know, no-one as written such a thing but it could be worthwhile.

QNAP NFS datastore etc.

Because I was using a lot of space on my local datastore disk, I decided to move the big iso folder to the QNAP using an NFS datastore. It’s not totally obvious and I refered to http://files.qnap.com/news/pressresource/product/How_to_set_up_QNAP_NAS_as_a_datastore_via_NFS_for_VMware_ESX_4.0_or_above.pdf to get it to work. The main un-obvious thing is that you need to prepend the mountpoint with /share to access the correct area on the QNAP.

To come back to the question about auto-power on of guests, having looked in an environment with several hosts, it is much clearer. Of course, every VM, regardless of it’s state has a host (something I should have known). So when the instructions say “Display the virtual machine’s host in the inventory” that makes total sense. For a given hosts, all the VMs assigned to that host are there. Selecting “properties” from the Virtual Machine Startup/Shutdown panel allows you to change things around.

Incidentally, the “properties” link (and some similar ones in the vsphere client) are a bit over-engineered as my first instinct is to drag and drop the guest VMs on the first panel. That functionality would not be hard to achieve and would be much more intuitive.

The remaining question is what happens to the power settings of a guest when it migrates to another host? I can guess that the “Manual Startup” and “Any Order” properties would migrate with the VM but what if a set of guests are all set to start as number 1 on three different hosts and they all get migrated to one host…?

I guess an experiment is called for…(I only have one machine!)

IPExpo and Naming Conventions

Yesterday I went (in a RedPixie capacity) to the annual IPexpo at Earls Court. In another capacity I am familiar with these events as an exhibitor – but that’s another story. It’s a great event if you are an organisation shopping for IT and for vendors a good way to meet all your customers and show your wares at one time. As a “vendor” without a stand it’s not a good venue to meet people unless you are into randomly approaching people with a chat-up line. I am not.

However the event also provides several streams of seminars and I spent most of the day attending those. If I have an opportunity I will write something about them later.

The main topic for today is “Naming Conventions”. This is prompted by my desire to explain my theory of what a good naming convention should be, originally for the benefit of RedPixie but hey, why not for the world too! I fully appreciate that people have strong feelings on this, and it is easy for organisations to spend an inordinate amount of time and bitter internecine warfare on this topic but here’s my philosophy…

Fundamentally, names are for people to use to communicate. Machines use MAC address and IP addresses. That doesn’t suit humans at all so we use words. (In general I mean for servers, but it could be anything.) The main problem I see in naming conventions is that people use “words” that can’t be spoken. This is a barrier when trying to communicate clearly. When you are trying to convey a production server name over a noisy phone line in times of stress, it pays to have something you can say quickly and clearly. Something like “ldnlxprg0099” does not cut the mustard. That would be “ludunellexprogohohninetynine”.

The problem stems from the laudable aim to codify as much meaning as possible into the name. When you are talking about supporting a server you generally want to know where it is, what OS it runs, who supports it, what apps it runs, and of course a number for uniqueness. Unfortunately there is a temptation to cram so much in that you end up with something grossly overloaded which will break at the first unusual case.

One solution, as a colleague has pointed out is to call everything “server” followed by a number. I find this quite attractive. It does at least force you to maintain a good CMDB, and use it, to find out what server0786 actually is. By way of compomise, I think we can put some information in a name, to make it a bit more interesting and useful, but not at the expense of readability.

I would advocate putting no more than three pieces of information in a name. More than this and the name starts to get too long if you want to make it sayable. As a side note, I am against forcing everything into the same length just so columns line up in a report. The question is “What three bits of information”? And the answer depends on your priorities as an organisation.

Most naming conventions I have come across start with a location. Perhaps there is something territorial and human-natureness in this. If I was going to start with this I would use “lon” or “par” or “san” to get you off to a good sayable start instead of “ldn” which is unsayable. But I propose sacrificing location for operating system. In a traditionally silo’d world, in most cases the team supporting Unix servers is not the same as that supporting Windows servers.

So I start with “uni” or “win” followed by “ser” for server. “uniser”, “winser”: quite easy to say and audibly distinct. So far so good, we have conveyed two pieces of information: O/S and machine type. The alternative to “ser” is “desk”. But I will come onto “non servers” shortly.

From experience, it is useful to know if a machine is prod, dev, qa, test or something else. So useful I would encode this in the name. This brings us to “uniserp”, “uniserd”, “winsert”. Here I’m getting into territory I don’t like so much because some of these sound a bit to similar. Finally a number is needed, three or four digits depending on your requirement. An important aspect of the number portion, often overlooked, is to make sure it is unique across the entire asset register. Integers: there’s an infinite number. Don’t be stingy. The worst thing you can do is have prod, dev, qa and test servers all differing in one letter but with the same number. It’s a recipe for disaster. “Oh you meant lonutserv01, I thought you said lonupserv01”. Seen it happen. Every new piece of hardware gets a new number.

So what we’ve ended up with is some examples as follows:

uniserp001
winserd022
uniserq003
winserd004

As an alternative, to get rid of potentially similar sounds I would expand the type and reduce the static “ser” as follows:

unisprod001
winsdev002
unisqa003
winsdev004

If you want to have a different naming convention for desktops (or even if you don’t) you can get rid of the “s” to leave:

uniprod001
windev002
uniqa003
windev004

I like that.

Now for desktops I would follow a similar line and use something like this:

xpdesk001
vistadesk002
win7desk003

I also have a cunning plan to distinguish physical from virtual machines using readable names but that can wait for a later date.

ESXi 4.1 auto guest power-on

This is not rocket science as there is an easy to find solution at http://communities.vmware.com/message/1602618. This changed from previous versions of vSphere where I think the option was in the VM. Makes much more sense now. I assume (because I have only got one host) that in a cluster of ESXi hosts all guests would be shown and the ones specified for power-on would be powered on on *this* host.

The online help for this topic says:

1 Display the virtual machine’s host in the inventory.

as the first line but I am not too sure what it means by “the virtual machine’s host” (if it does not have one).

For the record, my own picture is:

Power settings for guests.

And I will try an experiment with multiple hosts in the office lab tomorrow.

BKO is cool

Today I stumbled across boot.kernel.org. It is cool. The use of gPxe and wanbooting is something I have wanted to do for a while. Even in a Solaris environment Wan booting is so, well…useful. Wan booting opens up a whole new range of architectural possibilities, which sit quite nicely in virtual architectures.

I’ve loaded it onto a small USB device and booted by HP2133 laptop with it. Neat. I gave Debian a whirl but it got stuck looking for a NAS mount. Never mind, another utility I tried worked fine as I’m sure most of the other options do.

BKO is cool and I commend it to the house!

Like a brand new PC

I mentioned a few days ago how I P2V’d my laptop to try and use a Virtual CD drive to run some software. I couldn’t keep that VM because it needed Windows re-activation (the joys of Microsoft).

However, I had a really, really old laptop with a 650Mhz Pentium III, 192M of RAM and a 12G hard drive which makes a perfect candidate. I had installed XP on it years ago and it ran (very slowly). Having installed VMware converter on it (which took a couple of hours), the conversion ran without a hitch. Impressive! And the VM version, which I boosted the memory on to 1G (and it now has an i5 processor) flies along.

Of course, there is still the question of re-activating the copy of Windows but it is good to know that old home PCs can be virtualised so easily.

RedPixie!!

Back in April, when I started this blog, I explained my reasons for doing so: to contribute to the Virtualisation revolution (having been through two major changes to IT in my career as more of a spectator).

Now, I am happy to announce that I have found a much better way of being a part of Virtualisation: I have joined RedPixie, a Virtualisation specialist company.

This means I can work on virtualisation solutions all day instead of an hour a day in the evening!

What this means for the blog is that the flavour will change. I will still be blogging about virtualisation in a technical and vendor agnostic way (other than maybe the odd plug for RedPixie products!)

I look forward to new projects and challenges.

No P2Vs?

I suppose it is a bit ironic that a blog born out of a p2v project, called p2vpro.com does not have much mention of p2v’s. In my defense, that is understandable given that p2ving is something that larger organisations are engaged in, and not your typical home lab user.

However, yesterday I downloaded vmware converter and virtualised my notebook running windows XP. Why? I had bought some software which needed a DVD drive and my notebook doesn’t have one. Not a problem, I thought, I can use my iMac to rip the dvd and make an iso out of it. Then I use Microsoft’s virtual cd control panel (which I found explained at http://www.tech-recipes.com/rx/620/xp_small_free_way_to_use_and_mount_images_iso_files_without_burning_them/. This worked fine to install the software but it still didn’t run, it seems to insist on a physical CD drive presence and a different volume name.

So, as a last ditch effort, instead of using a virtual CD tool, I virtualised the whole machine. The virtualisation worked very well and it goes an awful lot faster as a VM than a 2 year old notebook. Of course, Windows complains verbosely about the hardware changing and having to re-activate within three days.

Unfortunately, the software still doesn’t work but I think that is due to some kind of copy protection built into the program rather than the VM. Now it complains that the wrong DVD is mounted.

I have a couple of even older Windows laptops lying around the house and they are definitely candidates for virtualisation.