Archive for the ‘Uncategorized’ Category

The Shrinking Bedtime Routine

It’s been nearly a year since we’ve instituted a steady bedtime routine with our 17-month old son, in a desperate attempt to get him to sleep through the night. (Luckily, he’s been doing that for about five months now, starting right after he turned a year old.) Over time, it’s become the highlight of my day, especially on non-telecommuting days when I don’t get a lot of time with him. The routine goes like this:

  • Bathtime

  • Read On the Day You Were Born, by Debra Frasier

  • Read Goodnight Moon, by Margaret Wise Brown (“Pictures by Clement Hurd”)

  • Play the 13-song, 57 minute “Baby Shutdown Mix”, sing along with it, and put him in the crib when he’s nearly asleep.

When we first started, most nights I’d put him down towards the very end of the mix; then I started putting him on a bed after the fifth song, stop singing, and cuddle him until he fell asleep. A few months later, and it was the third song (“Lullaby” by the Dixie Chicks). And then directly into the crib after the third song, regardless of whether he was anywhere near being asleep.

Recently, I’ve cut out he second song, and I think I might have to cut it down to just “Lullaby” very soon. Through most of the singing, he’s getting quite talky and wiggly, and last night he was saying “nigh nigh, nigh nigh” well before it was time put him down, which I think roughly translates to “that’s nice, Dad, put me down already.” I know that this will have to end sometime; I don’t think it would be healthy if we were still doing this when he’s 16. I just wasn’t expecting it to be so soon.

VMware and encfs, Part 2

Perhaps before declaring victory on storing a VMware virtual machine on an encfs encrypted filesystem, I should have tried powering on the VM. When I tried that, I found that it refused to start. Viewing the log revealed the following message:

Oct 28 23:38:59: vcpu-0| Could not mmap paging file : No such device
Oct 28 23:38:59: vcpu-0| Failed to allocate page for guest RAM!

Searching the VMware community forums turned up someone having a similar problem when storing the VM on an NTFS filesystem accessed via a FUSE driver.

Apparently VMware creates a disk file containing the guest’s physical memory and then reads the file into a memory map. This doesn’t work on a FUSE filesystem like encfs, and so the guest fails. So the solution is to avoid creating the memory-mapped file by adding the following line to the vmx file for the virtual machine:

mainMem.useNamedFile = "false"

With that small tweak, the guest started normally. Really.

VMware and encfs

Posted as a public service for the next person who runs into this.

I was trying to move a VMware virtual machine to a new host, storing the files on a filesystem encrypted with encfs. Previously, when I’ve moved a virtual machine, the process went like this:

  • Power down virtual machine.
  • Copy virtual machine directory to new host.
  • Start VMware console on new host.
  • Browse to new virtual machine directory, open virtual machine.
  • Power machine on, answer question about UUID’s, and move on with life.

But when I tried to do this in the encrypted directory, I got an the error message “unable to add virtual machine to inventory … No permission to perform this operation.” Googling that resulted in some clues about permissions on the /etc/vmware/vm-list and /etc/vmware/vm-list-private files, which control the virtual machine inventory. But the VMware setup on the host with the encrypted disk was not different from the original host, where the files are writable only by root.  I was convinced it had to do with the encryption. So I moved the VM files off of the encrypted filesystem, and I was able to start it.

With that in mind, I did some research on encfs, thinking that it was having trouble with the large (>4 GB) disk files. I found out that encfs could theoretically handle disks of at least 128GB in size, so that was ruled out as a possibility. But then I remembered that the files containing the virtual machine inventory were only writable by root – which means that some root process adds any virtual machine you open to the inventory. And since by default encfs only allows the owner to see the filesystem (not even root can see it), the attempt to add the encrypted VM to the inventory was failing because VMware couldn’t find the files.

Fortunately, you can tell encfs to allow root to see the encrypted filesystem when you mount it, and once I did that, problem solved.

What I’d Call Useful Information

While we were out and about in the remains of Tropical Storm Ernesto earlier this evening, we heard Bob Marbourg on WTOP say something like “take a rain check” if you were trying to cross the (Chesapeake) Bay Bridge, as the traffic was backed up from Davidsonville to the bridge. He also suggested that “stopping and getting dinner and resting” would be a good idea, especially since driving over the bridge was a challenge because of the wind. So I thought it would be neat if the overhead highway signs on Route 50 would be changed to something like:

MAJOR DELAYS US 50 EAST
EXIT 16 TO BAY BRIDGE
STOP AND GET DINNER BEFORE BACKUP