virtualbox centos安装虚拟增强功能

本文详细介绍了在VirtualBox中为CentOS系统安装增强功能的步骤,包括移除已有虚拟光盘、安装bzip2依赖以及解决安装过程中遇到的问题。最后,通过执行必要的命令和重启系统来完成安装过程。

打开安装好的虚拟机系统,找到设备菜单,点击最下面有安装增强功能

如果出现“未能加载虚拟光盘”的错误提示,说明之前已经加载了一个虚拟光盘,需要先移除
依次点击菜单栏的设备->分配光驱->移除虚拟盘即可移除
移除后重新点击设备->安装增强功能
#进入虚拟机终端,挂载虚拟光驱,即可找到安装脚本

mount /dev/sr0 /media
cd  /media
./VBoxLinuxAdditions.run

#如果提示下面的错误

Uncompressing VirtualBox 6.1.26 Guest Additions for Linux........
bzip2 not found.  Please install: bzip2 tar; and try again.

则需要先安装bzip2 (可通过yum search bzip2查询安装包的全名)

yum -y install bzip2-x86_64 

再次执行

./VBoxLinuxAdditions.run

如果出现下面的提示
Verifying archive integrity… All good.
Uncompressing VirtualBox 6.1.26 Guest Additions for Linux…
VirtualBox Guest Additions installer
Copying additional installer modules …
Installing additional modules …
VirtualBox Guest Additions: Starting.
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
VirtualBox Guest Additions: or
VirtualBox Guest Additions: /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Kernel headers not found for target kernel
3.10.0-1127.el7.x86_64. Please install them and execute
/sbin/rcvboxadd setup
modprobe vboxguest failed
The log file /var/log/vboxadd-setup.log may contain further information.

#则继续执行

/sbin/rcvboxadd quicksetup all

重启

reboot
### 安装或启用 VirtualBoxCentOS 7 的增强功能 为了在 VirtualBox 虚拟机环境中为 CentOS 7 安装或启用增强功能(Guest Additions),以下是具体的操作方法: #### 准备工作 如果未找到 `VBoxGuestAdditions.iso` 文件,则需要自行下载该文件作为准备工作。通常情况下,在安装 VirtualBox 时会附带此 ISO 文件;如果没有发现它,可以从官方网站获取所需的版本[^2]。 #### 步骤说明 1. **挂载 Guest Additions CD 映像** 打开虚拟机管理器界面中的设备菜单项,并选择“插入 Guest Additions CD 映像”。这一步操作将会把之前提到的 VBoxGuestAdditions.iso 挂载至您的虚拟操作系统中。 2. **启动终端并运行安装脚本** 登录到 CentOS 系统之后打开一个新的命令行窗口 (Terminal),执行如下指令来加载光盘内容以及开始安装过程: ```bash mount /dev/cdrom /mnt cd /mnt ./VBoxLinuxAdditions.run ``` 3. **重新引导系统完成应用更改** 当上述程序成功完成后,请重启计算机使所有的改动生效: ```bash reboot ``` 通过以上步骤即可顺利完成 VirtualBox 对于 CentOS 7 增强特性的支持配置[^4]。 ```python # 示例 Python 脚本来验证共享剪贴板是否正常工作 import pyperclip text_to_copy = "Testing clipboard functionality between host and guest OS." pyperclip.copy(text_to_copy) retrieved_text = pyperclip.paste() if retrieved_text == text_to_copy: print("Shared Clipboard is working properly.") else: print("There might be an issue with the shared clipboard setup.") ```
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

少林码僧

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值