Oracle VirtualBox释放被捕获鼠标键盘的默认快捷键
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle VirtualBox释放被捕获鼠标键盘的默认快捷键相关的知识,希望对你有一定的参考价值。
参考技术A Host+I。VirtualBox中的Host键默认是:RightCtrl键,就是键盘上右边那个“Ctrl”键。Host键可以点击OracleVMVirtualBox管理器的左上角“管理”->“全局设定”->"热键"重新设定。
VirtualBox虚拟机CentOS安装增强功能Guest Additions
VirtualBox虚拟机CentOS安装增强功能Guest Additions
没有安装Virtual Box增强功能Guest Additions的虚拟机操作很不方便,比如:
- 虚拟机的分辨率最大只有1024x768;
- 鼠标被虚拟机捕获后要按右Ctrl键才能释放,否则只能再虚拟机里移动;
- 剪贴板不能共享
安装Guest Additions可以解决上述所有问题。
以CentOS 7.3虚拟机为例,如果安装CentOS时没有选择Development Tools组,需要先安装kernel-devel和gcc$ sudo yum install -y kernel-devel gcc
通过VirtualBox的 设备 | 安装增强功能... 菜单可以加载VBoxGuestAdditions.iso,可以直接点击Run安装或者执行$ cd /run/media/centos/VBOXADDITIONS_5.1.22_115126
$ sudo sh ./VBoxLinuxAdditions.run
有时安装会出错
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.22 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Starting the VirtualBox Guest Additions.
Failed to set up service vboxadd, please check the log file
/var/log/VBoxGuestAdditions.log for details.
查询log发现是找不到和Linux内核匹配的源文件$ cat /var/log/VBoxGuestAdditions.log
vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
vboxadd.sh: failed: modprobe vboxguest failed.
$ cat /var/log/vboxadd-install.log
/tmp/vbox.0/Makefile.include.header:112: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
查询kernel-devel版本是3.10.0-514.26.2.el7.x86_64,而Linux内核版本是3.10.0-514.el7.x86_64,确实不一致。如果安装CentOS时选择了Development Tools组,kernel-devel版本和Linux内核版本是匹配的,则不会出现这个问题。$ rpm -qa | grep kernel-devel
kernel-devel-3.10.0-514.26.2.el7.x86_64
$ uname -r
3.10.0-514.el7.x86_64
可以使用下面两个命令中的一个安装和Linux内核版本匹配的kernel-devel$ sudo yum install -y "kernel-devel-uname-r == $(uname -r)"
$ sudo yum install -y kernel-devel-3.10.0-514.el7
然后再次安装Guest Additions成功$ cd /run/media/centos/VBOXADDITIONS_5.1.22_115126
$ sudo sh ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.22 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.22 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Starting the VirtualBox Guest Additions.
以上是关于Oracle VirtualBox释放被捕获鼠标键盘的默认快捷键的主要内容,如果未能解决你的问题,请参考以下文章
oracle vm virtualbox 怎么让鼠标出来啊?
Oracle VM VirtualBox我把鼠标按进去了怎么搞出来?
我用的Oracle VM VirtualBox进入虚拟界面后说【当前虚拟电脑中的系统不支持鼠标自动切换需要通过host key手