How to share data between Mac OS X(host) and OpenSolaris(guest)

If you haven't heard already, Sun xVM Virtual Box allows you to run Open Solaris on your laptop (and for free !) . However, for a long time, Virtual Box did not have a simple way to share data between your host (MacOS X/Linux/Windows) and OpenSolaris guest. Finally, after a long wait, Sun xVM Virtual Box now is able to successfully share data between these two.

Here is how I did it

Within your host machine (whether Mac OS X or Windows), you will need to open Virtual Box settings for your guest image and then click on Shared Folders and   select to a share a location that you would like to share.


.




Now, you will need to boot up Open Solaris as guest and will need to install the new guest additions. Here is how you can do so


a) From the top level Virtual Box menu, click on Devices and then click on Install Guest Additions. This will cause Virtual Box to mount Guest additions ISO image.

b) Now, open a command line terminal to install this new guest additions.

  • Before proceeding to install the new version of guest additions, let us check if there are any old versions already installed on the system

    • sriramn@opensolaris:-~$> pfexec pkginfo -i | grep SUNWvboxguest

    • If the above command returned any output, then you will need to remove the previous guest additions like :

    • sriramn@opensolaris:-~$> pfexec pkgrm SUNWvboxguest

  • Now, you will need to install the latest Virtual Box guest additions package. To do so, you will need to select 'Install Guest Additions..' item from VirtualBox -> Devices menu item.
    • sriramn@opensolaris:-~$> pfexec pkgadd -d  /media/VBOXADDITIONS\*/VBoxSolarisAdditions.pkg

c) Depending upon your configuration, you might have to reboot your Open Solaris guest.

If you would like to try out Open Solaris on your laptop for the first time, then Virtual Box is a great way to do so. You can get latest builds of OpenSolaris from here and here is a nice screen cast on how to use Virtual Box.

d) Finally, you will need to run the following command within OpenSolaris guest to mount the location that you decided to share from your host (in my case, it is Mac OS's ~/Public ) directory.  I was able to do this as shown below




Also, if you would like this particular location to be mounted every time you boot your OpenSolaris guest, you could also add this below line to your /etc/



Now, if you need to copy any file from your OpenSolaris (guest) VM to your host machine , you could simply do something like

sriramn@opensoaris:~$ pfexec cp ~/Documents/foo  /Public/Drop\\ Box/

Hope you find this useful.


Comments:

Post a Comment:
Comments are closed for this entry.
About

Sharing what little I know

Search

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