Mounting Sharefolders in Virtual Box, Host win7

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read this

Mounting Sharefolders in Virtual Box, Host win7

Postby ashfaq on Sun Nov 01, 2009 11:32 am

Dear Sir,
I am a totally New be to Linux and Mint, but I am planning to explore, be familiar, and install on my laptop. On a friends advise, Installed win 7 and virtual box, to become familiar with it first I installed xp as guest. Today I installed Mint 7 as Guest. Some how I am not sure but it seems I managed to install the guest additions, but failed to mount the share folders. Also like my friend in earlier post found the formula for Mac, I need it for windows.
Well this is the first question, as I flow through and become more familiar, it is likely that I would come out with more, and hopefully would find someone to pull me up from windows trap for ever.
I would surely forget windows, I decided when I first saw the interface of Mint, and I am confident that you guys out their would give me the necessary hand. Also guide me if I had gone through the right procedure and installed all the guest additions as required. The help section in Virtual box does not throw much light for a new bee.
Thanking you in Advance.
Ashfaq Shaikh.
ashfaq
Level 1
Level 1
 
Posts: 42
Joined: Sun Nov 01, 2009 11:07 am

Linux Mint is funded by ads and donations.
 

Re: Mounting Sharefolders in Virtual Box, Host win7

Postby DrHu on Sun Nov 01, 2009 12:21 pm

ashfaq wrote:I am a totally New be to Linux and Mint, but I am planning to explore, be familiar, and install on my laptop. On a friends advise, Installed win 7 and virtual box, to become familiar with it first I installed xp as guest. Today I installed Mint 7 as Guest. Some how I am not sure but it seems I managed to install the guest additions, but failed to mount the share folders.
You can check the settings for the virualbox guest, see what is there..

I guess I am getting confused, I don't even know if you are using Linux Mint as a host OS or not, since you started with windows 7, and windows XP

search.php?st=0&sk=t&sd=d&keywords=sharing+folder+virtualbox
--sharing directories (folders) under virtualbox on Linux mint

This is a host OS issue..
If you have the guest additions installed in the virtualbox VM for the other OS, then you can either
  • Inside the VM (virtualbox)
    --look in settings for shared folders and pick one on the host
  • Outside the VM (virtualbox)
    --create a shared folder on the host, and access it when the VM starts
If it was a Linux host OS instead of a Linux guest OS, a good place for a shared folder is /media
    In a windows host OS, it becomes a windows question
User avatar
DrHu
Level 15
Level 15
 
Posts: 5895
Joined: Wed Jun 17, 2009 8:20 pm

Re: Mounting Sharefolders in Virtual Box, Host win7

Postby altair4 on Sun Nov 01, 2009 12:45 pm

Like the good DrHu I too am confused. My best guess is this:

Host = Windows 7
Guest = Mint 7

Also like my friend in earlier post found the formula for Mac, I need it for windows

Maybe it's my own ego but are you refering to this:
altair4 wrote:I'm not a Mac user so I can't be of much help on that end but to mount the shared folder manually it should look something like this:

mount -t vboxsf -o uid=1000 mac_shared _folder_name /home/altair4/mount_point.

The uid=1000 will make you the owner of the mount point and you should have full access. You might want to alter your mount command by adding the uid=1000 to make sure it works as I have just described it.

Then to automount you need to add a line to your /etc/fstab that looks similar to the mount command and looks something like this:

mac_shared_folder_name /home/altair4/mount_point vboxsf uid=1000,defaults 0 0


As far as mounting in a linux guest the steps above are the same for a windows host as they are for a mac host. Just substiture windows_folder_name for mac_folder_name.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 13
Level 13
 
Posts: 4654
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounting Sharefolders in Virtual Box, Host win7

Postby ashfaq on Sun Nov 01, 2009 2:10 pm

altair4 wrote:Like the good DrHu I too am confused. My best guess is this:

Host = Windows 7
Guest = Mint 7

Also like my friend in earlier post found the formula for Mac, I need it for windows

Maybe it's my own ego but are you refering to this:
altair4 wrote:I'm not a Mac user so I can't be of much help on that end but to mount the shared folder manually it should look something like this:

mount -t vboxsf -o uid=1000 mac_shared _folder_name /home/altair4/mount_point.

