Widespread VirtualBox Shared Folders breakage with [Stable Update] 2019-01-17

virtualbox
#62

I’ve done some more testing now and it turns out that shared folders are simply broken in VirtualBox 6.0.2. I’ve also tried using 6.0.4 (from testing) but the issue is not fixed in 6.0.4.

I have built VirtualBox 5.2.26 by working from the PKGBUILD of Arch Linux virtualbox 5.2.22 packages. This now works with Shared folders and Linux 4.20.

The following is (for whoever it may concern) the steps required to build VirtualBox 5.2.26 on Manjaro.

There are 3 packages that needs to be built:

virtualbox

For the virtualbox package(s) I looked at the changes between version 5.2.22 and 6.0.4.
Just changing the pkgver did not work, a few changes needs to be made to the patching:

  • 012-linux-4-20.patch, this patch is already included in 5.2.26 so the patch should not be applied.

The RDP client version number is changed to 1.8.4 so this line needs to be changed:

kmk -C src/VBox/RDP/client-1.8.3

into

kmk -C src/VBox/RDP/client-1.8.4

  • The corresponding patch file 006-rdesktop-vrdp-keymap-path.patch needs to be changed accordingly by changing the version of the file to be patched:

From:

--- a/src/VBox/RDP/client-1.8.3/Makefile.kmk 2013-02-19 23:12:20.207464901 +0100
+++ b/src/VBox/RDP/client-1.8.3/Makefile.kmk 2014-01-04 04:17:26.700618600 +0100

to

--- a/src/VBox/RDP/client-1.8.4/Makefile.kmk
+++ b/src/VBox/RDP/client-1.8.4/Makefile.kmk
  • The file virtualbox-vboxsf-dkms.conf needs to be updated with kernel versions in the 20s by changing:

BUILD_EXCLUSIVE_KERNEL="^(4\.1[6-9]\..*|5\..*)"

to

BUILD_EXCLUSIVE_KERNEL="^(4\.(1[6-9]|2[0-9])\..*|5\..*)"

  • Obviously the corresponding checksums needs to be updated (quick fix is just replacing them with ‘SKIP’).

virtualbox-guest-iso

For virtualbox-guest-iso it was a simple matter of changing the pkgver and updating the checksum.

From

pkgver=5.2.22

to

pkgver=5.2.26

virtualbox-modules

For virtualbox-modules the patches to fix the network and adjust time seem to already have been applied so to skip them I commented them out in the source and sha256 arrays:

source=(#'fix-network.patch::https://github.com/svn2github/virtualbox/commit/ffc1396.patch'
    #'adjust-time.patch::https://github.com/svn2github/virtualbox/commit/f37b5b7.patch'
)
sha256sums=(
        #'1e53e02f4decd848721cb1b4bd27f01b0d49fb579ff45432e922934094769499'
        #'a48543dcb1ef2aa4023d70bd3fadfe8eb931c9303985893f0112528413c66483'
)

as well as changing the prepare() function to the following:

prepare() {
  _kernver="$(cat /usr/lib/modules/$_extramodules/version)"
  # dkms need modification to be run as user
  cp -r /var/lib/dkms .
  echo "dkms_tree='$srcdir/dkms'" > dkms.conf

  rm "$srcdir/dkms/vboxhost/${pkgver}_OSE/source"
  cp -r "/usr/src/vboxhost-${pkgver}_OSE/" "$srcdir/dkms/vboxhost/${pkgver}_OSE/"
  mv "$srcdir/dkms/vboxhost/${pkgver}_OSE/vboxhost-${pkgver}_OSE/" "$srcdir/dkms/vboxhost/${pkgver}_OSE/source/"
  cd "$srcdir/dkms/vboxhost/${pkgver}_OSE/source/vboxnetadp/"
  # patch -p6 -i "$srcdir/fix-network.patch"
  cd "$srcdir/dkms/vboxhost/${pkgver}_OSE/source/vboxdrv/"
  # sed -i -e 's|trunk/||'g "$srcdir/adjust-time.patch"
  # sed -i -e 's|src/VBox/Runtime/||'g "$srcdir/adjust-time.patch"
  # patch -p1 -i "$srcdir/adjust-time.patch"

  rm "$srcdir/dkms/vboxsf/${pkgver}_OSE/source"
  cp -r "/usr/src/vboxsf-${pkgver}_OSE/" "$srcdir/dkms/vboxsf/${pkgver}_OSE/"
  mv "$srcdir/dkms/vboxsf/${pkgver}_OSE/vboxsf-${pkgver}_OSE/" "$srcdir/dkms/vboxsf/${pkgver}_OSE/source/"
  sed -i -e 's|1\[6-9\]|20|g' "$srcdir/dkms/vboxsf/${pkgver}_OSE/source/dkms.conf"
}

