Handy VMFS Script

I talked last night about migrating my VMs and rebuilding my “storage infrastructure”.  Currently all of my equipment is in my room and it produces a ton of heat and noise, so I usually shutdown the ESXi machine at night (the FreeNAS box doesn’t make any noticeable noise or heat).  All that to say, that I didn’t want to leave that machine on all night so that it could copy the files to it’s local drive.  I decided that I have this big RAID array attached to my laptop, so I might as well dump them there.

First thing, I initiated an iSCSI connection, that led to Finder asking me if I wanted to format the drive, which I definitely did not want to do.  This is because ESX formats the drive with their VMFS, so I Google’d around a bit to find this Google Code Project vmfs.  I was now able to browse around the datastore and copy bits to my local machine.  One problem though, it’s command line based (I guess there’s a WebDAV extension, but I didn’t try that) and the available copy command isn’t recursive.  So I put ran a couple commands to get a list of files, created a few directories since those didn’t copy and set it running.  I had to make some tweaks in the morning to fix issues with spaces in the name.

I’ve since updated the method and placed it into a script.  You no longer have to manually create any of the directories, and it’s down to a simply calling a script.  (VMFS Recursive Copy Script)

Leave a Comment

Your email address will not be published.