The uid=1000 will make you the owner of the mount point and you should have full access. You might want to alter your mount command by adding the uid=1000 to make sure it works as I have just described it.

Then to automount you need to add a line to your /etc/fstab that looks similar to the mount command and looks something like this:

mac_shared_folder_name /home/altair4/mount_point vboxsf uid=1000,defaults 0 0


As far as mounting in a linux guest the steps above are the same for a windows host as they are for a mac host. Just substiture windows_folder_name for mac_folder_name.



Friends,
Let me clarify, Please; My OS is windows 7, to familarise with virtual box, I installed xp as Guest, and I was able to figure it out the Guest additions etc because of my experience with Windows until now. I am new to virtual box, and today I installed Mint as Guest to learn Linux in Virtual Box, so that Ultimately I can install it finally as my Operating system and get rid of virtual Box and windows 7.
My problem is you can install guest additions by clicking in virtual machine interface if the host is Windows, but in Linux, I understand it is a different procedure. Now my problem is getting my Host partitions of Windows 7 to get mounted in Guest OS-which is Mint! When this is resolved I will really apreciate the full 'how- to" procedure.

Thankyou for your genuine concern and willingness to help, yes my first narration was a bit confusing!

Ashfaq Shaikh.
ashfaq
Level 1
Level 1
 
Posts: 42
Joined: Sun Nov 01, 2009 11:07 am

Re: Mounting Sharefolders in Virtual Box, Host win7

Postby altair4 on Sun Nov 01, 2009 3:45 pm

I'm afraid I'm still confused so I'm going to give you everything I know about VirtualBox. When I'm done you'll see it's not much :lol:

The process of installing the Guest additions in a Mint guest is the same as it was in the WinXP guest.
Boot into the Mint Guest
From the top task bar select Devices > Mount CD/DVD-ROM > CD/DVD-ROM Image > VBoxGuestAdditions.iso
Wait a bit until it's actually mounted and then follow the prompts

The process for creating the Windows 7 shared folder is exactly the same as it was for the WinXP guest

The process for mounting the the Windows 7 shared folder in Mint is different.

If you want a step by step on the actual mounting then try this in the booted Mint guest:

NOTE: This is an example. Use your own user name and locations when you do this yourself

user name = altair4
location where you want to mount the Windows 7 shared files in the Mint guest = /home/altair4/Host
VirtualBox "Shared Folder Name" = Win7Share

Open Terminal
Type mkdir /home/altair4/Host
Type sudo mount -t vboxsf -o uid=1000 Win7Share /home/altair4/Host

Make sure you can access, read, and write to /home/altair4/Host before proceeding to the next step.

To automount that share so it's available to you when you boot your Mint guest do this:

Open Termianl
Type sudo su
Type echo "Win7Share /home/altair4/Host vboxsf uid=1000,defaults 0 0" >> /etc/fstab
Type umount /home/altair4/Host
Type mount -a

See if you can access, read, and write to /home/altair4/Host.

As a final test reboot the Mint guest and see if it mounts the Win7Share to /home/altair4/Host automatically.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 13
Level 13
 
Posts: 4654
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounting Sharefolders in Virtual Box, Host win7 (Solved)

Postby ashfaq on Fri Nov 06, 2009 9:33 am

Re: Mounting Sharefolders in Virtual Box, Host win7

Postby altair4 on Sun Nov 01, 2009 8:45 pm
I'm afraid I'm still confused so I'm going to give you everything I know about VirtualBox. When I'm done you'll see it's not much :lol:

The process of installing the Guest additions in a Mint guest is the same as it was in the WinXP guest.
Boot into the Mint Guest
From the top task bar select Devices > Mount CD/DVD-ROM > CD/DVD-ROM Image > VBoxGuestAdditions.iso
Wait a bit until it's actually mounted and then follow the prompts

The process for creating the Windows 7 shared folder is exactly the same as it was for the WinXP guest

The process for mounting the the Windows 7 shared folder in Mint is different.

If you want a step by step on the actual mounting then try this in the booted Mint guest:

NOTE: This is an example. Use your own user name and locations when you do this yourself

user name = altair4
location where you want to mount the Windows 7 shared files in the Mint guest = /home/altair4/Host
VirtualBox "Shared Folder Name" = Win7Share

