Help required for Shared Folders & systemd

Discussions about using Linux guests in VirtualBox.
Post Reply
DaveLevy
Posts: 56
Joined: 1. May 2008, 08:24
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Ubuntu, Fedora
Location: London
Contact:

Help required for Shared Folders & systemd

Post by DaveLevy »

I am trying to auto-mount shared folders using a Fedora 24 Guest.

It seems that systemd is now the only way to go. (Is this true?) I am to be frank struggling with the available documentation for systemd but there seem to be two questions that it might be best to ask here.
  • Is it best to write a script, and implement it as a service, or to create a mount/auto-mount unit?

    If the latter, what is the name to be used in the "What=" parameter?
My host is Windows 10, VBox Version 5.0.26
--
Dave,
Windows 10, and also using Mac OS 10.11 on Mac Book Pro 5.1
DaveLevy
Posts: 56
Joined: 1. May 2008, 08:24
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Ubuntu, Fedora
Location: London
Contact:

Re: Help required for Shared Folders & systemd

Post by DaveLevy »

It seems I am not trying to automount, I am trying to mount during the boot phase.

The mount command seems to need to be run after the vboxadd-service.service has been run. I have configured a mount command a.k.a a ,mount unit file.
[Unit]
Description=Mounts common on /import/common
Conflicts=umount.target
Requires=vboxadd-service.service graphical.target
After=vboxadd-service.service tmp.mount graphical.target

[Mount]
What=common
Where=/import/common
Type=vboxsf
Options=rw,uid=1000,gid=1000

[Install]
WantedBy=graphical.target
This works fine as the argument to a systemctl command, but does not mount as part of the boot. I have experimented with using my usual script as a service, but I also have problems with this. (I may be able to solve this by reading the vbox files). The status message I get after boot is,

Code: Select all

· import-common.mount - Mounts common on /import/common
   Loaded: loaded (/etc/systemd/system/import-common.mount; enabled;
   Active: inactive(dead)
    Where: /import/common
     What: common
Does anyone have an example that does what I want? Perhaps the author of the vboxadd[-.]service* might be able to help?
--
Dave,
Windows 10, and also using Mac OS 10.11 on Mac Book Pro 5.1
Post Reply