如何在VirtualBox VM中安装Guest Additions?

贪吃

我最近在Oracle的Virtualbox上安装了Ubuntu。现在,我要安装来宾添加项。

我启动了Ubuntu来宾操作系统,单击“设备”,然后选择“安装来宾附件”。什么也没发生,并且我在桌面上看不到CD图标。

我该如何进行这项工作?

谢谢

如果在VirtualBox VM中安装Ubuntu时遇到问题,因为安装程序窗口不适合低分辨率屏幕尺寸,则可以使用Alt+移动该窗口F7

从存储库安装来宾添加

如果我们已经从存储库安装了OSE版本的Virtual Box,则可以在来宾中添加来自存储库来宾添加项这将安装与从存储库获得的Virtual Box版本匹配的来宾添加项。这是不建议作为从Oracle库中获得虚框的新版本安装这些(见下文)。

或者,我们可以主机Ubuntu中安装软件包virtualbox-guest-additions-iso

sudo apt-get install virtualbox-guest-additions-iso

带有guest附加CD的OSE版本映像的.iso文件将安装在主机目录中/usr/share/virtualbox/VBoxGuestAdditions.iso将此.iso文件作为CD挂载到虚拟机的设置中。然后,在来宾中,您将可以通过安装程序访问CD-ROM。

从Virtual Box Manager安装来宾添加

万一Guest Additions无法构建,我们可能还必须安装Linux内核头文件(请参阅如何安装内核头文件?)或构建必备 安装基本版工具。还建议安装dkms 安装dkms(请参阅下面的注释4)。您可以在终端中运行以下命令来安装这两个命令:

sudo apt install build-essential dkms

选择设备->安装来宾添加项(或在Virtual Box Manager中Host+ D),将加载来宾添加项CD .iso,但未将其安装在来宾操作系统中。要进行安装,我们需要以VBoxLinuxAdditions.runroot用户或从自动运行提示符(请参见下文)中运行安装程序脚本


GNOME外壳

要安装Guest Additions,我们将在虚拟驱动器挂载后在桌面上显示CD图标:

在此处输入图片说明下一步是通过打开驱动器并单击“运行软件”按钮,在此已安装的CD运行autorun.sh脚本(以根用户身份)这将构建并安装所需的vbox内核模块。


统一

来宾添加项作为虚拟CD挂载在启动器上可见:

在此处输入图片说明

In case the system is set up to autorun a CD it should just open the following autorun dialogue (if not select the CD symbol, choose open, then choose Open Autorun Prompt)

在此处输入图片说明

After having entered your credentials for root access the guest additions will build as seen from the terminal output:

在此处输入图片说明

Press Return to close the terminal.


Note 1
Guest Additions need a reboot of your guest OS to take effect.

Note 2
In some systems the Virtual Box Guest Additions CD icon may not be shown on the desktop, but will be accessible from the Places menu. If the CD still was not there you may have to manually add the VBoxGuestAdditions.iso as a CD-ROM in the Virtual Box Manager Storage menu. In an Ubuntu host the disk image is in /usr/share/virtualbox/VBoxGuestAdditions.iso.

Note 3
In some systems (e.g. when running Xubuntu guests) we may not have an Autorun Prompt for the mounted CD. Then we can install the guest additions by opening a terminal on the mounted guest additions .iso to run sudo ./VBoxLinuxAdditions.run. In Lubuntu or Ubuntu Server guests we additionally need to install the GNU C compiler (gcc 安装gcc) and the make 安装make utility in the guest system to be able to compile the guest additions.

Note 4
Running DKMS in the guest OS will keep Guest Additions installed after a guest kernel update. It is not a prerequisite for Guest Additions but if used it should be installed before we install the Guest Additions.


Installing Guest Additions from a Terminal

In case Guest Additions are not installed properly we may not be able to boot to the GUI. In this case we need to boot holding the Shift key to access the Grub menu where we access a root shell as depicted in the following question (we do need to mount the filesystem read/write to proceed):

The Guest Additions .iso file needs to be installed on /dev/cdrom from the Virtual Box Manager (see above). We then may install Guest Additions by typing the following commands:

mount /dev/cdrom /mnt              # or any other mountpoint
cd /mnt
./VBoxLinuxAdditions.run
reboot

Remove Guest Additions

如果安装来宾添加程序出现问题,或者来宾操作系统无法在安装后启动,则我们可能必须删除这些添加程序。也可以通过运行来宾目录中的卸载脚本根外壳程序完成此操作 /opt

cd /opt/<VirtualBoxAdditions-x.x.xx>/
sudo ./uninstall.sh

x.x.xx用您当前版本的访客添加替换

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

无法在VirtualBox中为CentOS 6 guest虚拟机安装Guest Additions

来自分类Dev

Vagrant无法使用Windows 7上的VirtualBox Guest Additions在Linux guest虚拟机中挂载

来自分类Dev

如何在Lubuntu 13.04中安装Guest Additions

来自分类Dev

如何避免在来宾Ubuntu的每次内核升级中都重新安装VirtualBox Guest Additions,以使其具有剪贴板和拖放功能?

来自分类Dev

Ubuntu 18.10(Guest VirtualBox)-安装Guest Additions并重新启动后出现黑屏

来自分类Dev

在Ubuntu Server 10.04上安装VirtualBox Guest Additions

来自分类Dev

