[WorksForMe] Shared folders on wrong drive letters

Discussions about using Windows guests in VirtualBox.
NickC_UK
Posts: 20
Joined: 2. Apr 2012, 17:55

[WorksForMe] Shared folders on wrong drive letters

Post by NickC_UK »


MOD EDIT
This is not something that VirtualBox has control over. If you use the "Automount" feature in the Shared folders options, Windows assigns the letter to the share, not VirtualBox.

If you want to have control over the letter assignment, do not use the "Automount" feature, just use the Windows Explorer "Map network drive...", with the "Reconnect at logon" option enabled, and the letter of your choice.

I have added some Shared Folders to a VM. Problem is there is no way to set the drive letters used within the Win 7 VM. I have tried removing them from Win 7 and mapping new network drives but when rebooted they all show up twice. Is there a better way of sharing folders with the VMs.

Is there some way to get the VMs to see normal shares on the host and map drives that way. At the moment my VMs don't seem to be able to see the host even though they are on the same workgroup, is trhis down to the network adapter type which is currently NAT.

Thanks,
Nick
Last edited by socratis on 1. Jun 2018, 23:43, edited 1 time in total.
Reason: Marked as [WorksForMe].
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Shared folders on wrong drive letters

Post by mpack »

That is not a VirtualBox question. You are asking how to map a driver letter to a shared folder in Windows 7. That is a question best addressed on a Microsoft forum.

ps. Moving to Windows Guests, since I don't see how the host OS is relevant to the question you asked.

In any case I don't understand the problem. If you choose "Tools|Map Network Drive..." in any explorer Window, or open a console window and type "net use ..." either way you get to pick the drive letter. Of course you can't pick a drive letter that's already in use.
NickC_UK
Posts: 20
Joined: 2. Apr 2012, 17:55

Re: Shared folders on wrong drive letters

Post by NickC_UK »

Looks like I was using the Virtualbox sharing option which doesn't allow for drive letters to be set. Now ignoring the Virtualbox sharing facility and doing it natively on the os which works fine. Just needed to change the network type to Bridge before the VMs could see the host server.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Shared folders on wrong drive letters

Post by mpack »

NickC_UK wrote:Looks like I was using the Virtualbox sharing option which doesn't allow for drive letters to be set.
It certainly does. You do have to know the correct path to the share of course, i.e. \\vboxsvr\sharename. An example is given in section 4.3.1 of the manual.
donkeyhead
Posts: 3
Joined: 24. Oct 2016, 23:11

Re: Shared folders on wrong drive letters

Post by donkeyhead »

mpack wrote: In any case I don't understand the problem. If you choose "Tools|Map Network Drive..." in any explorer Window, or open a console window and type "net use ..." either way you get to pick the drive letter. Of course you can't pick a drive letter that's already in use.
mpack... I don't think you understand OP's question (and he's already done the Tools|Map Network Drive..." to no avail).

He wants Automatic Mounting to use the drive letter of his choice.

Quoting Sec 4.3.2: "any auto-mounted shared folder will receive its own drive letter (e.g. E:)"

Virtual box chose E:.... but OP wants to be able to specify the letter, not have virtualbox choose for him. Any idea how to do this?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Shared folders on wrong drive letters

Post by socratis »

No, mpack understood quite well the OP's question. Please try to read the answer again.
- Letter assignment is done by Windows.
- VirtualBox has no control over Windows' drive assignment, therefore you have to do it from within Windows.
Which part wasn't already in the answer / which part didn't you understand?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
donkeyhead
Posts: 3
Joined: 24. Oct 2016, 23:11

Re: Shared folders on wrong drive letters

Post by donkeyhead »

socratis wrote: Which part wasn't already in the answer
You and mpack have answered absolutely nothing. Perhaps re-wording OP's question will help, so here it goes:

The goal here is to have virtualbox auto-mount to the drive letter of the user's choice. Is this possible, yes or no?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Shared folders on wrong drive letters

Post by socratis »

NO!
Is that clear enough or you want me to draw it for you?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Shared folders on wrong drive letters

Post by mpack »

It has already been said that VirtualBox has no control over what additional labels a guest OS applies to a shared folder. That label is a purely software convenience invented by the OS, and different for every OS: it has nothing to do with the hardware level where VirtualBox works. Even within Windows guests you don't have to assign a drive letter at all.

I would have thought it would hence be plain to anyone who thinks about this at all that VirtualBox can't let you fine tune the value of no control.
ChipMcK
Volunteer
Posts: 1095
Joined: 20. May 2009, 02:17
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Windows, OSX
Location: U S of A

Re: Shared folders on wrong drive letters

Post by ChipMcK »

donkeyhead wrote: The goal here is to have virtualbox auto-mount to the drive letter of the user's choice. Is this possible, yes or no?
If you do not auto-mount, you may chose any drive letter you desire, except those in use.
rdos14
Posts: 1
Joined: 3. Feb 2018, 19:53

Re: Shared folders on wrong drive letters

Post by rdos14 »

socratis wrote:NO!
Is that clear enough or you want me to draw it for you?
nirsoft drive letter view

With that tool you can change it... you dont have to be rude...
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Shared folders on wrong drive letters

Post by BillG »

And what does that have to do with VirtualBox? That is a utility which runs on the host to tell you what drive letters are used on the host and allows you to change them.

VirtualBox is not really interested in Windows drive letters.
Bill
BillG
Volunteer
Posts: 5105
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Shared folders on wrong drive letters

Post by BillG »

To return to the original post, what OS is running on the host machine? If it is also Windows, the simplest solution is to use Windows file sharing, but that requires that host and guest are in the same network, which isn't the case with NAT. If the host is on a LAN, using bridged networking will cause the guest to look like another PC on the LAN (as far as networking is concerned) and will share files just like any LAN PC.

If the host is not on a LAN, things are harder. The only networking option between host and guest is host only, and file sharing is very tricky to set up that way. Your best bet would be VirtualBox shared folders. To configure a share on a running vm, go to Devices and click the + sign. Click the down arrow in Folder Path to browse for the host folder to share. The shares will show up in the Network display as VBOXSVR.
VBOXSVR.PNG
Bill
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Shared folders on wrong drive letters

Post by socratis »

Just a small addition to what BillG said; VirtualBox shared folders do not require any networking at all.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
heavymx
Posts: 6
Joined: 23. Oct 2014, 20:11

Re: Shared folders on wrong drive letters

Post by heavymx »

I don't know if somebody gave a right answer, but regarding the original question post:

The next worked for Me:

1.- Turn off your guest OS.

2.- In the virtual machine details (VM VirtualBox Manager) go to Shared Folders section and select the shared folder you want to change the letter in windows guest, in the right pane click on the folder icon that has a yellow dot (to edit the shared folder), then UNTICK Auto-mount -- then OK
.
3.- Turn on your windows guest again and open the windows explorer, then, on the quick menu above, click on Map Network Drive, and select the letter of your choice.

Image here:
https://flic.kr/p/23QCxv9


4.- Click on Browse and wait while the network icon expands the networks, look for the \\VBOXSVR network and expand the tree to see your shared folder(s), then select it and make sure the reconnect at login option is ticked,

Image here:
https://flic.kr/p/23ycFPk

turn off the guest.

That's it.

Next time you login your shared folders will appear with the letter you assigned.

IMPORTANT NOTE: DO NOT TICK AGAIN Auto-mount in the guest settings in VM VirtualBox Manager.

Thanks.
Locked