平常用vbox共享文件夾,偶爾有的centos的vm會出現下面的錯誤
mount: unknown filesystem type ‘vboxsf’
解決方法參照
http://d.hatena.ne.jp/pospome/20140309/1394346690
http://mpweb.mobi/windows/guestadditions-centos.php
簡單來說
1 [root@localhost ~]# yum install gcc
[root@localhost ~]# yum install make
[root@localhost ~]# yum install kernel-devel 一般只需要裝一下這個
2 vbox的菜單選擇 Device -> Insert Guest Additions CD Image
3 mount -r /dev/cdrom /mnt/cdrom/ 或者 mount -r /dev/cdrom1 /mnt/cdrom/
看一下自己設備的名字是cdrom還是cdrom1
4 sh ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.3.12 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 4.3.12 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules [ OK ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module [ OK ]
Building the shared folder support module [ OK ]
Building the OpenGL support module [失敗]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions [ OK ]
Installing the Window System drivers
Could not find the X.Org or XFree86 Window System, skipping.
雖然有失敗,但是 Building the shared folder support module就夠了
5 重新執行一下mount命令就可以掛載一下自己的共享文件夾 mount -t vboxsf xxxx /opt/xxxx