Open Terminal
Type mkdir /home/altair4/Host
Type sudo mount -t vboxsf -o uid=1000 Win7Share /home/altair4/Host

Make sure you can access, read, and write to /home/altair4/Host before proceeding to the next step.

To automount that share so it's available to you when you boot your Mint guest do this:

Open Termianl
Type sudo su
Type echo "Win7Share /home/altair4/Host vboxsf uid=1000,defaults 0 0" >> /etc/fstab
Type umount /home/altair4/Host
Type mount -a

See if you can access, read, and write to /home/altair4/Host.

As a final test reboot the Mint guest and see if it mounts the Win7Share to /home/altair4/Host automatically.

That was an excellent "how to" it worked great charms for a novice like me, thank-you very much, and sorry for the late reply to the post! altair4 you are doing a great job!
Ashfaq.
ashfaq
Level 1
Level 1
 
Posts: 42
Joined: Sun Nov 01, 2009 11:07 am

Re: Mounting Sharefolders in Virtual Box, Host win7

Postby aharown07 on Tue Dec 07, 2010 12:16 am

Not working for me.
Just installed Mint 10 as virtual box guest in Windows7
Followed steps in this set of instructions

Result...
Code: Select all
sudo mount -t vboxsf -o uid=1000 Win7Share /home/adb/Host
/sbin/mount.vboxsf: mounting failed with the error: No such device


Can't figure out what's wrong.
If it matters, the virtual box version is 3.2.10 r66523 and the Guest Addtions ver. is the same.
aharown07
Level 2
Level 2
 
Posts: 65
Joined: Wed Sep 16, 2009 9:43 pm

Re: Mounting Sharefolders in Virtual Box, Host win7

Postby altair4 on Tue Dec 07, 2010 7:35 am

Well the only "device" parameter in the mount command is "Win7Share" so my guess is that you either didn't create the share or you named it something other than Win7Share. Boot into the Mint guest and select Devices > Share Folders > Add Share > and in "Folder Name" type in Win7Share.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 13
Level 13
 
Posts: 4654
Joined: Tue Feb 03, 2009 10:27 am

Re: Mounting Sharefolders in Virtual Box, Host win7

Postby aharown07 on Tue Dec 07, 2010 10:42 am

I should have mentioned that. Already verified... got the share there and it has the right name (and I've tried half a dozen names now).

Some more background: I had this working in the past just fine with Mint9. But I accidentally deleted my vbox .vdi file (d'oh!) so I figured, might as well go to Mint10.
So... I've done it before, and I'm pretty sure I'm doing the same thing, but--not working. But I think there are still two possiblities:
1) something's broken
2) I'm really not doing "the same thing"!

Could it make a difference that I installed Mint10 disconnected from Internet? (wanted to avoid downloading "language packs," whatever those are)
I'll try another install the slow way and see what happens.

Edit: Well, I'm not sure what had gone wrong, but a reinstall with a new .vdi did the trick... and I went ahead did a connected install w/language packs and all. Working fine now.
aharown07
Level 2
Level 2
 
Posts: 65
Joined: Wed Sep 16, 2009 9:43 pm

Re: Mounting Sharefolders in Virtual Box, Host win7

Postby genothomas on Fri Jun 24, 2011 1:56 am

I tried by the instructions you given above, but I got an error like this.

I created a folder for sharing ie, "Host' in my user folder, and it was fine.
Afterwards while going through the proceedures below...

sudo mount -t vboxsf -o uid=1000 C_DRIVE /home/appi/Host
/sbin/mount.vboxsf: mounting failed with the error: Invalid argument


I already shared by drives in by going through VirtualBox Shared Folders.
I tried by some other methods too, but it is say like it was already mounted, and showing some 'dbus error, invalid arguments'. I don't know what is my problem. I'm using the latest VirtualBox version.
User avatar
genothomas
Level 1
Level 1
 
Posts: 27
Joined: Thu Jan 07, 2010 3:31 pm
Location: Bangalore, India

Re: Mounting Sharefolders in Virtual Box, Host win7

Postby Elisa on Fri Jun 24, 2011 2:07 am

genothomas wrote:....


VirtualBox shared folders example :

