Установка VirtualBox guest additions Fedora 26
» data-medium-file=»https://evlanoff.files.wordpress.com/2017/09/virtualbox_fedora_logo.png?w=100″ data-large-file=»https://evlanoff.files.wordpress.com/2017/09/virtualbox_fedora_logo.png?w=100″ src=»https://evlanoff.files.wordpress.com/2017/09/virtualbox_fedora_logo.png?w=450″ alt=»virtualbox fedora logo»/>
Fedora — дистрибутив семейства операционных систем GNU/Linux, разработку которого спонсирует компания Red Hat. Поддержкой и развитием проекта занимается открытое сообщество пользователей данной ОС.
Fedora является тестовым полигоном для новых технологий, которые впоследствии могут быть интегрированы в продукты компании Red Hat, например Red Hat Enterprise Linux.
Guest Additions — набор драйверов для гостевой ОС, которые позволяют изменять разрешение экрана, ускорить работу гостевой операционной системы, использовать USB 2.0/3.0 и др. возможности.
Процесс установки гостевых дополнений требует определённой сноровки в работе с виртуальными машинами и ОС GNU/Linux.
- Подключите к установленной системе VirtualBox guest additions
» data-medium-file=»https://evlanoff.files.wordpress.com/2017/09/virtualbox_insert_guest_addutions.png?w=300″ data-large-file=»https://evlanoff.files.wordpress.com/2017/09/virtualbox_insert_guest_addutions.png?w=440″ src=»https://evlanoff.files.wordpress.com/2017/09/virtualbox_insert_guest_addutions.png?w=450″ alt=»virtualbox_insert_guest_addutions»/>
После это операции на рабочем столе у вас появится окно как на картинке ниже, нажмите на кнопку Cancel
» data-medium-file=»https://evlanoff.files.wordpress.com/2017/09/guest_additions_first_run.png?w=300″ data-large-file=»https://evlanoff.files.wordpress.com/2017/09/guest_additions_first_run.png?w=450″ src=»https://evlanoff.files.wordpress.com/2017/09/guest_additions_first_run.png?w=450&h=179″ alt=»guest_additions_first_run» w/>
Запустите терминал одним из удобных для вас способов:
- Откройте Activities (левый верхний угол) — наберите слово Terminal и нажмите на появившейся значок приложения или на одну из клавиш Enter на клавиатуре
» data-medium-file=»https://evlanoff.files.wordpress.com/2017/09/gnome_terminal_run_1.png?w=300″ data-large-file=»https://evlanoff.files.wordpress.com/2017/09/gnome_terminal_run_1.png?w=360″ src=»https://evlanoff.files.wordpress.com/2017/09/gnome_terminal_run_1.png?w=450″ alt=»gnome_terminal_run_1″/>
» data-medium-file=»https://evlanoff.files.wordpress.com/2017/09/gnome_terminal_run_2.png?w=300″ data-large-file=»https://evlanoff.files.wordpress.com/2017/09/gnome_terminal_run_2.png?w=380″ src=»https://evlanoff.files.wordpress.com/2017/09/gnome_terminal_run_2.png?w=450″ alt=»gnome_terminal_run_2″/>
Смонтируйте подключенный образ диска с дополнениями.
Все команды выполняются от имени суперпользователя!
Для этого в терминале наберите поочередно команды:
Вновь созданная переменная будет использоваться во время установки гостевых дополнений. Без неё вы будете видеть в терминале ошибки и последующая установка гостевых дополнений будет невозможна. После перезапуска терминала/компьютера переменная прекратит своё существование.
PS. Если вы всё сделали верно и в процессе установки не возникало никаких ошибок, то перезагрузите гостевую операционную систему, чтобы изменения вступили в силу. Убедиться в том, что гостевые дополнения были установлены верно, нажмите Host key (по умолчанию правая клавиша Ctrl) + F, изображение гостевой операционной системы примет разрешение по умолчанию хостовой операционной системы и перейдёт в полноэкранный режим.
Install VirtualBox Guest Additions in CentOS, RHEL & Fedora
by Aaron Kili | Published: July 6, 2018 | Last Updated: July 19, 2019
VirtualBox Guest Additions are software (typically device drivers and other special system applications) that enable seamless integration between the host and guest systems. They help you make the best out of your guest operating system for better performance and usability.
Some of the features offered by Guest Additions include mouse pointer integration, Drag’n’Drop functionality, shared clipboard, shared folders, enhanced video support, time sync, generic host/guest communication pathways, seamless windows and more.
Guest Additions are designed to be installed in a virtual machine, once a guest operating system has been installed.
In this article, we will explain how to install VirtualBox Guest Additions on CentOS and RHEL based distributions such Fedora and Scientific Linux.
How to Install VirtualBox Guest Additions in CentOS
1. First start by enabling the EPEL repository on your CentOS/RHEL guest operating system to install some required packages needed for the installation process as shown.
2. Next, update each package on your guest system including the kernel to the latest version that is both available and resolvable, as shown. Once the upgrade process is done, reboot your system to complete the upgrade process and start using the new kernel.
3. Once update process completes, install all kernel headers, developer tools and other related packages that are required for installing the guest additions from source as shown.
4. Next, set the KERN_DIR environment variable to kernel source code directory (/usr/src/kernels/$(uname -r)) and export it at the same time as shown.
5. Now, you can mount the Guest Additions ISO and run the installer in two ways:
Install Guest Additions via a GUI
If you have a desktop environment installed, use this option, from the Virtual machine menu bar, go to Devices => click on Insert Guest Additions CD image to mount the Guest Additions ISO file in your guest OS.
Mount Guest Additions ISO on CentOS
A dialog window will open up, asking you to Run the installer, click on the Run to execute it. This will in turn open a terminal which shows the installation details (follow the on-screen instructions).
Install Guest Additions in CentOS
Installing Guest Additions on CentOS
Install Guest Additions via a Terminal
Login into terminal and run the following commands to mount the Guest Additions ISO file, move into the directory where the guest additions ISO has been mounted, inside there you will find VirtualBosx guest addition installers for various platform, run the one for Linux, as follows.
6. Once the installation is complete, power off your guest system to perform certain settings as explained below.
Note: If you don’t have a desktop environment installed, you can install Gnome 3 desktop or skip the next section. You should be good to go.
7. Now you need to enable the shared clipboard and drag’n’drop functionality for your guest operating system. From the CentOS, RHEL and Fedora guest machine settings, go to General => Advanced and enable these two options from there, click on the drop down options to select an option.
Enable Shared Clipboard in CentOS Virtualbox
Once you are done, click on OK to save the settings and boot your guest OS and confirm that the changes you have just made are working as expected.
That’s it! VirtualBox Guest Additions make your life simple while using guest operating systems by enabling seamless integration between the host and guest systems. If you face any problems during installation, use the feedback form below to ask any questions.
How to install Fedora as a VirtualBox guest
Using data from spreadsheets in Fedora with Python
Storage management with Cockpit
Control the firewall at the command line
This article has been checked and updated in January 2020 for correctness.
There are many ways to give Fedora a try if you are currently using another operating system. One way that will have little impact on your current operating system is to create a live USB of Fedora, and boot directly into it. Alternatively, you could use virtualization technology such as VirtualBox to run a Fedora install. The virtualization approach allows you work on on your Fedora install without haveing to to reboot the system every time you need to use Fedora. Additionally, even if your main operating system is Fedora or not, and you want to do some hack or test some software on a spare installation without harming your main system, having the option to start from zero again and again without losing your other works. You can even restore a backup of your virtualized system if something in your test goes wrong.
Note that if you are currently running Fedora as your main machine, VirtualBox may not be the best choice for virtualization, because it is not in the Fedora repositories. In this case, using KVM / Libvirt is probably a better approach. However, if your main system is Windows or OSX, you can use VirtualBox to create a Fedora guest.
What is VirtualBox
Oracle VM VirtualBox is, as stated in the homepage “a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use“. Virtualization lets you to run an entire operating system inside a virtual machine. A virtual machine is a piece of software that runs on top of your system and, in brief, emulates a PC hardware (however, in reality the subject is a little bit more complex).
You can install the VirtualBox software, configure a virtual machine, and run another operating system, like installing it on another PC. You can configure the virtual machine (VM) configuring various kind of hardware: how much RAM, what kind of chipset (PIIX3 or ICH9), how many (virtual) CPUs, up to four network cards and which model, how many (virtual) hard disks, boot order, audio device and a bunch of other things.
You can install as many VMs you want, and run them at the same time, well, in this case as many as your physical hardware is able to support (you can imagine what happens if you try to start ten VMs with 1GB of RAM each, and your PC have 4GB of RAM).
VirtualBox is a multi platform software: in the sense that it is released for a lot of operating systems (Linux, Windows, MacOS and Solaris/Illumos). VirtualBox is developed by Oracle and, since version 4, it is free software released under the GNU General Public License version 2 (GPLv2).
Installing Fedora as a VirtualBox guest
Start Oracle VM VirtualBox Manager
In this tutorial, we assume you already have VirtualBox installed. It is a straightforward task: download the Windows or MacOS X installer from the VirtualBox website. Generally speaking, the version that you can download from the Oracle VirtualBox website is more recent than the one you can find in 3rd party repositories.
Once VirtualBox is installed, start it, and you will see the configuration and management dashboard: Oracle VM VirtualBox Manager. Also this interface is pretty simple and straightforward.
Download the Fedora ISO
In order to install Fedora, you need the installation media. You can download Fedora from https://getfedora.org/ Any of the Fedora downloads will work. You can grab the full Fedora Workstation ISO, the slim netinstall ISO, or even a spin of the Fedora desktop environment: maybe XFCE or LXDE desktop environment will runs smoothly inside a virtualized platform.
Create an empty virtual machine
The graphical interface will guide you through the VM creation. Basically the default options should fit your basic needs.
Click on the “New” icon. Write the name of the VM. Type and Version should be automagically reflect the operating system you are going to install: based on this, some basic options will be automatically adapted to fit the operating system minimal requirements.
Click on “Next”. Now you must select the amount of RAM to assign to the VM. Please note that the more you assign to the VM, the lesser will remains to your host operating system: if there is a lack of available memory on the host OS, the system will start to swap, affecting even the VM performances. So pay attention in balancing the RAM size of the VM: however the configuration interface will alert you if you are exaggerating. By the way 1024 MB is a good starting point.
Now it is time to configure the VM disk. Default choiches are ok, except for the size: 8GB is too small for a usable Fedora workstation, so let’s use at least 20GB. Also in this case, you are taking up space to the host system: you must take that into account if you are planning to use many virtual machines or you’re short in disk space.
Remember that you can add as many (virtual) disks as you want. So, for instance, if you end up filling the virtual machine disk space, you can add a second disk. It is more easy than adding an hard disk to your desktop PC or your notebook.
Ready to start with the machine configuration
The virtual machine is now ready. You can change some options by clicking the Settings option from the toolbar.
The network options allow you to configure more than one interface, and the kind of network. You can configure your VM mainly in these ways:
- NAT: the VM will be like in a private network not accessible from the outs/>
- Bridged Adapter: in this case you must think as a new network card on your host PC. The VM is directly attached to your LAN, so you must assign a static IP in the same subnetwork of the host system, or use your LAN DHCP. In this way the VM will have a reachable IP, at least from the LAN, so you can configure some network services and reach them from any host in the LAN.
There is a third way that worth mentioning. You can configure the main interface as NAT, and a second interface as Host-only Adapter: in that way the VM can reach the outside network using NAT, but it is at the same time reachable, but unlike Bridged mode, it is reachable solely and exclusively from your PC.
You need to select the installation disk. So go in Storage and select the ISO file previously downloaded.
Select Empty in the IDE controller, then the CD icon. Select the ISO image and press OK.
Start up the VM and let’s install Fedora
It is now the time to start the virtual machine. By default it will start from the virtual CD. You must think to a virtual machine, like it is a physical one: you can boot up, shut down gently, abruptly power off, it has memory, disks, network card, and even a sound card if you want.
Let’s click on the green arrow. The virtual machine will start.
You can ignore the overlay message complaining something related to mouse pointer and keyboard integration. We will manage to solve that later.
The boot process begins and you can go ahead with the normal installation process.
You will see the (virtual) network interface, and the 20GB (virtual) Hard Disk.
It is a good choice to leave the default partitioning scheme. In fact by default Fedora will set up a LVM, logical volume manager. LVM could be useless in a notebook, where you will never add a second hard drive. In a virtual machine you can easily add pretty as many disks as you want, as said before, so using LVM is a good choice in order to further expand available filesystem space inside the VM.
Go ahead with the installation process and reboot the system.
As for every installation, inside a VM or not, the first thing to do is a system update. Then login on Fedora with the user configured during the installation process and complete the first login steps. To update the Fedora install in your VM, open a Terminal and type:
Installing the Guest Additions
VirtualBox Guest Additions are device drivers and system applications that help to optimize the operating system installed inside the VM, useful for better performance and usability, like a better mouse and keyboard integration, window scaling and resizing, better video performances, and clipboard integration. Guest Additions need to be installed inside the VM, not on your host OS.
Then let’s insert the Guest Additions CD, by clicking on Devices -> Insert Guest Additions CD image… A window should appear asking you if you want to allow autorun of the CD content.
Click on “Cancel” because you need to install some additional packages in order to fully install the Guest Additions.
Open a terminal and type, even if some packages may be already installed:
Once finished, actually install the Additions by running the script
Make a clone
The clone is a copy of the newly created machine. When you are ready, stop the VM. In the Manager select the VM and in the Machine drop down menù, select “Clone…”
The main difference between Full and Linked clones is that latter cloning process is faster and consumes less size on your hard disk, at least initially, by contrast you cannot delete the virtual disk of the source VM, and cloned VMs cannot be exported to a different computer without moving the original as well.
VirtualBox is a very convenient way to try Fedora if you don’t already use it, whitout having to partition or format your PC or configuring dual booting. If you already are a Fedora user, VirtualBox is a very effective way for testing purposes without the fear to break your system: you can reinstall the VM as many times as you want, or better, as stated before, you can use clones to restart your test from a fresh installation without wasting time in the installation process.