Linux中安装VirtualBox Guest Additions

本文详细介绍了如何在Linux物理机上使用VirtualBox安装虚拟机系统并下载对应版本的GuestAdditions ISO镜像。通过挂载、安装依赖包、挂载ISO镜像并执行安装脚本来安装GuestAdditions。最后,重启虚拟机以激活更新。文章还提供了Linux系统下安装GuestAdditions的具体步骤,包括Ubuntu、Mint、Debian、Fedora等系统的安装方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Guest Additions适应于Windows, Linux, Solaris 及 OS/2的ISO镜像. Guest Additions提供以下功能:

支持鼠标跨物理主机和虚拟机操作系统。
支持主机和虚拟机之间共享文件夹/剪贴板。
高分辨率的视频模式,以及3D图形和2D视频的硬件性能加速。
主机和虚拟机之间的时间同步。

首先在Linux物理机(Host)中使用VirtualBox安装一个虚拟机系统(Linux guest virtual machine (VM)),以下步骤均在Linux虚拟机中进行(Linux guest VM):
1、检查VirtualBox的版本,下载与其对应的Guest Additions版本的ISO镜像([url]http://download.virtualbox.org/virtualbox[/url]),例如我的VirtualBox是4.2.16, 下载的Guest Additions版本也是4.2.16
$ wget http://download.virtualbox.org/virtualbox/4.2.16/VBoxGuestAdditions_4.2.16.iso

安装依赖包:
Ubuntu, Mint or Debian:
$ sudo apt-get install dkms gcc

Fedora:
$ sudo yum install dkms gcc

CentOS or RHEL:
$ sudo yum install kernel-devel gcc

2、挂载ISO镜像
$ sudo mount -o loop VBoxGuestAdditions_4.2.16.iso /mnt
$ cd /mnt

3、运行安装
$ sudo ./VBoxLinuxAdditions.run

执行完成后,重启虚拟机系统以激活更新。
4、查看是否安装完成,并正常使用,你可以查看kernel modules
$ lsmod | grep vbox

vboxvideo 12611 0
drm 286313 1 vboxvideo
vboxsf 39557 0
vboxguest 235614 2 vboxsf

同时发布于[url="http://www.j4ml.com"]J4ML[/url]
Verifying archive integrity... 100% MD5 checksums are OK. All good. Uncompressing VirtualBox 7.0.18 Guest Additions for Linux 100% VirtualBox Guest Additions installer VBoxControl: error: Could not contact the host system. Make sure that you are running this VBoxControl: error: application inside a VirtualBox guest system, and that you have sufficient VBoxControl: error: user permissions. This system appears to have a version of the VirtualBox Guest Additions already installed. If it is part of the operating system and kept up-to-date, there is most likely no need to replace it. If it is not up-to-date, you should get a notification when you start the system. If you wish to replace it with this version, please do not continue with this installation now, but instead remove the current version first, following the instructions for the operating system. If your system simply has the remains of a version of the Additions you could not remove you should probably continue now, and these will be removed during installation. Do you wish to continue? [yes or no] yes Copying additional installer modules ….. Installing additional modules ….. VirtualBox Guest Additions: Starting. VirtualBox Guest Additions: Setting up modules VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules. This may take a while. VirtualBox Guest Additions: To build modules for other installed kernels, run VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup <version> VirtualBox Guest Additions: or VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all VirtualBox Guest Additions: Building the modules for kernel 6.14.0-27-generic. VirtualBox Guest Additions: Look at /var/log/vboxadd-setup.log to find out what went wrongVirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted or 'rcvboxadd reload' triggered VirtualBox Guest Additions: reloading kernel modules and services VirtualBox Guest Additions: cannot reload kernel modules: one or more module(s) VirtualBox Guest Additions: kernel modules and services were not reloaded The log file /var/log/vboxadd-setup.log may contain further information. Press Return to close this window... is still in use
最新发布
08-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值