除了一个问题,我刚刚让运行 CentOS 的 guest 盒完美运行。我正在尝试挂载共享文件夹。我已按照使用此代码获取共享文件夹“可安装”的说明进行操作:
VBoxManage sharedfolder add "TEST - 250" --name "github" --hostpath "C:\filepath\github"
其中“TEST - 250”是 VM 的名称,“github”是我想在我的 VM 中调用的文件夹名称,“C:\filepath\github”是目录路径在 Windows 主机上,我可以在其中找到我想要共享的内容。
一切似乎都很好,按照 Oracle 的指示,我将在 VM 中使用此命令:
sudo mount -t vboxsf shared ~/host
我在根目录下创建了一个名为“host”的目录。这里的问题是我收到以下消息:
mount: unknown filesystem type 'vobxsf'
进一步查看,有人告诉我在/sbin/文件夹中,应该有一个名为 mount.vboxsf 的文件,但没有。
然后我在这里阅读第 4 章:http://www.virtualbox.org/manual/ch04.html ... 更具体地说是针对 Oracle Linux、Red Hat Enterprise Linux 和 CentOS 的第 4.2.2.1.6 节。我遵循他们要求的所有命令:
yum install dkms
yum update
yum install gcc
yum install kernel-devel
以防万一...
yum install kernel-uek-devel
一切似乎都很好。我重新启动系统以激活更新。登录到重新启动的系统后,我键入:
ls /sbin/mount*
... 我没有看到 mount.vboxsf 文件。我做错了什么?
此外,有没有办法只获取此文件并将其放在那里?如果我有那个,我就可以执行我的驱动器安装,并完成我需要做的事情。有什么建议吗?
最佳答案
您需要安装访客版本。
“所有支持的 guest 操作系统的 VirtualBox Guest Additions 都作为单个 CD-ROM 镜像文件提供,称为 VBoxGuestAdditions.iso。此镜像文件位于 VirtualBox 的安装目录中。”
创建挂载目录
sudo mkdir -p /media/VirtualBoxGuestAdditions
挂载 guest 添加iso
sudo mount -t iso9660 -o loop /installation/directory/of/VirtualBox/VBoxGuestAdditions.iso /media/VirtualBoxGuestAdditions/
安装 guest 添加
sudo /media/VirtualBoxGuestAdditions/VBoxLinuxAdditions.run
然后 mount.vboxsf 文件应该在 sbin 中,你可以使用
sudo mount -t vboxsf shared ~/host
关于linux - 无法在 VirtualBox 中为 CentOS 6 guest 安装 Guest Additions,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22410780/