Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Luter 345 Experiments
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Setting Up Shared Folders
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Get shortened URL
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
It is possible to allow the guest operating system (i.e. the virtual machine or VM) to have access to the filesystem of your host machine. ==== Step 1: Adding Guest Additions ==== The first step to having shared folders is to allow the guest operating system to add some modules to the virtual machine kernel which are necessary for file sharing. This is accomplished by mounting/attaching a special Guest Additions .iso file that comes with VirtualBox. Fortunately, in the most recent versions of VirtualBox this is fairly straightforward. Simply choose Devices->Insert Guest Additions CD image from the VirtualBox pulldown menu (note that this is pulldown menu is part of VirtualBox, and not part of your guest operating system). ==== Step 2: Power Up the Linux Virtual Machine ==== After you power up the Linux VM and log in, automagically a terminal window will pop up that will compile the new kernel module that is necessary, and go through the installation procedure. When this has completed, power down the VM again. ==== Step 3: Select a local directory/filesystem to be shared ==== With the VM in a powered-down state, select "Settings". Under the "Shared Folders" tab, click on the folder with a "+ sign" to add a new local folder/file system. Select the local folder path and folder name. MAKE SURE TO SELECT THE AUTO-MOUNT RADIO BUTTON!!! You should now see that this folder has been added to the list of "Machine Folders", with Auto-mount=Yes and Access=Full. ==== Step 4: Power Up the Linux Virtual Machine ==== After you have powered up the VM and logged in, open a terminal window and execute the command 'df'. You should see something like the following: <syntaxhighlight lang='bash'> Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup-lv_root 25336932 5328644 18714568 23% / tmpfs 251080 84 250996 1% /dev/shm /dev/sda1 487652 54829 407223 12% /boot /dev/sr0 56892 56892 0 100% /media/VBOXADDITIONS_4.3.30_101610 Dropbox 975922976 184014836 791908140 19% /media/sf_Dropbox </syntaxhighlight> where 'Dropbox' will be replaced by whatever shared folder name you chose above. Note that the mount point will always be of the form /media/sf_XXXX for all of your shared folders. ==== Step 5: Fix Permission Problems ==== Even though we set things up with 'Access=Full' above, there is one remaining step to realizing that situation. We must add the local user to the vboxsf group. To do this, choose System->Administration->Users and Groups to start up the User Manager application. You will have to provide the root password when prompted. Click on the local user to highlight that line, and then click on 'Properties'. Under the Groups tab in the window that pops up, scroll down and click the radio button beside the vboxsf group. Click OK, and then exit the User Manager application. Log out of the Linux VM and then log back in. If you execute the command 'groups' from a terminal window that your local account will now below to the vboxsf group, as well as its own default group. If desired, you can make a symbolic link in your home directory to the shared folder with: <syntaxhighlight lang="bash"> cd ln -sf /media/sf_Dropbox Dropbox </syntaxhighlight> where of course 'Dropbox' would be replaced with the name of your shared folder.
Summary:
Please note that all contributions to Luter 345 Experiments may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Luter 345 Experiments:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)