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.

Comments:

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 02: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 02: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 11, 2008 at 04:33 PM 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 07:46 AM GMT #

Hi !!.

A lot of thanks for posting this.

I used with Ubuntu and works fine.

Bye.

Posted by gules on March 01, 2009 at 04:59 PM 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 23, 2009 at 07:58 PM GMT #

That is fantastic; thanks for the guide. I tried it for Ubuntu and it works perfectly.

Anyway to make this happen automatically upon starting up Ubuntu?

Posted by Piero on February 25, 2010 at 05:09 AM GMT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

The Observatory is a blog for users of Oracle Solaris. Tune in here for tips, tricks and more as we explore the Solaris operating system from Oracle.

Connect with Oracle Solaris:


Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
20
21
22
23
24
25
26
27
28
29
30
   
       
Today