How does one configure shared folders to automount for arch/manjaro linux VM in virtualbox?

廉价感情. 提交于 2019-12-08 05:31:56

问题


I have a manjaro/arch virtual machine running in virtualbox with a windows 10 host. I have configured the shared folder I want to share in virtualbox as c:\tfs with the name tfs but it doesn't show up in the linux vm anywhere. I am able to mount it manually, but it won't auto-mount. I created the /media and /media/tfs folder in the VM, since it did not exist, and now the following command successfully manually mounts my folder sudo mount -t vboxsf tfs /media/tfs. How do I get the automount to work as intended without resorting to editing /etc/fstab?


回答1:


It turns out that a few more steps are needed to configure the automount for shared folders of virtualbox. This tiny forum post was the key. You need to enable and start the virtualbox service vboxservice.service installed with the guest utils.

  1. First ensure you have a folder /media, this is where it will try to mount your shared folders
  2. Ensure that the guest utils are installed with sudo pacman -Q virtualbox-guest-utils
  3. Enable service with sudo systemctl enable vboxservice.service
  4. Start service with sudo systemctl start vboxservice.service
  5. Reboot, I tried just logging out but reboot was necessary for me to start the service
  6. Verify that your folder is now automounted in /media with sf_ prefix, mine is /media/sf_tfs

    p.s. I also ran this command based on another post to add my username to the vboxsf group, although I'm not sure whether this one was necessary or not. sudo usermod -aG vboxsf brandon



来源:https://stackoverflow.com/questions/45986166/how-does-one-configure-shared-folders-to-automount-for-arch-manjaro-linux-vm-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!