小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

VirtualBox虛擬機CentOS安裝增強功能Guest Additions

 印度阿三17 2019-02-22

VirtualBox虛擬機CentOS安裝增強功能Guest Additions

轉(zhuǎn)自簡書

沒有安裝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的 設(shè)備 | 安裝增強功能... 菜單可以加載VBoxGuestAdditions.iso,可以直接點擊Run安裝或者執(zhí)行
$ 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發(fā)現(xiàn)是找不到和Linux內(nèi)核匹配的源文件
$ 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內(nèi)核版本是3.10.0-514.el7.x86_64,確實不一致。如果安裝CentOS時選擇了Development Tools組,kernel-devel版本和Linux內(nèi)核版本是匹配的,則不會出現(xiàn)這個問題。
$ 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內(nèi)核版本匹配的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.

來源:http://www./content-3-119951.html

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多