SMBFS, CIFS, ESX 3.5, and vSphere

Uncategorized

Spent 20 minutes fighting with getting a Windows share to mount correctly in five of my vSphere (ESX4) hosts but it’s been working fine on the ESX 3.5 machines. This much work just to back up my VMs?

Fortunately, just figured out the differences.

First, how to mount your Windows shares on ESX 3.5:

Know where your Windows store is. Let’s say it lives at \\fileserver\backups in the Windows world. In Unix/Linux parlance, //fileserver/backups.

Domain Name: THECLOUD
Username with read/write permission on the share: backupsvc
Password for the backupsvc account: DoIt!

Create your mount point — I use /mnt/backups

Open outbound SMB firewall:

sudo esxcfg-firewall -e smbClient

Your /etc/fstab should have an entry that DOES NOT include a needed password to access your fileshare (anyone can read /etc/fstab!). So, you can use a credentials file with the right info and root can mount it. Let’s create the credentials file:

touch /root/.smbcredentials
chmod 600 /root/.smbcredentials
sudo chown root:root /root/.smbcredentials
sudo vi /root/.smbcredentials

In the file, you need to have the right order and formatting:

username = backupsvc
password = DoIt!

Note the spaces. Save your changes then edit your /etc/fstab file and add:

//fileserver/backups /mnt/backups smbfs auto,credentials=/root/.smbpassword 0 0

Save the file, then see if it’ll mount your share with

mount /mnt/backups

Works great. But not on vSphere hosts. On those, you can’t use smbfs, you have to use cifs instead. And then, you’ll probably need to change your credentials file to new formatting and add a field.

So, the entry in /etc/fstab will need to look like this:

//fileserver/backups /mnt/backups cifs auto,credentials=/root/.smbpassword 0 0

And your /root/.smbpassword file will need to have:

domain=THECLOUD
username=backupsvc
password=DoIt!

Here, we need to add a domain entry (replace DOMAINNAME with the short name of your Windows domain) then remove the spaces from each line. Note, if your password includes a space, be sure to delimit the space with a backslash. Oh, and you don’t need to delimit a bang in the password. Found that out when I changed my password to WhatTheHell! when I was troubleshooting the constant Permission Denied errors while trying to mount my remote filesystem.

Good luck to ya!

Panoramas on a Mac?

Uncategorized

You’ll need a few things. I use iPhoto to manage Installing AutoPano-SIFT-C on OSX

Install XCode if you don’t already have it. You can find it here: http://developer.apple.com/tools/download/

Download and install MacPorts from here: http://www.macports.org/install.php

Once installed, open terminal then sync MacPorts with this command:

sudo port -d sync

Fetch and install some needed packages:

sudo port install cmake libtool jpeg tiff libpng

Now, fetch the source for libpano, but put it somewhere we can use it later if needed:

cd /usr
sudo mkdir src
cd src
sudo svn co https://panotools.svn.sourceforge.net/svnroot/panotools/trunk/libpano libpano13

Go to the libpano13 directory

cd libpano13

Use an appropriate editor and edit the bootstrap file and find this line:
LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}

Change it to read:
LIBTOOLIZE=${LIBTOOLIZE:-glibtoolize}

Save the changes.

Start the bootstrapper with some specific options:

sudo ./bootstrap –with-jpeg=/opt/local/ –with-tiff=/opt/local/ –with-png=/opt/local/

When complete, export the CFLAGS arguments so we can use them elsewhere:

export CFLAGS=”-I/opt/local/include -L/opt/local/lib”

Now, we configure the source code so it can be built:

sudo ./configure –with-jpeg=/opt/local/ –with-tiff=/opt/local/ –with-png=/opt/local/

Compile the source code:

sudo make

And install it:

sudo make install

Now we can actually get to building the program:

cd /usr/src
sudo svn co https://hugin.svn.sourceforge.net/svnroot/hugin/autopano-sift-C/trunk/ autopano-sift-C
cd autopano-sift-C
sudo cmake -DCMAKE_INSTALL_PREFIX=/usr/local
sudo make
sudo make install

Done! AutoPano is now installed at /usr/local/bin/autopano and /usr/local/bin/autopano-sift-c. Lanuch Hugin — or whichever program will be using Autopano — and point it at the right executable for autopano.

Tested and works great with Hugin 0.7.0.