virtualbox.org

#18853 (vboxadd.service unmounting vboxsf may return wrong error) – Oracle VirtualBox

#18853 closed defect (fixed)

Reported by: Owned by: Frank Batschulat (Oracle)
Component: shared folders Version: VirtualBox 5.2.32
Keywords: vboxadd.service umount vboxsf Cc:
Guest type: Linux Host type: all

On Linux, the service (script) /opt/VBoxGuestAdditions-5.2.32/init/vboxadd does shared folder(s) unmounting with:

if ! umount -a -t vboxsf 2>/dev/null; then
  fail "Cannot unmount vboxsf folders"
fi

However umount may return an error if, for example, the same mount is available in more than one place, through binding. Then after first unmount of the same share the next one will be erroneous and umount may return error (on my Linux/Fedora it returns code 32).

I'm suggesting to slightly modify that script to avoid (possibly wrong) error exit (which can annoy your logs ), as below:

if ! umount -a -t vboxsf 2>/dev/null; then
  [ -n "$(findmnt -t vboxsf)" ] && fail "Cannot unmount vboxsf folders"
fi

Change History (13)

Owner: set to Frank Batschulat (Oracle)
Status: newaccepted
Resolution: fixed
Status: acceptedclosed

Note: See TracTickets for help on using tickets.