Jump to content

Ubuntu VM: How to Auto-mount and Access User Shares


Auggie

Recommended Posts

Posted

FYI, Ubuntu Noob alert!

 

Got the latest Ubuntu desktop headless VM installed and running, but can't for the life of me seem to figure out how to access the host's User shares (preferably through NFS; not CIFS/SMB)

 

The VM XML has the typical code that I entered during VM setup:

    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/mnt/user/MyShare'/>
      <target dir='MyShare'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </filesystem>

But I just can't seem to figure out how to access it within the Ubuntu VM and a Google-fest has provided all kinds of options through fstab and mount but very little specifically for UnRAID Ubuntu VM that worked for me.

 

In the /etc/fstab file, I've tried:

MyShare /mnt/user/MyShare  9p trans=virtio,version=9p2000.L,auto,nobootwait,rw,_netdev    0  0

...and:

MyShare /mnt/user/MyShare  9p trans=virtio,version=9p2000.L,auto,nobootwait,rw    0  0

Th latter without _netdev would result in a boot error, though the mount point is created albeit an empty folder -- does that mean it actually mounted the user share but because of permissions the mounted share is empty? (It's a public share containing media files with no security enabled).

 

Help?

  • 3 weeks later...
Posted

What I determined was that the auto-mount switch of fstab does not always mount the shares after startup/reboot.  I have 3 shares I want to auto-mount, and across startups/reboots, which gets auto-mounted appears to be random.  Sometimes all get mounted, sometimes only a subset gets mounted, and sometimes none of them get mounted.

 

I tried a crontab entry using @reboot but this too, does not guarantee success.

 

I wanted to automate several processes for my headless Ubuntu server which depend on user shares being mounted, but at this time, I can't seem to find a fully automated solution...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...