Shared Folder is not accessible, parameter is incorrect

Discussions related to using VirtualBox on Linux hosts.
...don
Posts: 33
Joined: 24. May 2012, 18:00
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Windows

Shared Folder is not accessible, parameter is incorrect

Post by ...don »

Linux host, Windows 10 guest.
Since Tuesday the Shared Folders on my VMs have stopped working. These are shares that have been in place and working for over a year. They are defined in the VirtualBox Manager’s Shared Folders tab, and are configured as Auto-mount. When trying to access the folder via Window’s File Manager I get something like:
W:\ is not accessible. The parameter is incorrect.
I have tried:
1) Deleting and re-adding the Shared Folder.
2) Defining a new Shared Folder on a different Linux mount point.
3) Re-installing the VirtualBox extensions.
4) There is the message in the VBox.log:
a. SharedFolders host service: Try to increase the limit for open files (ulimit -n)
b. SharedFolders host service: Cannot open '/Emergency/desktop.ini' -- too many open files.
c. Using lsof there are over 300,000 entries of the form:
VirtualBo 4820 root DEL REG 0,1 41500 /dev/zero
VirtualBo 4820 root 94r DIR 0,47 0 5452401 /Emergency
d. I doubled the nofiles from 1024 to 2048 with which increased the number of the above messages but the share still failed with the “too many open files message”.
e. Removing the Shared Folders definition removes the /Emergency lsof entries, but the /dev/zero messages remain.
5) Upgrading VirtualBox and the extensions from 6.1.14 -> 6.1.16.
6) Disabling the anti-virus and the firewall.
7) Starting a VM that has not been used in over 6 months and would not have any OS patches that might be problematic, but it froze after startup and would not capture the mouse or accept any keyboard input. VirtualBox Manager eventually pops up a “VM not responding” message.
8) Copying the VMs to another physical machine that did not have any recent kernel updates with similar results.
9) Applying all current patches to both Linux and Windows.
10) Switching Auto-mount on and off.
11) Running Window's sfc /scannow

JungleDisk and Samba shares are still working.

I have log files, but the broken share is how I would normally access them. 'Working on an alternative.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Shared Folder is not accessible, parameter is incorrect

Post by scottgus1 »

Start the guest from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the guest from within the guest OS if possible. If not possible, close the Virtualbox window for the guest with the Power Off option set.

Right-click the guest in the main Virtualbox window's guest list, choose Show Log. Save the far left tab's log, zip it, and post the zip file, using the forum's Upload Attachment tab.

Also, right-click the guest in the main Virtualbox window's guest list, choose Show in File Manager. Zip the guest's .vbox file, and post the zip file, using the forum's Upload Attachment tab.
...don
Posts: 33
Joined: 24. May 2012, 18:00
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Windows

Re: Shared Folder is not accessible, parameter is incorrect

Post by ...don »

OK. May take a day or two.
...don
Posts: 33
Joined: 24. May 2012, 18:00
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Windows

Re: Shared Folder is not accessible, parameter is incorrect

Post by ...don »

Files attached. Name of the share was "Fileshare".

I also attached a lsof zip file which was the output from the lsof command. It was run previously and at that time the name of the share was "Emergency". I had to delete about 180,000 /dev/zero entries in order to make it small enough to upload.
Attachments
lsof.7z
(148.9 KiB) Downloaded 7 times
Wren10C-2020-10-28-21-03-48.zip
(47.65 KiB) Downloaded 9 times
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Shared Folder is not accessible, parameter is incorrect

Post by fth0 »

You've already analyzed correctly with lsof that VirtualBox opens too many files (the folder /Emergency, to be more exact). I'd suggest to start the VM from a terminal within strace, e.g. with

Code: Select all

strace -tt -f -o strace.log VBoxManage startvm Wren10C
Maybe we can deduce something from that.
...don
Posts: 33
Joined: 24. May 2012, 18:00
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Windows

Re: Shared Folder is not accessible, parameter is incorrect

Post by ...don »

File attached. Booted system, logged on, opened file explorer, tried to access share (Z:), got error message, shutdown.
Attachments
strace.zip
(75.91 KiB) Downloaded 10 times
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Shared Folder is not accessible, parameter is incorrect

Post by fth0 »

My bad, sorry! Please try

Code: Select all

strace -tt -f -o strace.log VirtualBoxVM --startvm Wren10C
harald123
Posts: 64
Joined: 30. Oct 2020, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Linux Mint 19 Tara

Re: Shared Folder is not accessible, parameter is incorrect

Post by harald123 »

I have the same issue, shared folder not showing up.

- reinstalled Guest Additions several times - verified it runs correctly
- Extension Pack is also there
- Version: 6.1.14r140239 (VirtualBox and Guest Additions)
- in the log file I see this entry related to shared folders:
Shared Folders service loaded
otherwise, no other message , warning or error.
- tried with and without 'permanently mount' and drive letter "E" and "E:"
- re-adding shared folder

L:E: I also ran lsof on the guest, but found nothing with the name of the share or with VirtualBox.
...don
Posts: 33
Joined: 24. May 2012, 18:00
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Windows

Re: Shared Folder is not accessible, parameter is incorrect

Post by ...don »

I have an updated strace.log, but it is too large to attach ( 38M zipped).
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Shared Folder is not accessible, parameter is incorrect

Post by fth0 »

harald123 wrote:I have the same issue
I doubt that. ;)

You may have an issue where you can't access a shared folder, but the rest of your post already shows that the cause will most probably be different. Please open your own thread.
Last edited by fth0 on 3. Nov 2020, 01:32, edited 1 time in total.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Shared Folder is not accessible, parameter is incorrect

Post by fth0 »

...don wrote:I have an updated strace.log, but it is too large to attach ( 38M zipped).
Do you have a Google Drive or a Dropbox or something like that, where you can provide the file? You can send me the link via PM, but do not use a link shortener service that I cannot trust. ;)

Alternatively, you can provide all lines containing " open" for a first analysis step, but this could lead to a lot of ping-pong communication then ...
...don
Posts: 33
Joined: 24. May 2012, 18:00
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Windows

Re: Shared Folder is not accessible, parameter is incorrect

Post by ...don »

fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Shared Folder is not accessible, parameter is incorrect

Post by fth0 »

In the strace.log file, the ShFolder thread opens the folder "/Fileshare/" to query information with fstat, and closes it again after some seconds. For some unknown reason, this happens in rapid succession (about every few milliseconds), and since the rate of opening is higher than the rate of closing, the limit for open files is inevitably reached after some time.

I can only guess about the cause. Things that came to mind:

1. The file system btrfs: Can you try another file system for the shared folder?

2. How many files and folders are inside the shared folder? How large and how full is the file system?

3. Right after mounting the shared folder the clock is corrected, probably because of using Hardware Clock in UTC Time and the switch to local time. Can you try if using local time right away makes a difference?

PS: If you provide another strace.log file, please accompany it with the matching VBox.log file.
...don
Posts: 33
Joined: 24. May 2012, 18:00
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Windows

Re: Shared Folder is not accessible, parameter is incorrect

Post by ...don »

All of my file systems are currently btrfs. However, this had been working for over a year with this exact same configuration.

Item 2) In the original post was with a share that only had one file in it. The disk is 15% free.
...don
Posts: 33
Joined: 24. May 2012, 18:00
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Windows

Re: Shared Folder is not accessible, parameter is incorrect

Post by ...don »

Shared a folder on the boot drive which is vfat. Same error.

Switched from UTC. Same error.
Post Reply