Conclusion:

It builds and I got Shared Folders back into a working state, until this bug is fixed I will have to stay clear of any updates to the VirtualBox packages, so I added them to the the IgnorePkg section of /etc/pacman.conf.

IgnorePkg = virtualbox virtualbox-host-dkms virtualbox-guest-iso linux420-virtualbox-host-modules

#63

This is not true, works fine for me with Manjaro VMs, manually mounting each share.

1 Like
#64

I don’t have a problem mounting shared folders from a Manjaro host in a Manjaro VM either. However, I don’t mount them manually. I use a simple fstab entry.

#65

Great that it works for you, it consistently does not work for me on 6 (any version) and consistently works on 5 (any version). I run the same Windows 7 VM in all my tests, so the guest is not the issue. Automatic mounting works, btw, in so far as I can open explorer and see the attached drives and sometimes I can even open a file one time, but actually using them does not. Reading and especially writing the files leads to escalating breakage of the VM instance. First the application starts becoming increasingly laggy as it fails it’s writes, soon after the VM itself locks up completely. If I don’t mount the drives, or don’t use any files on there, the VM works as it should.

#66

The issue is tracked in these bugs:

https://www.virtualbox.org/ticket/18151
https://www.virtualbox.org/ticket/18322 (likely duplicate)

This description matches my experience:
https://www.virtualbox.org/ticket/18322#comment:8

Here are more descriptions of the same or similar issues:
https://forums.virtualbox.org/viewtopic.php?f=3&t=91164
https://forums.virtualbox.org/viewtopic.php?f=3&t=91117

This data leads me to the conclusion that this is a new bug introduced in VirtualBox 6 (it does not seem to be related to the kernel version either). As to what other factors are in play which leads to it not working for me while working for others, I cannot say.

#67

I had this problem too. For me it was the Windows 10 upgrade. I only access one internet site with windows 10 to publish M$ applications that use C#/SQL Server. I had plenty of backup of previous version that I compact and compress to a tar.gz archive. I used a previous version and turned off updates by deleting the Windows Update Service. Although this wouldn’t work for everyone because most people have to worry about security on the guest VM. This might help the few that need to use a VM without worrying about the multitude of security issues and latest and “greatest” upgrades for the w10 guest.

*** USE WITH CAUTION AS IT IS IRREVERSIBLE FOR THAT VM - MAKE A BACKUP ***
sc delete wuauserv

#68

Thanks for the suggestion, it might help someone else. It also strongly suggests that the guest can also affect the state of shared folders. I use a Win 7 guest and no WM updates are involved, the same WM consistently works on 5 and consistently does not work in 6. I’ll wait for the bugs to get fixed before trying 6 again.

#69

I figured out the problem. The Windows 10 upgrade from 1803 to 1809 installs new drivers that conflict with virtualbox quest additions. I extracted my 1703 backup that updates, upgraded to 1803, did a backup then upgraded to 1809. I couldn’t successfully uninstall guest additions in 1809. I went back to the 1803 backup, uninstalled guest additions then upgraded to 1809 and everything works fine.

#70

Got a tip from the bug report ( https://www.virtualbox.org/ticket/18322#comment:7 ) and as far as I’ve tested it now, using VirtualBox 6.0.4 with the 6.0.4 extension pack and the old Guest Additions from 5.2.26 does seem to work. I have no idea if there are other incompatibilities between the old guest additions and the new version of VB but now but as far as I can see now it looks like it is working.

1 Like
#71

Some good news, some work has been done on this bug and the issue is supposed to be fixed in Virtualbox 6.0.6.
https://www.virtualbox.org/ticket/18151

Also this bug is reported to have been fixed now:
https://www.virtualbox.org/ticket/18322

But for Win 10 (and possibly others?) a new issue cropped up related to copying of files, so we'll have to see how it works.
https://www.virtualbox.org/ticket/18566

I will be waiting until Virtualbox 6.0.6 comes to Manjaro before testing this one, but it is already available in Arch Linux so I guess it should be avilable in testing as well.

EDIT: The update is in and I can confirm that version 6.0.6 indeed fixes the issues I was having earlier. I can now run guest ISO at the 6.0.6 version and no longer need the workaround.

2 Likes