Shared folders failure

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Urhixidur
Posts: 19
Joined: 5. Aug 2010, 22:20
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu 12, 14
Location: Québec, QC, Canada
Contact:

Shared folders failure

Post by Urhixidur »

After upgrading my Linux guest's kernel to 4.0.5 (Ubuntu 12.04.5), the shared folders from my Windows host (Windows 7 Enterprise Service Pack 1) won't show any content. The Virtual Box extensions have been re-installed, so that's not it. I tried removing and adding the shared folder back in the machine's configuration: no effect. If I revert to a pre-upgrade virtual machine, the shared folder comes back.

What's wrong?
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Shared folders failure

Post by loukingjr »

Just a guess but perhaps the packages for Ubuntu 12.04 are too old to build the guest addition modules against the 4.0.5 kernel?

Even the latest daily builds of 15.10 versions of 'buntus are still using the 3.19 kernels.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can'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: Shared folders failure

Post by Perryg »

You should be able to rebuild the additions and see if there are any warnings/errors.

Run the following in the guests terminal

Code: Select all

sudo /etc/init.d/vboxadd setup
Note you also need headers that match the kernel so if you did not install that when you installed the kernel there is your issue. Still the rebuild will notify you about that.
Urhixidur
Posts: 19
Joined: 5. Aug 2010, 22:20
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu 12, 14
Location: Québec, QC, Canada
Contact:

Re: Shared folders failure

Post by Urhixidur »

Re-installing the virtual box additions from the iso seemed to have worked just fine (right after installing the new kernel, headers included). I can copy/paste with the host, use a larger window size, etc. Does the vbox additions installer generate a log somewhere?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Shared folders failure

Post by Perryg »

should be able to find it in /var/log/
Urhixidur
Posts: 19
Joined: 5. Aug 2010, 22:20
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu 12, 14
Location: Québec, QC, Canada
Contact:

Re: Shared folders failure

Post by Urhixidur »

I must have not paid enough attention when re-installing the vbox additions the first time:

Code: Select all

$ sudo /etc/init.d/vboxadd setup
[sudo] password for daniel: 
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...done.
Building the shared folder support module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.
Note that the "The headers for the current running kernel were not found" warning is meaningless, I always get this even though the headers are installed and the vbox additions build succeeds. Here is /var/log/vboxadd-install.log:

Code: Select all

...
  gcc -Wp,-MD,/tmp/vbox.0/.utils.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.6/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64 -mno-80387 -mno-fp-ret-in-387 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2 -Wframe-larger-than=1024 -fstack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -Wno-declaration-after-statement -fshort-wchar -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -I/lib/modules/4.0.5-040005-generic/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxsf/ -I/tmp/vbox.0/vboxsf/include -I/tmp/vbox.0/vboxsf/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DIN_MODULE -DIN_GUEST_R0 -DRT_NO_EXPORT_SYMBOL -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(utils)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxsf)" -c -o /tmp/vbox.0/.tmp_utils.o /tmp/vbox.0/utils.c
/tmp/vbox.0/utils.c: In function ‘sf_init_inode’:
/tmp/vbox.0/utils.c:101:21: erreur: ‘struct address_space’ has no member named ‘backing_dev_info’
/tmp/vbox.0/utils.c: In function ‘sf_init_backing_dev’:
/tmp/vbox.0/utils.c:874:31: erreur: ‘BDI_CAP_MAP_DIRECT’ undeclared (first use in this function)
/tmp/vbox.0/utils.c:874:31: note: each undeclared identifier is reported only once for each function it appears in
/tmp/vbox.0/utils.c:875:31: erreur: ‘BDI_CAP_MAP_COPY’ undeclared (first use in this function)
/tmp/vbox.0/utils.c:876:31: erreur: ‘BDI_CAP_READ_MAP’ undeclared (first use in this function)
/tmp/vbox.0/utils.c:877:31: erreur: ‘BDI_CAP_WRITE_MAP’ undeclared (first use in this function)
/tmp/vbox.0/utils.c:878:31: erreur: ‘BDI_CAP_EXEC_MAP’ undeclared (first use in this function)
make[2]: *** [/tmp/vbox.0/utils.o] Erreur 1
make[1]: *** [_module_/tmp/vbox.0] Erreur 2
make: *** [vboxsf] Erreur 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
Urhixidur
Posts: 19
Joined: 5. Aug 2010, 22:20
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu 12, 14
Location: Québec, QC, Canada
Contact:

Re: Shared folders failure

Post by Urhixidur »

Pages like https://patchwork.ozlabs.org/patch/426816/ suggest backing_dev_info has been removed from kernel 4.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Shared folders failure

Post by Perryg »

Unless you build and compile your own kernel to also build the headers, the headers are not included (normally) and are in fact a separate download. So without a lot more information it would be impossible to tell you exactly why you are having issues.

Also if you look closely at the code you will see that a lot of what most people see thinking they are errors are just normal echo code. I would suggest that you install dkms so external modules are built when the kernel changes. This would help so you would not have to run around trying to figure out why ( just a suggestion ).
loukingjr
Volunteer
Posts: 8851
Joined: 30. Apr 2009, 09:45
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: just about all that run

Re: Shared folders failure

Post by loukingjr »

well that was easier than I thought. and since I had dkms installed I didn't have to reinstall the GAs.
OSX, Linux and Windows Hosts & Guests
There are three groups of people. Those that can count and those that can't.
Urhixidur
Posts: 19
Joined: 5. Aug 2010, 22:20
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Ubuntu 12, 14
Location: Québec, QC, Canada
Contact:

Re: Shared folders failure

Post by Urhixidur »

Perryg wrote:Unless you build and compile your own kernel to also build the headers, the headers are not included (normally) and are in fact a separate download. So without a lot more information it would be impossible to tell you exactly why you are having issues.

Also if you look closely at the code you will see that a lot of what most people see thinking they are errors are just normal echo code. I would suggest that you install dkms so external modules are built when the kernel changes. This would help so you would not have to run around trying to figure out why ( just a suggestion ).
Yes, I know. I had downloaded and installed linux-image-4.0.5-040005-generic_4.0.5-040005.201506061639_amd64.deb, linux-headers-4.0.5-040005_4.0.5-040005.201506061639_all.deb, and linux-headers-4.0.5-040005-generic_4.0.5-040005.201506061639_amd64.deb from kernel.ubuntu.com/~kernel-ppa (pursuant to an unrelated glibc bug, #1463553 on bugs.launchpad.net).
Post Reply