- If you have limited disk space (like me), you'd want to make your virtual disk fixed-sized. But at the same time, you recognize you may do a lot of work with your VM, so you want some way to store your data without quickly hitting the capacity of your virtual disk.
- You may have some files you'll be working on both in your VM OS, and your host/main OS. So you need a way to transfer/access the files between the two OS'es.
Here are the steps to set up your shared folder for VirtualBox (version 4.1.4 as of this writing) with Mac OS X 10.6 as host, with Xubuntu 11.10 in the VM:
- Launch VirtualBox - don't run your VM yet.
- Select the VM you want to add your shared folder to.
- Go to Settings > Shared Folder
- You should only see "Machine Folder" in the list box if your VM is off. If you see "Transient Folder" in the list, that means your VM is running. Turn it off.
- To the right of the list box, click on the Folder-with-Plus-Sign icon to add the folder.
- Select the folder you want to use as your shared folder (create one if you like/necessary). For example, name the folder: "SharedFolder" (creative, I know). Check the Auto-mount option.
- Accept, OK, and close the Settings window.
- Run your VM.
- Log in. (You can skip step 5 and go to step 6 - I'm just showing that the Shared Folder is not yet accessible at this point)
- Open the File Browser/Explorer and try to access the shared folder at: /media/sfSharedFolder. You will get a "Permission denied" error. Don't panic - follow the next step.
- Open a Terminal window.
- Add yourself to the group: vboxsf. E.g.
~$ usermod -g vboxsf
You might need to become root before you can do it:
~$ sudo usermod -g vboxsf - Check that the group vboxsf has been added to your group list:
~$ groups - Now this is important: Log out, then log back in. You won't be able to access the shared folder if you don't.
- After you log in, you should now be able to access your shared folder (/media/sfSharedFolder) without the "Permission Denied" error.
Hope that helps.
No comments:
Post a Comment