CentOS虚拟机上安装VBoxLinuxAdditions
VirtualBox上选择虚拟机(如CMe10) > 设置 > 存储 > 控制器: IDE > 挂载VBoxGuestAdditions.iso文件
在CentOS虚拟机上, 执行:
sudo yum -y install kernel-devel bzip2 gcc
sudo mount /dev/cdrom /mnt/tmp/
cd /mnt/tmp
sudo bash VBoxLinuxAdditions.run
成功输出:
[los@CMe10 tmp]$ sudo bash VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.2.1 Guest Additions for Linux........
VirtualBox Guest Additions installer
Removing installed version 5.2.1 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what went wrong
VirtualBox Guest Additions: Starting.
另, 如果不安装该扩展, 则挂载VirtualBox共享目录时, 会报错:
mount: unknown filesystem type 'vboxsf'
注: VBoxGuestAdditions.iso文件在VirtualBox的安装根目录下.