Sharing Folders from VirtualBox on a Mac OS Host
As of VirtualBox 2.0.4, shared folders are still not supported for Solaris guests. However, you can still share data with your host operating system using SMB. In this example I'll explain how to set up the share on Mac OS and access it from OpenSolaris.
Step 1: Configure Mac OS to share files
Open the Sharing system preference and set File Sharing to On:

Click the Options button and select Share files and folders using SMB:

Note down your Mac's IP address, which you can find from the Network Utility. In my case is 10.0.1.186:
Step 2: Access the share from OpenSolaris
Select Network from the Places menu, which will probably only show a Windows Network icon. Click the pencil icon in the Location Bar and enter the following string: smb://<ip address of Mac OS host>. For example:
And you should see your share. Note, unless you've changed the default permissions, you'll only have read access.
How did you manage to get the IP address of 10.0.1.186 ?
Also, did you have to change the VBox networking option from NAT to HIF?
Posted by W. Wayne Liauh on November 11, 2008 at 10:48 PM GMT #
If you are using NAT networking, you can address the mac at IP address 10.0.2.2 regardless of the Mac's actual IP address on the network. This is because the VBOX acts as DHCP server and gateway.
See my blog entry (without so many pretty pictures) at:
http://blogs.sun.com/jimlaurent/
Posted by Jim Laurent on November 11, 2008 at 10:55 PM GMT #
Hi Jim,
Thanks for the reply.
Actually I went to your blog first, but was unable to duplicate the result in Vista.
The following is a summary of what I did:
In Vista, I first change the sharing option to reader (everyone)
Then in the os200811.RC1 VM, I entered the location of
smb://10.0.2.2\\HP6K\user\hliwin\shareholder
but it showed 0 items.
Same result (i.e., showing 0 items) if I only typed in smb://10.0.2.2
I think your NAT approach is better, if I can make it to work in Vista, for sharing the OpenSolaris VM with the host, as I don't have to change the VM networking option to the promiscuous mode.
Posted by W. Wayne Liauh on November 12, 2008 at 12:33 AM GMT #
Sorry Jim, I had no idea you had just blogged on this same topic (and you gave me the idea for the blog). With regards to my IP address of 10.0.1.186, that's served up by my router. And I did do everything using NAT.
Posted by Brian Leonard on November 12, 2008 at 03:46 PM GMT #
Hi !!.
A lot of thanks for posting this.
I used with Ubuntu and works fine.
Bye.
Posted by gules on March 02, 2009 at 12:59 AM GMT #
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
Joannah
http://linuxmemory.net
Posted by Joannah on March 24, 2009 at 02:58 AM GMT #