Sharing data with Fedora 12 as Guest within Mac
By sriram on Jun 17, 2010
I recently tried out Fedora 12 as guest OS using Sun xVM Virtual Box on my Mac laptop. Af course, I had to assign 512 Mb Memory within my Virtual Box settings to get Fedora Installer program to kick off and complete the installation. This was pretty surprising to me. For long time, I have been amazed that Linux hummed along with just 256 Mb RAM. I guess, times have changed now. Otherwise installation went through amazingly fast . I guess, this is one other area where OpenSolaris need to catch up with..
Now, I wanted Fedora to share my Documents and other useful folders from my Mac (to avoid keeping a duplicate copy of the same in 2 OS'es). So, I had to hack this to get where I wanted (thanks to googling...)
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 Fedora and will need to install source rpms of your kernel . It seems that to successfully install VirtualBox guest additions on Linux, Virtual Box tries to dynamically compile its kernel module for your system by looking for kernel source. So, you will need to install the kernel source . 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.
- 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@fedora:-~$> su (to become root)
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.