Friday Nov 07, 2008

Sun's VirtualBox type II hypervisor is a great free tool for running multiple guest OSes on your desktop.  I use VBOX on my Mac to run Solaris 10 and OpenSolaris.

One of the weaknesses of VBOX at this time is that the "guest additions" don't yet support file sharing from a Solaris guest OS.  There are ways around this, however, using SMB protocols.  Here's how....

  • Configure SMB sharing on your Mac
    • Apple Menu > System Preferences > File Sharing pref pane
    • Enable File sharing
    • Click Options
    • Enable Share files and folders using SMB
    • Enable your username account for file sharing. Doing this exposes your home folder on the network as a Windows shared folder. Make sure you have a good password!
  • Install Solaris or OpenSolaris in VirtualBox
  • Configure NAT networking
  • Open a Nautilus file browser
  • Go > Location
  • Enter: smb://10.0.2.2/<usernameonmac>
  • Enter your password
  • A new file browser should open with your mounted files.
  • Bookmarks > Add Bookmark

This works because when NAT networking is configured the Solaris guest gets an IP address of 10.0.2.xx.  The VBOX hypervisor acts not only as DHCP server but also as gateway and host at IP address 10.0.2.2.

In OpenSolaris, you can also do this using the Places > Connect to server menu item.  Choose Custom Location from the pull-down menu and enter the SMB address.

For more on accessing Windows Sharing check out Brian Leonard's blog entry.

Meanwhile, make sure to get the free downloads of Solaris 10, OpenSolaris or VirtualBox.


Comments:

You can even mount using the standard mount command in OpenSolaris once it is shared in Mac OSX.
It will prompt for password or u can give it at command line.

mount -F smbfs server:/share /mountpoint

Usage: mount -F smbfs [-Orq] [-o option[,option]] //[workgroup;][user[:password]@]server[/share] path

Check this manpage:
http://opensolaris.org/os/project/smbfs/mount_smbfs.1m.txt

-Pavan

Posted by Pavan on November 18, 2008 at 05:57 PM EST #

Yes,

I tried that but only received

mount: session setup phase failed: syserr = authentication failed

Posted by James Laurent on November 18, 2008 at 09:35 PM EST #

More info:

when I use (as root)
mount -f smbfs //jlaurent@10.0.2.2/jlaurent /mnt

It appears to mount correctly, however, when I cd /mnt and ls

I get:
ls: cannot open directory ./ Transport endpoint is not connected

mount command shows
/mnt on //jlaurent@10.0.2.2/jlaurent remote/read/write/setuid/devices/intr/noxattr/dev=4cc0001 on <date>

Posted by James Laurent on November 18, 2008 at 09:47 PM EST #

Sadly of course, this doesn't work when the guest is punched-in, as mine often is...

Posted by 78.16.99.151 on January 07, 2009 at 10:28 AM EST #

Presumably a judicious use of bypass rules would allow it to work, securely, even when punched in.

Posted by Calum Mackay on January 07, 2009 at 12:23 PM EST #

I'm trying to do the same, and found there is a bug in OpenSolaris 2008.05

http://bugs.opensolaris.org/view_bug.do?bug_id=6710493

Although I'm using OpenSolaris 2008.11, The fix for this bug was delivered on 12/2008 on snv_105.

I hope the next release of OpenSolaris will include this fix.

Posted by Jairo Cardozo on March 26, 2009 at 05:37 PM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed