如何配置共享文件夹以在VirtualBox中自动为arch/manjaro linux VM挂载? [英] How does one configure shared folders to automount for arch/manjaro linux VM in virtualbox?

查看:453
本文介绍了如何配置共享文件夹以在VirtualBox中自动为arch/manjaro linux VM挂载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带Windows 10主机的virtualbox中运行的manjaro/arch虚拟机.我已经将要在virtualbox中共享的共享文件夹配置为c:\tfs,名称为tfs,但是在Linux vm的任何地方都没有显示.我可以手动安装它,但不会自动安装.我在VM中创建了/media/media/tfs文件夹,因为它不存在,现在,以下命令成功地手动挂载了我的文件夹sudo mount -t vboxsf tfs /media/tfs.如何在不依靠编辑/etc/fstab的情况下使自动挂载按预期工作?

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?

推荐答案

事实证明,还需要一些其他步骤来为virtualbox的共享文件夹配置自动挂载.这个微小的论坛帖子是关键.您需要启用并启动与来宾utils一起安装的virtualbox服务vboxservice.service.

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. 首先确保您拥有一个文件夹/media,这是它将尝试挂载共享文件夹的地方

  1. First ensure you have a folder /media, this is where it will try to mount your shared folders

确保来宾utils与sudo pacman -Q virtualbox-guest-utils

Ensure that the guest utils are installed with sudo pacman -Q virtualbox-guest-utils

使用sudo systemctl enable vboxservice.service

使用sudo systemctl start vboxservice.service

重新启动,我只是尝试注销,但是重新启动是启动服务所必需的

Reboot, I tried just logging out but reboot was necessary for me to start the service

验证您的文件夹现在已自动以sf_前缀安装在/media中,我的文件夹是/media/sf_tfs

Verify that your folder is now automounted in /media with sf_ prefix, mine is /media/sf_tfs

p.s.我还根据另一篇文章运行了此命令,以将我的用户名添加到vboxsf组,尽管我不确定是否需要此用户名. sudo usermod -aG vboxsf brandon

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

这篇关于如何配置共享文件夹以在VirtualBox中自动为arch/manjaro linux VM挂载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