[Solved] Shared Windows Folder Fails to Automount on Reboot

Discussions about using Linux guests in VirtualBox.

[Solved] Shared Windows Folder Fails to Automount on Reboot

Postby johnywhy » 5. Nov 2019, 20:38

My shared folder isn't getting auto-mounted when i reboot the guest.

Running archlabs linux on Windows 10 with VirtualBox Version 6.0.14 r133895 (Qt5.6.2)

According to arch wiki, I installed virtualbox-guest-utils and xf86-video-vmware, "for the default linux kernel choose virtualbox-guest-modules-arch".
https://wiki.archlinux.org/index.php/Vi ... _Additions

i am getting shared clipboard no problem. The VBox Guest Additions CD is NOT in the guest CD drive (is it supposed to be?)

https://i.ibb.co/bWysnTq/image.png

The shared folder mounted first try when added manually (with vbox shared-folder wizard) no problem. But now i cannot mount the shared in any way.
Code: Select all   Expand viewCollapse view
# mount Documents /home/johny/Laptop/
mount: /home/johny/Laptop: special device Documents does not exist.

i enabled the vboxservice.service before rebooting
systemctl enable vboxservice.service
Code: Select all   Expand viewCollapse view
# modinfo vboxsf
filename:       /lib/modules/5.3.8-arch1-1/extramodules/vboxsf.ko.xz
alias:          fs-vboxsf
license:        GPL v2
author:         Oracle Corporation
description:    Oracle VM VirtualBox Module for Host File System Access
srcversion:     AEC2C1E4AFEE39F60211AEA
depends:        vboxguest
retpoline:      Y
name:           vboxsf
vermagic:       5.3.8-arch1-1 SMP preempt mod_unload
parm:           follow_symlinks:Let host resolve symlinks rather than showing them (int)

i added user to vboxsf group
Code: Select all   Expand viewCollapse view
gpasswd -a johny vboxsf
Last edited by johnywhy on 8. Nov 2019, 22:00, edited 3 times in total.
johnywhy
 
Posts: 22
Joined: 21. Jan 2009, 22:32

Re: Shared Windows Folder Fails to Automount on Reboot

Postby socratis » 5. Nov 2019, 20:52

johnywhy wrote:According to arch wiki
... which should get an update because it's (unusually) seriously outdated...

How about reading the User Manual? With the VM window having the focus, go to the host's menu "Devices" » "Insert Guest Additions CD Image...". If not prompted by auto-run, run "VBoxLinuxAdditions.run" from the CD. Make sure there are no errors or suggestions during the install. You can safely ignore the "modprobe vboxsf" one.

Image


If that doesn't work, we need to see a complete VBox.log, from a complete VM run, where the problem occurs:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe or recreate the problem / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
Image
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.
socratis
Site Moderator
 
Posts: 27695
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Shared Windows Folder Fails to Automount on Reboot

Postby johnywhy » 5. Nov 2019, 21:25

i ran the linux additions script on the CD. It executed no problem, but gave a message to install linux headers.
Before doing that, i updated the OS. Then i installed linux-headers package.

Now i can't seem to run the additions script:
Code: Select all   Expand viewCollapse view
[root@lilegg VBox_GAs_6.0.14]# VBoxLinuxAdditions.run
bash: VBoxLinuxAdditions.run: command not found

i'd like to understand how i was able to mount the shared folder at first. That's strange.

log attached
Attachments
ArchLabs-2019-11-05-11-26-37.zip
(42.72 KiB) Downloaded 4 times
johnywhy
 
Posts: 22
Joined: 21. Jan 2009, 22:32

Re: Shared Windows Folder Fails to Automount on Reboot

Postby socratis » 5. Nov 2019, 23:01

00:00:32.927519 VMMDev: Guest Log: vboxguest: host-version: 6.0.14r133895 0x8000000f
00:00:32.928150 VMMDev: Guest Additions information report: Version 6.0.0 r127566 '6.0.0'
Your Guest Additions are not installed. You need to focus on that 'johnywhy' forget the SharedFolders and the SharedClipboard, unless you install the GAs properly nothing will work.

johnywhy wrote:but gave a message to install linux headers
Of course you need the kernel headers to compile kernel modules. I don't remember the specific kernel headers needed, but I believe it includes the developer headers too, as in try to install the following and see what works:
kernel-headers-$(uname -r) kernel-devel-$(uname -r)
I want to focus on the GAs installation, I want to see every single error message. Not a generic description, but the exact error message.


