networking and file sharing

Discussions related to using VirtualBox on Windows hosts.
Post Reply
july865
Posts: 5
Joined: 13. May 2009, 07:10
Primary OS: MS Windows other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: ubuntu/fedorea10

networking and file sharing

Post by july865 »

ok, to start with, i have read the manual. trolled the forums, but i am pulling my virtual hair out. i can not, for the life of me figure out how to share files with my host(xp 64 bit) and guest(ubunto and fedora10. 2 seperate vm's). im using VB 2.2.
i am sorry for doing this but i have no where to turn to. i have managed to mangle my video drivers, my router and network drivers. after 2 days, all are repaired now. but still am left with no networking abilities. i do however have internet on both vm's.
i am sooooo wanting to learn linux and thought this would be great practice. then i can give the virtual finger to MS for good.
this is my ultimate goal:
have a program (a game) run on 1 of the vm's. that i need to transfer to the guest. have my friends be able to connect to it and myself from on the host, but leave it up and running so they are able to connect throughout the day with out me being there. having the program run in the vm i thought it would be safer due to it being exposed to the net.
thank you in advance
july
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: networking and file sharing

Post by Perryg »

Steps to create a share in Ubuntu and most Linux Debian Distros

First you must share the folder in the VBox GUI.
  • It makes not difference what it is call only what you give it for a name in VBox so lets name it Shared.
    Now let's start the process in the guest. Open a terminal and type sudo -i and press enter type in your password and press enter again.
    Then type the following to setup the mount point.

    mkdir /home/<your login name>/Shared - and press enter
    mount -t vboxsf Shared /home/<your login name>/Shared - and press enter
At this point you should be able to see the share and files that you have in it. But what do I do to make this permanent?
  • Well you would then need to edit your /etc/rc.local file and add the following:
    While in terminal and still in Sudo mode type gedit /etc/rc.local - press enter.

    Add this to the bottom of the rc.local file
    mount -t vboxsf -o rw,gid=1000,uid=1000 Shared /home/<your login name>/Shared
Notes:
  • The gid and uid must match you user id and group id. For most of us the 1000 is the right one.
    If you see this "/sbin/mount.vboxsf: mounting failed with the error: Protocol error" you typed the Shared and or the Shared path wrong. Also remember that it is case sensitive and you really should not use special characters or spaces.
    What if I want this on my desktop? Open the file browser and drag the folder to the desktop. This will create a copy for you there.
july865
Posts: 5
Joined: 13. May 2009, 07:10
Primary OS: MS Windows other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: ubuntu/fedorea10

Re: networking and file sharing

Post by july865 »

call it a dumb blonde moment, but it worked.
now i was able to connect to my network, and see the computer i have upstairs running through the router (wired), but ubunto (32 bit guest) is unable to see the host machine (xp 64 bit) and it is on the same network.
.
as far as running a program on ubuntu that people from the outside can connect too. what kind of safety issues can i use to prevent unwanted intrusion?
july865
Posts: 5
Joined: 13. May 2009, 07:10
Primary OS: MS Windows other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: ubuntu/fedorea10

Re: networking and file sharing

Post by july865 »

any hints to finding my host machine in the network??
also re: internet safety with the program?
july865
Posts: 5
Joined: 13. May 2009, 07:10
Primary OS: MS Windows other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: ubuntu/fedorea10

Re: networking and file sharing

Post by july865 »

no one??
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: networking and file sharing

Post by Perryg »

Sorry I just saw this again.
You probably have a firewall issue. If they are on the same subnet and you are using bridged mode you should be able to connect via network sharing. Once you try you should be presented with a login and password assuming you have shared something for the others on the network to see. Now on Ubuntu you will need to also share something or it will not even be visible. This will setup a samba share for you if you do this from the file browser and select you home directory to share. Otherwise you will need to be logged is as an administrator (which is not allowed anymore) so you would need to know how to sudo in and set a share by using the CLI. You might want to Google these things and see how to do this.
Post Reply