Fixed esxi datastore config

Happily I found the reference to the datastore which I clobbered and have removed it from the file on the USB stick. Given the error messages in my earlier post, it is clear that something remembered that datastore. A manual browse didn’t turn anything up (but was interesting for other reasons) so I tried the following command to search all files for a portion of the datastore ID:

~ # find / -type f -exec egrep 4c17e548 {} \; -print
/vmfs/volumes/4c17e548-9da6c4fd-ff79-001b215b7069/.locker 0
/etc/vmware/locker.conf
^C

And yes the file looks like:

~ # ls -l /etc/vmware/locker.conf
-rw-r--r-T   1 root     root           60 Jun 18 17:29 /etc/vmware/locker.conf

Removing the file makes esxi forget about that datastore and boot in normal time.

I am even more convinced that it is possible to make a USB datastore now that I can see that the USB stick which boots vSphere has vmfs portions on it. Consequently I am going to persevere on that for a bit.

More Virtualisation Companies

I’ve updated my links with some more Virtualisation companies I’ve come across by scanning the blogs. It does seem like the majority of “startups” (without know their lineage) are working in the VDI space. I will try to arrange them by server or VDI type at some point.

The consensus of opinion does seem to be that VDI is the area to focus on. In my experience it is a much more complicated beast than server virtualisation. Interesting because almost the reverse of the physical scenario where servers tended to be more complex and unique and desktops were simpler and more uniform. The addition of the virtualisation factor to the equation has changed it all.

On a technical note, I found the following in my ESXi messages file which accounts for the delay in starting up my system after I removed the datastore at the back end (because I couldn’t do it from vSphere client).

Jun 28 22:08:12 vmkernel:
Jun 28 22:08:12 vmkernel: sysboot: Executing '/sbin/configLocker'
Jun 28 22:08:12 root: configLocker Can't find mount
/vmfs/volumes/4c17e548-9da6c4fd-ff79-001b215b7069/.locker: Waiting 2 seconds.
Jun 28 22:08:14 root: configLocker Can't find mount
/vmfs/volumes/4c17e548-9da6c4fd-ff79-001b215b7069/.locker: Waiting 4 seconds.
Jun 28 22:08:18 root: configLocker Can't find mount
/vmfs/volumes/4c17e548-9da6c4fd-ff79-001b215b7069/.locker: Waiting 8 seconds.
Jun 28 22:08:26 root: configLocker Can't find mount
/vmfs/volumes/4c17e548-9da6c4fd-ff79-001b215b7069/.locker: Waiting 16 seconds.
Jun 28 22:08:42 root: configLocker Can't find mount
/vmfs/volumes/4c17e548-9da6c4fd-ff79-001b215b7069/.locker: Waiting 32 seconds.
Jun 28 22:09:14 root: configLocker Can't find mount
/vmfs/volumes/4c17e548-9da6c4fd-ff79-001b215b7069/.locker: Waiting 64 seconds.
Jun 28 22:10:18 root: configLocker Can't find mount
/vmfs/volumes/4c17e548-9da6c4fd-ff79-001b215b7069/.locker: Giving up.
Jun 28 22:10:18 root: configLocker /scratch is /tmp/scratch

It must have a memory of that datastore in the path given, which I will attempt to remove.

Re-loaded

I finally managed to restore my system to something usable but it involved reformatting the hard-drive and re-installing Ubuntu. Still it gave me the opportunity to re-partition the drive more sensibly.

Originally I had one primary partition and one extended partition (with a couple inside) and the remainder, about 800Gs for datastore. That’s not too useful if you want to install several O/Ss and boot between them (using Grub). At least Ubuntu, OpenSolaris, Centos, Suse. vSphere boots from a USB device but it didn’t like having it’s datastore pulled out from under it. It does fully boot eventually but there’s a long pause at the end. I will need to look at the logs. I wonder why it wouldn’t let me delete the datastore before, even when I had deleted all the VMs and isos? Still like to get to the bottom of that.

I downloaded Centos to a live USB but it doesn’t have the luxury of installing. In fact it looks a bit fiddly, involving booting over the network and playing with Grub etc. (no DVD drive). Not something I bargained for but all good practice I guess.

Having a bad evening

You know how sometimes things just won’t work. Well I’m having one of those evenings. The problem at hand for the last few days was to create a datastore on a USB stick on my ESXi 4.0.0 system, booted from a USB stick.

Well I couldn’t get it to work and by the looks of things neither has anyone else, although it apparently worked in 3.5. (Problem 1)

I want to create a datastore on a USB not only because it would be very useful but also to migrate my existing VMs onto it so I could delete my disk based datastore and re-partition my drive in order to install more physical O/Ss than just Ubuntu.

Anyway, since I couldn’t create any other datastore I just deleted my VMs and thought it would be quick to re-create them. So try to delete the datastore I created. Can’t do it: ‘Unable to remove datastore xxxxxxx the resource is in use’ (Problem 2).

Lots of people had that problem but none seem to match my scenario.

