ПК Журнал ТодерельТ
3 просмотров
Рейтинг статьи
1 звезда2 звезды3 звезды4 звезды5 звезд

VirtualBox Guest Additions and Shared Folders

Introduction [ edit ]


Shared folders are also discouraged because it weakens isolation between the guest and the host. Providing a mechanism to access files of the host system from within the guest system via a specially defined path necessarily enlarges the attack surface and provides a potential pathway for malicious actors to compromise the host. [2] [3] [4]

Again, a fairly simple procedure. Repeat the first step. This will mount the VirtualBox Guest Additions ISO (included with the program) as a CD-ROM drive inside the virtual machine.

A file manager windows might popup, depending on your guest configuration, showing all the available options, including Guest Additions for both 32-bit and 64-bit systems, Windows and Linux alike — and even Solaris, not surprising, considering VirtualBox owned by Sun. On most modern Linux distros, the system will auto-mount CD-ROMs and launch file browsers / managers.

Choose the right package for your hardware architecture. In our case, this is x86. Open a terminal window and run the script with root privileges:


Wait a few moments until the installation is complete. Reboot.

Installing VirtualBox Guest Additions

You might have a couple of different operating systems installed on your VirtualBox. Given below are the installation guides for Ubuntu, CentOS, and Windows guest operating systems. Go through all of them or the one you need.

1. Installing VirtualBox Guest Additions on Ubuntu/Linux Virtual Machine

Step 1: First, you need to update the guest operating system already installed in Ubuntu. For this you need the following commands:

Step 2: After the upgrade is completed, you need to reboot your Ubuntu guest OS for the upgrades to take effect. Then enter the command given below to install a couple of packages required:

Step 3: Now, go to the Ubuntu Virtual Machine menu bar and click on “Devices”. Then, from the drop-down menu, click on “Insert Guest Additions CD image”. This will mount the VirtualBox Guest Additions ISO file in the virtual machine.

Step 4: Now, a dialog box will pop up and ask you to run the installer. Click on “Run” in order to launch the guest additions.

Step 5: After that, a terminal window will open up which will perform the actual installation procedure of Virtual GuestBox Additions. Once it is done, press the Enter button and that will close this terminal.

Step 6: Now, turn off the guest OS and go to Settings. Click on “General” and then on “Advanced” from the dropdown menu. Then, you can enable the “Shared Clipboard” and “Drag n’ Drop” functionalities as per your requirements. Click on “OK” to save the changes.

Step 7: Reboot the system and open and login to the Virtual machine to test if the additions are running fine or not And with that, you have successfully installed the guest additions on your Ubuntu.

2. Installing VirtualBox Guest Additions on CentOS 8 Virtual Machine

Before beginning the installation procedure you need to mount the ‘VBoxGuestAdditions.iso” file on the guest OS via the VirtualBox GUI manager. This is an ISO file that contains the required installers for these additions. Once done with the same, you can go through the following steps to install VirtualBox guest additions on your CentOS 8 desktop:

Step 1: Go to the VirtualBox GUI Manager and start your guest virtual machine installed in CentOS.

Step 2: Log in to the guest operating system as sudo user or root. Then, install the required packages for kernel modules via the command given below:

Step 3: Now click on Devices from the virtual machine menu bar. Then, click on “Insert Guest Additions CD Image” from the dropdown.

Step 4: Then, go to the CentOS guest terminal and enter the following commands to mount the ISO file.

Step 5: Then, type in or copy-paste the following commands. Through these, you will be able to go to the new directory and start the installation procedure:

Step 6: Reboot your CentOS guest system for the changes to become effective.

Step 7: Now, log into the virtual machine again to verify if the installation has been successful or not. The $lsmod command will help you to verify the same and in case you don’t get an output, then it indicates that the kernel module hasn’t loaded.

Читать еще:  Как очистить очередь печати в Windows 10

3. How to Install Guest Additions on Windows Virtual Machine

Step 1: Launch the Windows Guest OS via your VirtualBox

Step 2: Click on “Devices” and then on “Insert Guest Additions CD image”

Step 3: An AutoPlay window will pop up. You need to click on “Run VBoxWindowsAdditions.exe”

Step 4: Now, the User Account Control screen will come up. Click on “Yes”.

Step 5: The installation wizard will come up and you just need to follow along. You can click on the checkbox next to Direct3D Support as well.

Step 6: Now, when the installation starts, allow the installation of the Sun display adapters as well.

Step 7: Click on reboot for the changes to take effect.

Edit Package

To edit the metadata for a package, please upload an updated version of the package.

Chocolatey’s Community Package Repository currently does not allow updating package metadata on the website. This helps ensure that the package itself (and the source used to build the package) remains the one true source of package metadata.

This does require that you increment the package version.

All Checks are Passing

3 Passing Tests

