Can't Create Shared Folders

Discussions related to using VirtualBox on Windows hosts.
Post Reply
raygk
Posts: 7
Joined: 24. Jul 2008, 23:05

Can't Create Shared Folders

Post by raygk »

I have several Windows type guest machines that were either first built with VB 2.2 or with the new VB 3.0.2 which I am using now. I have had poor luck in creating shared folders with all of the guest machines.

So far only one shared folder has "taken" and can be used. This is with a guest Windows XP machine on a Windows XP host (don't ask me why I would do this). I have tried creating shared folders by the settings dialog option with the guest off; by the devices option with the guest on; by using the folder icon in the guest status bar and by command line using VBoxManage. None work to produce a shared folder that I can use. All attempted shares are shown in the status bar, in the devices option and in settings. The status bar folder mouse over shows the attempted shared folders as if they were available.

The one shared folder that does work was originally created in VB 2.2 by the command line option.

I must be doing something wrong but I have run out of ideas. For my purposes, one or two shared folders is essential to my use of VB - I am testing software under different operating systems. Any help will be most welcome. Thanks in advance.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can't Create Shared Folders

Post by Perryg »

Have you read section 4.6. Folder sharing in the users guide? It pretty much covers this really well.
Or you can see how to do it from here: VirtualBox FAQ
raygk
Posts: 7
Joined: 24. Jul 2008, 23:05

Re: Can't Create Shared Folders

Post by raygk »

Thanks for the reply.

This is similar to a question I had about using USB. I did follow section 4.6 of the guide and the command line mapping command as noted in the FAQ but nothing worked. Now, when I tried to map the shared folders again, it worked!! I may not have done everything correctly but I did try many times without success before. As I mentioned in another topic about my USB problem, I had re-installed Guest Additions and did a repair install on VB 3.0.2. Although that did not seem to help at the time, today I noted that my USB problem was gone. Now the shared folders problem seems to be gone too!

Thanks again for your help.
Arizona Willie
Posts: 10
Joined: 14. Jul 2009, 01:13
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Windows 7 RC

Re: Can't Create Shared Folders

Post by Arizona Willie »

I have problems with shared folders also.

I created the folders and READ THE DIRECTIONS and followed suggestions given here.

But, although the folders show up in Settings / Shared Folders and when I click the folder icon at the bottom of the page etc. etc.
they do not show up in Window Explorer like the manual says they should.

Good thing I'm already bald or I would have pulled my hair out with this problem.

Everything looks like it should work ... but it doesn't.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can't Create Shared Folders

Post by Perryg »

Open a command window in the windows guest and type this:

Code: Select all

net use z: \\vboxsvr\<sharename> -p
Replace <sharename> with the name you gave it in the settings.
For each share you will need to use a different drive letter so it would be net use y: \\~ and net use x: \\~ and so on.
Arizona Willie
Posts: 10
Joined: 14. Jul 2009, 01:13
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Windows 7 RC

Re: Can't Create Shared Folders

Post by Arizona Willie »

I have done this several times and it doesn't work for me.

Question ... should < sharename> use the arrow brackets? I haven't used those.

Question...where I have the shared folder defined under settings in the Vbox menu should the shared folder be listed as c:\VMshare or as z:\VMshare?

Right now when I look at the Shared Folders under Settings it shows

Machine Name Path Access

VMshare C:\VMshare Full


The shared folder was created on the C drive on the host so i would expect it should be defined as residing on C but since VBox thinks my G drive ( where the virtual machine software actually resideds ) is C it confuses me ... to say the least ... which doesn't take much.

I have tried going into the Command Prompt and typing: net use z:\\vboxsvr\VMshare -p

But it doesn't work ... or at least the folder still doesn't show up in Explorer.

I have tried using : net use C:\\vboxsvr\VMshrare -p also

and that doesn't work either.


I wonder if having capital letters in the path name is causing problems.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can't Create Shared Folders

Post by Perryg »

net use z: \\vboxsvr\VMshare -p

This is what you need to type in the command window. Notice the space after z: and before the \\
If you look at the settings and shared folders you will see that the share name is the first thing followed by the full path and the rights.
The only thing that you are interested in is the first part (the share name).
raygk
Posts: 7
Joined: 24. Jul 2008, 23:05

Re: Can't Create Shared Folders

Post by raygk »

The shared folder was created on the C drive on the host so i would expect it should be defined as residing on C but since VBox thinks my G drive ( where the virtual machine software actually resideds ) is C it confuses me ... to say the least ... which doesn't take much.
I'm sure no expert on this but here is my 2 cents worth. If I am reading your comment correctly, you are looking in the wrong place. The shared folder should appear in your file manager as a separate drive on the guest machine, not as a "folder" on C when you map the drive. The drive will have the letter designation you gave it in the command "net use z: ..." (in this case "z"). Your "shared" z dive should be labeled as sharedname (\\vboxsvr) (Z:) where "sharedname" is the name you gave the shared folder (VMshare) when creating it and Z: is the guest's actual drive designator for the shared folder in your guest machine. At least that's the way it works on mine.

Another thought. Where are you typing the mapping command? Are you sure you are doing this from the command line in the guest machine? Sometimes it is difficult do realize which machine you are actually in. I do not know what the "-p" parameter at th end of the mapping command is (haven't found it in the guide) nor did I use it but all worked just fine for me.

If all else fails, you might what to try what I did. It may, or may not, have solved my problems with UBS and shared folders but I did a re-install of the Guest Additions and I also did a repair re-install of VB 3.0.2. Neither of these seemed to immediately resolve the problems but the next day everything worked without me doing anything else to "fix" the problems.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can't Create Shared Folders

Post by Perryg »

@raygk,

The -p at the end is a switch that sets the mapping to persistent. Without it you need to type the mapping each time you reboot the guest machine.
Arizona Willie
Posts: 10
Joined: 14. Jul 2009, 01:13
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Windows 7 RC

Re: Can't Create Shared Folders

Post by Arizona Willie »

Thank you .... thank you .... thank you PERRYG.

That was the problem ... I wasn't putting a space after the z:

As soon as I did that it worked perfectly.

As the other poster said, it does show up under Computer as a drive ... not under Network.

Who cares as long as it shows up and can be accessed so I can pass stuff between machines.

Clumsy to have to copy things to the shared folder but it will do the job.

Thanks again.
raygk
Posts: 7
Joined: 24. Jul 2008, 23:05

Re: Can't Create Shared Folders

Post by raygk »

@ Perryg

Thanks for the info. This doesn't seem to be necessary with VB 3.0.2 though. I didn't use it and don't need to do anything to see the shared drives after reboot. Anyway, what ever works... :)
Post Reply