OK, just boot into Ubuntu and re-partition the drive. Unfortunately I get errors trying to delete the partition and it ends up in a right mess. (Problem 3). The only way to get out of this looks like reformatting the hard drive and re-installing Ubuntu.

So I take my USB drive which I wiped to try and make a datastore. Now I can’t format it (Problem 4).

See what I mean?

Now I’ve blown 1hr 40mins time budget on problems but I finally just managed to re-format the USB key and use Unetbootin to put Ubuntu back on. Hurrah! I can boot my machine with it.

But wait! I can’t now even format the hard drive in my machine when booted from the USB Ubuntu: “An error occurred while performing an operation on “1TB Hard Disk” (ATA Hitachi…): The operation failed. It thinks it is in use.

I’m going to bed.

More stuff to read

Found what looks like another useful blog at vmblog.com. More reading! Set up by David Marshall of “Virtualisation for Dummies” fame I referred to before. Should be a good site.

Slow progress on my efforts to compile Xen as am bogged down in a sea of dependencies.

On the vSphere side I have two VMs up and running: a Debian and an OpenSolaris. Both very easy to install.

LOSUG

That’s the London Open Solaris User Group. I went along last night mainly for the talk on Virtualbox internals. Unfortunately the speaker had to cancel at short notice. Have to wait until that comes round again.  I should add Virtualbox to my list of things to experiment with. I tried it a year ago on my notebook and it worked well.

On the plus side we got a great talk from Robert Milkowski on his contribution to ZFS in Opensolaris. It is best explained by him in his blog.

The general idea is that in some circumstances it is beneficial to be able to “over-ride” the application specified behaviour when it comes to writes: synchronous or asynchronous. His enhancement adds features to allow this to be done. At the flick of a switch you can make all writes asynchronous while fooling all apps into thinking they are synchronous. This can give you a 2 order of magnitude speed up! Furthermore the switch can be set at any level, including individual filesystems or zvols.

It should, of course, be used with some appreciation of the risks. In many cases the risks are acceptable as ZFS integrity is always guaranteed, even if data integrity is not. Back in the day similar functionality existed for UFS filesystems but it was very easy to completely trash a UFS filesystem.

It was also inspiring to see with what relative ease you can contribute to Open Solaris. Ahhhh, for more time.

Chatting to some folks afterwards I mentioned I was really in to virtualisation. Reasonably, I was asked what was the best virtualisation software to use on Debian for running a windows program. I think Virtualbox would do nicely but cannot speak from experience. Just goes to show how many combinations of O/S and hypervisor there are out there to get familiar with.

Diary Mode

Let me be selfish for a moment and use the blog as a diary. I have some “experiments” in progress which are mainly to help me “tool up” and keep my skillset in some modicum of respectability. These experiments are not necessarily going to help anyone out there.

To recap, as I mentioned in my first post, I want to contribute to the virtualisation revolution. I have done so already by being involved in a largish server virtualisation project, now complete. What I am doing now are not projects, just “experiments” which shouldn’t take more than a day. If I find tips along the way, I will, of course post them and I will continue to make notes of presentations I attend.

Experiment 1. Install ESXi on USB stick. (Done)

Experiment 2. Compile Xen. (Got an update on this soon). As a challenge, compile Xen on Leopard.

Experiment 3. Get PXElinux working to boot O/Ss and Hypervisors.

Experiment 4. Benchmark the 8g Intel i5 hardware I have with a variety of hypervisors and guests (this is getting more like a project)

My other “creative” activity, is to present a vision of an “ideal” IT infrastructure, a sci-fi fantasy which nevertheless gives us something to aim for and talk about.

ESXi on USB stick

I downloaded ESXi 4.0 from VMware (you have to register) and with very little effort installed it on a USB stick and booted my machine with it. Vladan Seget’s blog comes up first in Google with a procedure and comments on how to do this. I had to use the slightly longer (WinImage) method as I don’t have a CD drive. The other bits, extracting etc. I did with Linux commands. No doubt I could create the bootable USB stick from Linux too with a bit of work but it hardly seems worth it since it is so easy to do with a bootable CD.

Next step to get the management tools and build some O/Ss.

Up and Running

In fact, I did get Ubuntu working the other night but it was too late to post any more updates. What I had to do was use the desktop version of the distro as opposed to the server version (still 64 bit though). I’m writing this on the new machine.

Before I did that I used the menu system to save the install logs and opened a shell to have a look. It seems like Ubuntu itself runs fine and the installer is at fault. Perhaps I need a more up-to-date version of the Universal USB Installer. The error messages are misleading as I believe there are just files missing from the USB drive (mounted on /cdrom). “There was a problem reading from the CD-ROM…” Not really but I guess the installer assumes it has all the files. Still, misleading error messages are one of the banes of IT.

Now to download some hypervisors and other O/Ss.

P.S. Ubuntu likes to spread itself about on the disk if you choose a fully automated install. I wanted the minimum, a / filesystem and some swap and I created a couple of small partitions for that but it still went and used the 900G of space for swap so I had to explicitly tell it what to use.