即使安装了Guest Additions,VirtualBox Ubuntu VM也不会自动与主机同步时间

来自分类Dev

如何仅通过命令行在CentOS上安装Virtualbox Guest Additions

来自分类Dev

Ubuntu 18.10(Guest VirtualBox)-安装Guest Additions并重新启动后出现黑屏

来自分类Dev

Virtualbox Guest Additions需要在Guest Machine上使用Virtualbox吗?

来自分类Dev

如何在Mac主机上的VirtualBox下安装macOS VM Guest?

来自分类Dev

在Windows 10上安装VirtualBox Guest Additions?

来自分类Dev

在运行Windows 10 TP的VirtualBox上安装Guest Additions

来自分类Dev

在Ubuntu 20.04 VM上构建VirtualBox Guest Additions失败

来自分类Dev

Vagrant无法通过Windows 7上的VirtualBox Guest Additions在Linux guest虚拟机中挂载

来自分类Dev

如何在Debian虚拟机中安装VirtualBox Guest Additions

来自分类Dev

同时安装两个不同的VirtualBox Guest Additions是否安全?

来自分类Dev

如何在virtualbox guest虚拟机中安装xorg?

来自分类Dev

VirtualBox Guest Additions之类的东西如何与主机通信?

来自分类Dev

无法在Kali中安装VirtualBox Guest Additions

来自分类Dev

测试厨房无法安装VirtualBox Guest Additions 4.3.28

来自分类Dev

无法在Debian下的Kali Linux虚拟机中安装VirtualBox Guest Additions(问题安装内核头文件)

来自分类Dev

如何为Ubuntu 16.04安装VirtualBox Guest Additions

来自分类Dev

我应该在Ubuntu USB安装中安装VirtualBox Guest Additions吗?

来自分类Dev

从已经迁移到Hyper V的VM中删除VirtualBox Guest Additions

来自分类Dev

Oracle Virtualbox CentOS Guest Additions下载失败

来自分类Dev

如何避免在来宾Ubuntu的每次内核升级中都重新安装VirtualBox Guest Additions,以使其具有剪贴板和拖放功能?

来自分类Dev

想要在CentOS 7上安装VirtualBox Guest Additions,但出现标题不匹配的情况

来自分类Dev

在VirtualBox(VM Ubuntu)上安装构建必需的dkms和Guest Additions之后,黑屏/无响应

Related 相关文章

  1. 1

    无法在VirtualBox中为CentOS 6 guest虚拟机安装Guest Additions

  2. 2

    Vagrant无法使用Windows 7上的VirtualBox Guest Additions在Linux guest虚拟机中挂载

  3. 3

    如何在Lubuntu 13.04中安装Guest Additions

  4. 4

    如何避免在来宾Ubuntu的每次内核升级中都重新安装VirtualBox Guest Additions,以使其具有剪贴板和拖放功能?

  5. 5

    Ubuntu 18.10(Guest VirtualBox)-安装Guest Additions并重新启动后出现黑屏

  6. 6

    在Ubuntu Server 10.04上安装VirtualBox Guest Additions

  7. 7

    即使安装了Guest Additions,VirtualBox Ubuntu VM也不会自动与主机同步时间

  8. 8

    如何仅通过命令行在CentOS上安装Virtualbox Guest Additions

  9. 9

    Ubuntu 18.10(Guest VirtualBox)-安装Guest Additions并重新启动后出现黑屏

  10. 10

    Virtualbox Guest Additions需要在Guest Machine上使用Virtualbox吗?

  11. 11

    如何在Mac主机上的VirtualBox下安装macOS VM Guest?

  12. 12

    在Windows 10上安装VirtualBox Guest Additions?

  13. 13

    在运行Windows 10 TP的VirtualBox上安装Guest Additions

  14. 14

    在Ubuntu 20.04 VM上构建VirtualBox Guest Additions失败

  15. 15

    Vagrant无法通过Windows 7上的VirtualBox Guest Additions在Linux guest虚拟机中挂载

  16. 16

    如何在Debian虚拟机中安装VirtualBox Guest Additions

  17. 17

    同时安装两个不同的VirtualBox Guest Additions是否安全?

  18. 18

    如何在virtualbox guest虚拟机中安装xorg?

  19. 19

    VirtualBox Guest Additions之类的东西如何与主机通信?

  20. 20

    无法在Kali中安装VirtualBox Guest Additions

  21. 21

    测试厨房无法安装VirtualBox Guest Additions 4.3.28

  22. 22

    无法在Debian下的Kali Linux虚拟机中安装VirtualBox Guest Additions(问题安装内核头文件)

  23. 23

    如何为Ubuntu 16.04安装VirtualBox Guest Additions

  24. 24

    我应该在Ubuntu USB安装中安装VirtualBox Guest Additions吗?

  25. 25

    从已经迁移到Hyper V的VM中删除VirtualBox Guest Additions

  26. 26

    Oracle Virtualbox CentOS Guest Additions下载失败

  27. 27

    如何避免在来宾Ubuntu的每次内核升级中都重新安装VirtualBox Guest Additions,以使其具有剪贴板和拖放功能?

  28. 28

    想要在CentOS 7上安装VirtualBox Guest Additions,但出现标题不匹配的情况

  29. 29

    在VirtualBox(VM Ubuntu)上安装构建必需的dkms和Guest Additions之后,黑屏/无响应

热门标签

归档