BTW, I believe I asked for a new VBox.log from a start/login/shutdown cycle, didn't I? Instead I get:
00:00:06.893325 Log opened 2019-11-05T01:42:27.640424400Z
...
00:00:09.606159 Changing the VM state from 'CREATING' to 'CREATED'
00:00:09.610913 Changing the VM state from 'CREATED' to 'POWERING_ON'
00:00:09.611610 Changing the VM state from 'POWERING_ON' to 'RUNNING'
01:28:08.152003 Changing the VM state from 'RUNNING' to 'RESETTING'
01:28:08.344472 Changing the VM state from 'RESETTING' to 'RUNNING'
01:36:57.694225 Changing the VM state from 'RUNNING' to 'RESETTING'
01:36:57.861961 Changing the VM state from 'RESETTING' to 'RUNNING'
03:57:31.054454 Changing the VM state from 'RUNNING' to 'RESETTING'
03:57:31.327099 Changing the VM state from 'RESETTING' to 'RUNNING'
04:35:08.120291 Changing the VM state from 'RUNNING' to 'RESETTING'
04:35:08.341023 Changing the VM state from 'RESETTING' to 'RUNNING'
04:40:04.805924 Changing the VM state from 'RUNNING' to 'SUSPENDING'
04:40:05.741146 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'
04:40:08.263493 Changing the VM state from 'SUSPENDED' to 'RESUMING'
04:40:08.595995 Changing the VM state from 'RESUMING' to 'RUNNING'
04:47:56.218102 Changing the VM state from 'RUNNING' to 'RESETTING'
04:47:56.394261 Changing the VM state from 'RESETTING' to 'RUNNING'
16:05:21.692446 Changing the VM state from 'RUNNING' to 'SUSPENDING'
16:05:21.777338 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'
16:05:24.260139 Changing the VM state from 'SUSPENDED' to 'RESUMING'
16:05:24.271372 Changing the VM state from 'RESUMING' to 'RUNNING'
16:59:56.792035 Changing the VM state from 'RUNNING' to 'RESETTING'
16:59:56.985138 Changing the VM state from 'RESETTING' to 'RUNNING'
17:17:17.498691 Changing the VM state from 'RUNNING' to 'RESETTING'
17:17:17.630440 Changing the VM state from 'RESETTING' to 'RUNNING'
17:20:46.534701 Changing the VM state from 'RUNNING' to 'SUSPENDING'
17:20:46.653147 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'
17:20:46.679825 Changing the VM state from 'SUSPENDED' to 'RESUMING'
17:20:46.690024 Changing the VM state from 'RESUMING' to 'RUNNING'
17:32:33.354630 Changing the VM state from 'RUNNING' to 'RESETTING'
17:32:33.500472 Changing the VM state from 'RESETTING' to 'RUNNING'
17:44:16.807545 Changing the VM state from 'RUNNING' to 'POWERING_OFF'

If you think that you're going to have me (or anyone else) analyzing an 18-hour long, old log that you just picked randomly from your Logs directory, you got another thing coming. If you can't follow some simple instructions, I'm outta here...
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.
socratis
Site Moderator
 
Posts: 27695
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Shared Windows Folder Fails to Automount on Reboot

Postby johnywhy » 5. Nov 2019, 23:24

I sent the log after shutting down. the first "VBox.log", zipped, as you requested.

If you think I'm carelessly disregarding your guidance, you're free to stop helping.

I'll try again.
johnywhy
 
Posts: 22
Joined: 21. Jan 2009, 22:32

Re: Shared Windows Folder Fails to Automount on Reboot

Postby johnywhy » 6. Nov 2019, 01:09

can you share your source for that kernel-headers package? It's not recognized by my arch, with or without version #. Are you sure about that?
Code: Select all   Expand viewCollapse view
# pacman -S kernel-headers-$(uname -r)
error: target not found: kernel-headers-5.3.8-arch1-1
# pacman -S kernel-devel-$(uname -r)
error: target not found: kernel-devel-5.3.8-arch1-1
# pacman -S kernel-devel
error: target not found: kernel-devel
# pacman -S kernel-headers
error: target not found: kernel-headers

i installed the package "linux-headers", but that didn't seem to help.
https://www.archlinux.org/packages/core/x86_64/linux-headers/
Code: Select all   Expand viewCollapse view
# VBoxLinuxAdditions.run
bash: VBoxLinuxAdditions.run: command not found

New log attached.

Btw, i don't know why you put my username in quotes "johnywhy". What are you trying to say? Please reflect on your attitude.

thx
Attachments
ArchLabs-2019-11-05-14-24-37.zip
(28.19 KiB) Downloaded 3 times
johnywhy
 
Posts: 22
Joined: 21. Jan 2009, 22:32

Re: Shared Windows Folder Fails to Automount on Reboot

Postby fth0 » 6. Nov 2019, 02:17

johnywhy wrote:Btw, i don't know why you put my username in quotes "johnywhy".

Each of the regular users (especially volunteers/moderators) has its own way of highlighting proper names, including user names. While socratis regularly uses 'single quotes', I regularly use italics for example. There is nothing else to interpret into that. ;) Take a look at several random posts of us ...
fth0
Volunteer
 
Posts: 464
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, macOS, ...

Re: Shared Windows Folder Fails to Automount on Reboot

Postby socratis » 6. Nov 2019, 02:48

