Thursday, 13 August 2009

OpenSolaris Guest on Windows Vista Host

I was getting re-acquainted with OpenSolaris in VirtualBox while hosting under Windows Vista. My aim is to use this as a neat multi-platform test framework on my single notebook. During this relearning phase, I found it strange that it took a while to find out how to get OpenSolaris and Windows to share folders. I would have thought this a common use-case. So to help others that go through this I thought I would write this quick note.

First and most basic concept is to really understand what you are trying to do. It seems, through experiement, that you can get almost any configuration to work, once you approach it in the right way. Questions to ask yourself are:
- Which OS is the host? (Windows Vista in my case)
- The guest OS is ...? Open Solaris in my case.
- Which system needs to mount which filesystem (you usually have some choices here, going from the guest to host or vice-versa).

For my configuration, the successful approach was to first understand that I wanted the Solaris guest OS to mount a windows share from the Vista host. To do this I had to use the built-in Samba filesystem in Open Solaris to use Windows (CIFS) protocol to the Vista host through the network drive.

From there the steps where straightforward:

On the Vista Host
1. First identify the folder on the Vista host you want to share :)

2. Second identify the user (or users) that you want to grant access to. (these are Windows user accounts)

3. Share the folder on Vista: easy to do by right-clicking on target folder, properties, advanced sharing, enter the share name, setup permissions, click apply) Use this approach rather than the first "Share ..." option as this seemed not to work or rather work very slowly until I gave up...

On the OpenSolaris guest OS:

4. In a shell: create a mount-point folder for the Windows share. Mine was /work

5. As root, mount the share using the following command:

# mount -F smbfs //[user]@[host]/[share] [mount-point]

In my case this was something like:

# mount -F smbfs //bill@vistahost/adjoovo /work

host can be the name or IP address.
user is the name that you allowed access to the share during steps 2 and 3.

You will find other posts that talk about using other approaches but they may not quite match your use-case. Doing this with different combinations of OS would use different approaches, e.g. with a UNIX/Mac hosting a UNIX/Mac guest you can use VirtualBox shared folders (mount -F vboxfs) but that will not work between UNIX and Windows combos.

No comments:

Post a Comment