VirtualBox is a free and open-source application for creating virtual machines. VirtualBox also lets you manage and run these virtual machines on the host systems. You can run one or more virtual machines on one host system hardware at the same time. It is cross-platform and is available on Windows, Linux, macOS, and Solaris. VirtualBox has other features that make it preferable to other Virtualization platforms. These include extension packs and guest additions.
VirtualBox Guest Additions
Guest additions are special software packages shipped with Oracle VM VirtualBox that are installed inside a VM after the Guest OS installation to improve the performance and usability of the guest operating system. The guest additions are provided as a single CD-ROM image file called VBoxGuestAdditions.iso that is mounted on the Guest Operating system and then installed from there.
- Seamless Windows enables windows displayed inside the virtual machine to appear side by side with that of host windows. You can enable seamless Windows by pressing Ctrl+L. To disable use the same controls again.
- Time synchronization – Even though Time on the guest OS might run at a different rate than that of the host, Guest additions ensure that the guest’s system time is synchronized with the host time.
- Automatically resize the virtual machine windows once the guest additions are installed. This in turn provides you with extra high and non-standard video modes, as well as accelerated video performance.
- Shared Folders enable you to exchange files between the host and guest VM. It is similar to network shares except that this does not require networking. There are two types of shares;
– Permanent shares that are saved under VM settings.
– transient shares, that are created at runtime and lost when the VM is powered off.
- Mouse Pointer Integration provides seamless mouse support. Guest additions suppress the second mouse pointer that appears on the VM at the beginning of the installation to show when the VM window is active. Your host mouse pointer will work differently in the guest OS which can be seen from the change in color and only a single mouse pointer on the active window of the VM.
- Shared Clipboard between the host and guest OS based on different options. It has the following modes available;
– Disabled – disables shared clipboard and is set as default.
– Host to Guest – Copies clipboard data one-way from the Host to the Guest system.
– Guest to Host – Copies clipboard data one way from the Guest to the Host system.
– Bidirectional – Clipboards from both the host and the guest contain the same data.
- Automated logins – Guest additions come with GINA (Graphical Identification and Authentication) and credential provider modules for windows; PAM module (Pluggable Authentication Module) and vbox-greeter, which can be used with LightDM for Linux. These modules can be used to perform automated guest logins on platforms that support this framework.
- Drag and Drop enables you to drag files that can be documents or image files between the guest and host system. You can drag and drop files in 4 ways:
– Disabled. Disables the drag-and-drop feature entirely. This is the default when creating a new VM
– Host to Guest – Enables drag and drop operations from the host to the guest only.
– Guest to Host – Enables drag and drop operations from the host to the guest only.
– Bidirectional – Enables drag and drop operations in both directions: from the host to the guest, and from the guest to the host.
This guide shows you how to Install VirtualBox guest additions on CentOS Stream 9 / RHEL 9.
Install VirtualBox guest additions on CentOS Stream 9 / RHEL 9
You should have VirtualBox installed on your system and create a virtual machine with an operating system that is supported on VirtualBox. If you do not have it installed, You can follow the guide Install and Use VirtualBox on CentOS Stream 9|RHEL 9.
Once the setup is done, Click on Devices and select the Option Insert
This will mount the CD image to your guest system. Open the folder right click inside the folder to easily open the terminal from that location.
Run the following command to install the guest additions.
sudo sh VBoxLinuxAdditions.run
Then reboot your system.
You can then umount the disk image from the system
Once restarted, you can now resize the guest display
Enable Shared Clipboard
Under the Devices menu, you can also enable a shared Clipboard between the Host and the Guest OS. This can be:
- Host to Guest copies data from Host OS to Guest OS only.
- Guest to Host that copies from Guest OS to Host OS only.
- Bidirectional that works in both ways
- You can also disable the shared clipboard which is done by default.
Enable Drag and Drop
The Drag and Drop feature allows you to seamlessly drag and drop files between the Guest and Host OS. It can also be:
- Disabled by default
- Host to Guest that allows you to drag and drop files from Host to Guest OS only.
- Guest to Host that allows you to drag and drop files from Guest to Host OS only.
- Bidirectional where you drag and drop files on both sides.
This option is enabled under the Devices Menu as shown below.
Guest Additions are available for virtual machines running Windows, Linux, Oracle Solaris, or OS/2. Guest Additions provide a smooth transition between the host and guest systems without lag and improve the performance of the guest system. Enjoy Virtualizing your operating system with VirtualBox.