johnywhy wrote:I sent the log after shutting down. the first "VBox.log", zipped, as you requested.
Sure, absolutely. But you forgot the first part, where you start a VM from cold boot. The procedure is tailored so that it highlights the problem with the minimum effort. That saves the analysts a lot of trouble going through thousands and thousands of log lines.

johnywhy wrote:If you think I'm carelessly disregarding your guidance, you're free to stop helping.
First time offender? No... ;)

johnywhy wrote:can you share your source for that kernel-headers package?
I don't have a readily available Arch VM, I might get one, but given the amount of topics on the to-take-a-look-at list, I highly doubt it. I would ask at the Arch forums, which headers are required to build a kernel module.

johnywhy wrote:
# VBoxLinuxAdditions.run
That will not work. Linux won't run anything like that, you need to specify the directory that you want the executable to run from. And if you've already "cd" to the GAs directory, you need to add "./" before the executable, as in:

    # ./VBoxLinuxAdditions.run

As for the single quotes, 'fth0' just gave you the answer. I put variables (like the username) in single-quotes, just recently started doing it, nothing meant...
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.
socratis
Site Moderator
 
Posts: 27695
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: Shared Windows Folder Fails to Automount on Reboot

Postby johnywhy » 8. Nov 2019, 21:58

Update: This isn't the solution for my default arch kernel. See post below for correct solution.

I had to reinstall arch (for other reasons).

Then i was able to get shared-folders working. Here are steps that were needed to enable shared folders. Not sure if all these steps are needed, but something(s) here did the trick.

install gvfs for CD drive.

i installed these: virtualbox-guest-modules-arch and virtualbox-guest-utils. But at that point, was getting "vboxsf service does not exist", and still could not mount host folders.

I installed VBoxLinuxAdditions.run as instructed in this thread, it reported that guest additions were already installed. I'm assuming that's referring to the virtualbox packages, above. Since folder-mounting wasn't working, i went ahead and re-installed off the CD. That seemed to be needed.

I confess to being caught between the VirtualBox doc (which says to use the VBox CD) and arch doc (which says to install VBox packages). Of course, both teams insist i follow their doc :D

Not sure if virtualbox-host-dkms is needed, but based on some other threads i read, i installed that too.

Also the following.
Code: Select all   Expand viewCollapse view
systemctl enable vboxservice.service
modprobe -a vboxguest vboxsf vboxvideo
mkdir /mnt/D_DRIVE
mount -t vboxsf D_DRIVE /mnt/D_DRIVE/

The folder mounted, and auto-mounts on boot.

It would be cool to know which of these steps can be skipped, for future reference.

thx!
Last edited by johnywhy on 10. Nov 2019, 01:43, edited 1 time in total.
johnywhy
 
Posts: 22
Joined: 21. Jan 2009, 22:32

Re: [Solved] Shared Windows Folder Fails to Automount on Reboot

Postby johnywhy » 10. Nov 2019, 01:42

The 'solution' above isn't correct, particularly the dkms and the Guest Additions CD. Here are the steps that worked for me (i posted same steps in another of my threads, that thread should have been part of thread, but i didn't realize at the time that it was the same issue).
viewtopic.php?f=3&t=95518

Here's the correct fix.

i removed the Guest Additions installed from the VBox CD
Code: Select all   Expand viewCollapse view
./VBoxLinuxAdditions.run uninstall


Also removed virtualbox-host-dkms, which was my error (meant for non-default kernel, i think). I suspect this might have been the source of the loading error.
Code: Select all   Expand viewCollapse view
pacman -Rus virtualbox-host-dkms

That failed, with an alert to run `dkms remove`, but i didn't have success with that. I read that the dkms directory can just be manually deleted, so i did that, and then uninstalled again.

Installed virtualbox-guest-utils and virtualbox-guest-modules-arch as directed on arch wiki
Code: Select all   Expand viewCollapse view
pacman -S virtualbox-guest-utils
pacman -S virtualbox-guest-modules-arch


i might have enabled the service, i don't recall, but it's running
Code: Select all   Expand viewCollapse view
systemctl enable vboxservice.service


added the modules, but not sure if necessary
Code: Select all   Expand viewCollapse view
modprobe -a vboxguest vboxsf vboxvideo


i added the users to the group, but not sure if that was even necessary
Code: Select all   Expand viewCollapse view
gpasswd -a johny vboxsf
gpasswd -a root vboxsf


No more loading errors, everything seems working as expected.

i think these steps are the recommended arch process. I may have repeated some of the above steps in abnormal order, so it would be cool to know the correct order.

i read someplace (sorry, lost the link) that as of version 6, auto-mounting shared folders no longer works (might be just an arch problem). Here's how i enabled auto-mounting:

Code: Select all   Expand viewCollapse view
mkdir /mnt/D_DRIVE
mount -t vboxsf D_DRIVE /mnt/D_DRIVE/
genfstab -L / >> /etc/fstab

THEN REMOVE CD DRIVE FROM FSTAB, OR CAN'T BOOT.

thx!
johnywhy
 
Posts: 22
Joined: 21. Jan 2009, 22:32


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 11 guests