Validation Testing Passed

Verification Testing Passed

Scan Testing Successful:

No detections found in any package files

  • Individual
  • Organization
  • Install
  • Upgrade
  • Uninstall

To install Virtualbox Guest Additions For Guest Windows OS (Install), run the following command from the command line or from PowerShell:

To upgrade Virtualbox Guest Additions For Guest Windows OS (Install), run the following command from the command line or from PowerShell:

To uninstall Virtualbox Guest Additions For Guest Windows OS (Install), run the following command from the command line or from PowerShell:

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

  • Open Source or Commercial:
    • Proxy Repository — Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download
    • Open Source
      • Download the Package Download
      • Run choco download virtualbox-guest-additions-guest.install —internalize —source= (additional options)
      • Run choco push —source="’http://internal/odata/repo’" for package and dependencies

      3. Enter your internal repository url

      4. Choose your deployment method:

      • Generic
      • Ansible
      • Chef
      • Otter
      • PS DSC
      • Puppet
      • Salt

      Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

      If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:

      Requires Otter Chocolatey Extension. See docs at

      Requires cChoco DSC Resource. See docs at

      Requires Puppet Chocolatey Provider module. See docs at

      5. If applicable — Chocolatey configuration/installation

      See infrastructure management matrix for Chocolatey configuration elements and examples.

      This package is likely a meta/virtual (*) or an installer (*.install) or portable (*.portable) application package.

      • Meta/virtual (*) — has a dependency on the *.install or the *.portable package — it is provided for discoverability and for other packages to take a dependency on.
      • Portable (*.portable/*.commandline (deprecated naming convention)/*.tool (deprecated naming convention)) — usually zips or archives that require no administrative access to install.
      • Install (*.install/*.app (deprecated naming convention)) — uses native installers, usually requires administrative access to install.

      Learn more about chocolatey’s distinction of installed versus portable apps and/or learn about this kind of package.

      There are versions of this package awaiting moderation . See the Version History section below.

      This package was approved as a trusted package on 29 Jul 2021.

      NOTE: This package should be installed inside your guest Windows VM and is useful for automating the building of Virtualbox VM’s. It is not meant to be installed on the host.

      The Guest Additions are designed to be installed inside a virtual machine after the guest operating system has been installed. They consist of device drivers and system applications that optimize the guest operating system for better performance and usability.

      The Guest Additions offer the following features:

      • Mouse pointer integration. To overcome the limitations for mouse support described in Section 1.9.2, “Capturing and Releasing Keyboard and Mouse”, this feature provides you with seamless mouse support. You will only have one mouse pointer and pressing the Host key is no longer required to "free" the mouse from being captured by the guest OS.
      • Shared folders. These provide an easy way to exchange files between the host and the guest. Much like ordinary Windows network shares, you can tell Oracle VM VirtualBox to treat a certain host directory as a shared folder, and Oracle VM VirtualBox will make it available to the guest operating system as a network share, irrespective of whether guest actually has a network.
      • Better video support. While the virtual graphics card which Oracle VM VirtualBox emulates for any guest operating system provides all the basic features, the custom video drivers that are installed with the Guest Additions provide you with extra high and non-standard video modes, as well as accelerated video performance.
        In addition, with Windows, Linux, and Oracle Solaris guests, you can resize the virtual machine’s window if the Guest Additions are installed. The video resolution in the guest will be automatically adjusted, as if you had manually entered an arbitrary resolution in the guest’s Display settings.
      • Seamless windows. With this feature, the individual windows that are displayed on the desktop of the virtual machine can be mapped on the host’s desktop, as if the underlying application was actually running on the host.
      • Generic host/guest communication channels. The Guest Additions enable you to control and monitor guest execution. The "guest properties" provide a generic string-based mechanism to exchange data bits between a guest and a host, some of which have special meanings for controlling and monitoring the guest.
      • Time synchronization. With the Guest Additions installed, Oracle VM VirtualBox can ensure that the guest’s system time is better synchronized with that of the host.
      • Shared clipboard. With the Guest Additions installed, the clipboard of the guest operating system can optionally be shared with your host operating system.
      • Automated logins. Also called credentials passing.

      Each version of Oracle VM VirtualBox, even minor releases, ship with their own version of the Guest Additions. While the interfaces through which the Oracle VM VirtualBox core communicates with the Guest Additions are kept stable so that Guest Additions already installed in a VM should continue to work when Oracle VM VirtualBox is upgraded on the host, for best results, it is recommended to keep the Guest Additions at the same version.

      The Windows and Linux Guest Additions therefore check automatically whether they have to be updated. If the host is running a newer Oracle VM VirtualBox version than the Guest Additions, a notification with further instructions is displayed in the guest.

      NOTE: This is an automatically updated package. If you find it is out of date by more than a week, please contact the maintainer(s) and let them know the package is no longer updating correctly.

      Installing Guest Additions from Virtual Box Manager

      In case the Guest Additions fail to build we may have to install the Linux kernel headers (see How do I install kernel header files?) or build-essential alt=»Install build-essential» /> tools in addition. It is also recommended to have dkms alt=»Install dkms» /> installed (see below — Note 4). You can run this command in a terminal to install both:

      Selecting Devices -> Install Guest Additions (or press Host + D from the Virtual Box Manager) the Guest Additions CD .iso will be loaded but not installed in your guest OS. To install we need to run the installer script as root or from the Autorun Prompt (see below).

      GNOME Shell

      To install the Guest Additions we will have a CD icon on our desktop as soon as the virtual drive is mounted:

      enter image description here Next step is to run the script (as root) on this mounted CD by opening the drive and clicking on the «Run Software» button. This will build and install the vbox kernel modules needed.


      The guest additions is mounted as a virtual CD visible on the launcher:

      enter image description here

      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)

      enter image description here

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

      enter image description here

      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 ./ . In Lubuntu or Ubuntu Server guests we additionally need to install the GNU C compiler (gcc alt=»Install gcc» />) and the make alt=»Install 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.


      Your guest operating systems should run more smoothly and without issue. Just remember that if you’re running an operating system other than Windows or Linux, these Guest Additions won’t do you any good.

      Even with Guest Additions installed, you still may run into certain problems. Running Ubuntu as a guest, for example, you may run into issues where either Ubuntu or VirtualBox freeze. The good news is that we can help there. Take a look at our guide showing you how to fix Ubuntu freezing in VirtualBox. `

      Kris Wouk is a writer, musician, and whatever it’s called when someone makes videos for the web.

      • Facebook

      Общая информация по VirtualBox Guest Additions

      Для более эффективной работы и взаимодействием между реальной и виртуальной машиной, созданной в VirtualBox, используется специальное дополнение к последнему – Guest Additions. Данный пакет расширений открывает дополнительные возможности, среди которых:

      • Создание реальной сети в виртуальной машине. Благодаря ней из операционной системы, которая установлена в VirtualBox можно выходить в интернет, производить обмен данными между основной машиной и виртуальной;
      • Добавляет поддержку видеодрайверов. Благодаря этому вы можете менять разрешение экрана, на установленной виртуальной системе, проверять производительность программ, требующих наличие графических драйверов и т.д;
      • Более удобная интеграция курсора мыши между операционными системами. Например, теперь не нужно нажимать дополнительные кнопки, чтобы курсор переместился из виртуальной системы, что стоит в VirtualBox, в вашу основную;
      • Синхронизация времени между основной операционной системой и виртуальной;
      • Возможность автоматического входа в виртуальную систему.

      Монтирование образа VirtulBox Guest Additions

      По умолчанию все пакеты этого дополнения уже внесены в VirtualBox, поэтому нет смысла скачивать что-либо дополнительно с официального сайта разработчика. Для установки нужно только подключить уже скаченный пакет:

      1. Остановите уже запущенную виртуальную машину в интерфейсе VirtualBox. Для этого нажмите правой кнопкой мыши по нужной операционной системе и выберите из контекстного меню пункт «Отключить».
      2. Выберите нужную машину и нажмите на кнопку «Настройки», что расположена в верхнем меню интерфейса.

      Настройка VirtualBox

      Выбор образа диска VirtualBox

      Выбор нового образа диска VirtualBox

      Выбор образа диска VirtualBox в проводнике Windows

      Отображение образа диска в VirtualBox

      В качестве альтернативы этой инструкции можно воспользоваться ещё этой, но при этом виртуальная машина должна быть запущена и полностью работоспособна:

      1. В интерфейсе запущенной виртуальной машины нажмите на пункт «Устройства».
      2. Откроется контекстное меню, где нужно нажать по «Подключить образ диска дополнительной гостевой ОС…».

      Подключение образа дополнительной гостевой ОС VirtualBox

      Установка из образа

      Процесс установки выглядит следующим образом:

      1. Откройте смонтированный образ.
      2. Здесь запустите файл установщика. Всего их три: универсальный, для 64-битных систем и 32-битных систем. Последние два имеют соответствующие приписки в наименовании файла.

      Установка дополнительной гостевой ОС VirtualBox

      Процесс установки дополнительной гостевой ОС VirtualBox

      Выбор места установки дополнительной гостевой ОС VirtualBox

      Настройка видеодрайверов в дополнительной гостевой ОС VirtualBox

      Подтверждение установки дополнительной гостевой ОС VirtualBox

      В установки дополнения VirtualBox Guest Additions нет ничего сложного, особенно, если у вас есть опыт взаимодействия с виртуальными машинами.

      Рейтинг статьи
Ссылка на основную публикацию