To start, you need to install the guest additions. I use Ubuntu Server 9.04 so I followed steps outlined in this post.
- install necessary tools for building kernel module by:
sudo apt-get install build-essential linux-headers-`uname -r`
- Next, click on menu "Devices" -> "Install Guest Additions..." then mount the guest addition CD-ROM within the Linux virtual machine by:
mount /dev/cdrom /media/cdrom0
- Finally, run the installation script:
If you do not have X server installed, you may see a warning message about the X driver will not be installed. Ignore this message and now we are ready to configure the shared folder.
- Create the a folder for sharing on the host Windows machine (say C:\Shared).
- Click on the menu "Devices" -> "Shared Folders..."
- Add a new machine level shared folder by clicking on the + icon on the right
- Enter "C:\Shared" for Folder Path and "shared" for the Folder Name.
- In Linux guest VM, create a folder /opt/shared and add the following line to the bottom of /etc/fstab:
shared /opt/shared vboxsf defaults 0 0
- Reboot the VM