sudo mount -t vboxsf Tor_stuff /home/asdf/shared

asdf => your account
shared => name of a shared folder
Tor_stuff => name of the shared folder but set in VBox settings; .../shared => is then the mount point

In the
/etc/fstab
you can add this line (so after boot, the shared folder will be used always, no need it type in terminal again, after reboot and before VBoxed ran):

SharedFolder /home/asdf/shared vboxsf defaults 0 0


That's all the magic (but not whole, somebody can add additional cool examples too :) )
Linux/Unix is about freedom, Windows about slavery.

md5 / sha1 check [how-to for NEWBIES] :idea:

Image
Score: 43 I have some hippie in me. Cool, man 8)
Take the elitemrp.net "Are you a Hippie?" Test
User avatar
Elisa
Level 6
Level 6
 
Posts: 1428
Joined: Wed Aug 18, 2010 6:46 am

Re: Mounting Sharefolders in Virtual Box, Host win7

Postby altair4 on Fri Jun 24, 2011 7:26 am

genothomas wrote:I tried by the instructions you given above, but I got an error like this.

I created a folder for sharing ie, "Host' in my user folder, and it was fine.
Afterwards while going through the proceedures below...

sudo mount -t vboxsf -o uid=1000 C_DRIVE /home/appi/Host
/sbin/mount.vboxsf: mounting failed with the error: Invalid argument


I already shared by drives in by going through VirtualBox Shared Folders.
I tried by some other methods too, but it is say like it was already mounted, and showing some 'dbus error, invalid arguments'. I don't know what is my problem. I'm using the latest VirtualBox version.

Things have changed since this thread started. The latest Virtual Box now automounts these "Shared Folders" without you having to enter anything in fstab or doing any kind of manual mount.

So the procedure today is:

* Create the VBox shared folder ( i.e., C_DRIVE ).
* Start the Mint guest and after logon go to:
/media/sf_C_DRIVE

It will have owner = root, group= vboxsf, and permissions of 0770. So you will have to be a member of the vboxsf group to access it which should have been done automatically. If not then in the Mint guest add yourself to the group:
Code: Select all
sudo gpasswd -a user-name vboxsf

Then logout of the guest and log in again.

The same thing happens in reverse - Linux Host and Windows Guest. It's more obvious in the case of a Windows guest since the "Shared Folder" shows up as a "mapped drive".
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 13
Level 13
 
Posts: 4654
Joined: Tue Feb 03, 2009 10:27 am

Mounting Sharefolders in Virtual Box, Host win7 [SOLVED]

Postby genothomas on Sat Jun 25, 2011 2:48 pm

WOW!! it`s working like a charm.. thanks altair4 :D
User avatar
genothomas
Level 1
Level 1
 
Posts: 27
Joined: Thu Jan 07, 2010 3:31 pm
Location: Bangalore, India

Re: Mounting Sharefolders in Virtual Box, Host win7

Postby FulciLives on Mon Nov 28, 2011 6:50 pm

altair4 wrote:So the procedure today is:

* Create the VBox shared folder ( i.e., C_DRIVE ).
* Start the Mint guest and after logon go to:
/media/sf_C_DRIVE

It will have owner = root, group= vboxsf, and permissions of 0770. So you will have to be a member of the vboxsf group to access it which should have been done automatically. If not then in the Mint guest add yourself to the group:
Code: Select all
sudo gpasswd -a user-name vboxsf

Then logout of the guest and log in again.

The same thing happens in reverse - Linux Host and Windows Guest. It's more obvious in the case of a Windows guest since the "Shared Folder" shows up as a "mapped drive".

Thank you. The problem I had was that Linux Mint 12 did not automatically add me to the vboxsf group. So the the code that did that allowed me to see the shared folder I set up with VirtualBox.

This was on VirtualBox 4.1.6 r74713 with Windows 7 64-bit as Host and Mint 12 64-bit as Guest.

Thanks for the help!

- John "FulciLives" Coleman
User avatar
FulciLives
Level 1
Level 1
 
Posts: 36
Joined: Fri Jun 22, 2007 2:34 am
Location: Pittsburgh, PA USA

Linux Mint is funded by ads and donations.
 

Return to Other topics

Who is online

Users browsing this forum: usbtux and 1 guest