Datastore on USB stick

As promised I have been looking at this a bit more. I think I was a bit naive before…perhaps I should have believed everyone, including VMware 🙂

I have built a 4.1 ESXi hypervisor on a second USB stick and have been looking more closely at it. Logging on to the console a running “mount” shows the following:
~ # mount
none on /dev type devfs (defaults,rw,suid,dev,exec,async,atime,diratime,loud)
none on /proc type procfs (defaults)
none on /vmfs/volumes type vcfs (defaults)
none on /tmp type visorfs (2,192,01777,tmp)
updatestg on /tmp/stage type visorfs (0,750,01777,updatestg)
visorfs on /var/lib/vmware/hostd/stats type visorfs (63,63,0755,hostdstats)
~ #

Looking at it another way with “df” reveals:

~ # df -h
Filesystem                Size      Used Available Use% Mounted on
visorfs                   1.3G    257.8M      1.0G  20% /
vfat                    249.7M     87.8M    161.9M  35% /vmfs/volumes/ff060de6-cecc88e5-4d14-8726d7ed0132
vfat                    249.7M      4.0k    249.7M   0% /vmfs/volumes/65092bef-de8a06b5-22db-2bbbc32dc3d2
vfat                    285.9M    135.5M    150.4M  47% /vmfs/volumes/3c3693e8-f77a642a-1910-5c6bdcb26d3a
~ #

And finally, a thid way:

~ # fdisk -l /dev/disks/mpx.vmhba33\:C0\:T0\:L0

Disk /dev/disks/mpx.vmhba33:C0:T0:L0: 16.0 GB, 16062087168 bytes
64 heads, 32 sectors/track, 15318 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/disks/mpx.vmhba33:C0:T0:L0p1 5 900 917504 5 Extended
/dev/disks/mpx.vmhba33:C0:T0:L0p4 * 1 4 4080 4 FAT16 <32M
/dev/disks/mpx.vmhba33:C0:T0:L0p5 5 254 255984 6 FAT16
/dev/disks/mpx.vmhba33:C0:T0:L0p6 255 504 255984 6 FAT16
/dev/disks/mpx.vmhba33:C0:T0:L0p7 505 614 112624 fc VMKcore
/dev/disks/mpx.vmhba33:C0:T0:L0p8 615 900 292848 6 FAT16

Partition table entries are not in disk order
~ #
Clearly the filesystems are really FAT16 with the exception of one VMKcore filesystem. The fact that they are mounted on something called /vmfs is neither here nor there.

The thing to try is to run vmkfstools on another USB device and try to create a vmfs3 datastore. This has always failed in the past with some specious error. Unfortunately I can’t try it now because I have run out of USB devices. (I have a 1G stick but ESXi won’t recognise it).

The other thing to try is to create a datastore on another local disk (don’t have one) and see what changes. Or there’s the QNAP so I might try NFS.

I don’t hold out much hope at the moment. Even if a vmfs filesystem could be created on a USB stick, you’d still need to fool ESXi into thinking it was another type of storage. Tricky. If it can’t be tricked, a kernel module would likely be necessary, or an alteration to an existing kernel module which is vmware’s territory and they seem to have already made the decision not to do this.

Progress, sort of

The best progress is that my QNAP is now working, fixed by a firmware upgrade at QNAP’s behest. This surprised me as I was convinced the problem was in MacOS, as I believe was everyone else. It is now running on 3.3.1 Build 0720T.

The upgrade itself was a bit hairy. The first time it bombed out with an error at 28%. The second time it got “stuck” at 10% for several minutes, then proceeded into the 20s and announced it was finished. The subsequent reboot took ages to finish and I was beginning to think it was broken. A reminder that patience is required in this game. Anyway, Time Machine is now backing up to it which is good.

Also managed to resurrect my Centos build on my lab machine. It’s actually a Xen build with Centos as Dom-0. For some reason I described it before as Centos with KVM. This is what happens, I reckon if you work too late. Of course, that means I still have to try the KVM hypervisor, which people have been telling me is the more popular of the two.

At least that’s two things off the immediate list so I can get back to concentrating (I use the term loosely) on seeing if I can get a VMFS datastore installed on a USB key to use with ESXi.

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.

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.