How to use VirtualBox
By now you have decided to expand your knowledge on the world of computer operating systems, so you intend to put into practice a series of operations that allow you to optimize them, intervening on very delicate aspects of them. The only problem, however, is that you are afraid of the mistakes you might make, effectively rendering your computer unusable and forcing yourself, at best, to fully reset your machine.
Are you already thinking of giving up and keeping your thirst for knowledge at bay? You don’t have to, because in this and in many other cases an extremely useful tool can come to your aid: the so-called virtual machine. This, in fact, allows you to create a safe environment inside the physical computer, on which you can practice and perform all the experiments you want: in case of error, you simply need to recreate or restore the virtual machine, without repercussions for the operating system in use or for personal files.
One of the best free programs suitable for this purpose, which I am going to tell you about in the following lines, is VirtualBox : it allows, in fact, to create one or more virtual machines in a few clicks and to use and manage them in the best possible way, thanks to a simple configuration interface suitable for everyone. The software is also open source and can be installed on all popular operating systems: Windows, macOS and Linux. So what are you waiting for to take action? By following my advice carefully, you will discover how to use VirtualBox at its best and how to take advantage of its many features. Happy reading and have fun!
Index
- How to use VirtualBox on Windows 10
- How to use VirtualBox: Mac
- How to use VirtualBox with Ubuntu
- How to use VirtualBox: create and manage a virtual machine
- Install the guest additions
- Share notes and devices
How to use VirtualBox on Windows 10
To use VirtualBox on Windows 10 and later editions of the operating system (such as Windows 11 ), you must first download and install the program on your computer. Therefore, connected to this website, click on the Windows hosts link placed immediately under the heading VirtualBox [xyz] platform packages and wait for the software installation file to be completely downloaded to your computer. When the download is complete, start the file obtained (eg. VirtualBox-xyz-k-Win.exe ) and click on the Next button 3 consecutive times.
At this point, VirtualBox should warn you about the temporary disconnection from the network during the procedure: to start the program setup, click on the Yes , Install and Yes buttons and wait a few more seconds for the procedure to be completed. To complete the installation of the program, remove the check mark from the item Start Oracle VM VirtualBox [version] after installation and press the Finish button.
As a final step, I recommend that you also install the VirtualBox Extension Pack , which is an add-on that allows you to add interesting features to VirtualBox, such as support for disk encryption, USB 3.0 devices and remote control via RDP; to do this, connected again to the VirtualBox download page, click on the All supported platorms link under the item VirtualBox xyz Oracle VM VirtualBox Extension Pack and wait for the dedicated file (with the extension .vbox-extpack ) to be downloaded to your computer.
Finally, click on the file you just obtained, wait for VirtualBox to open and, when prompted, click on the Install button ; now, scroll down the next window to reach the end of the software terms of use and click on the Accept , Yes and OK buttons to add the extension package.
As you can see, the VirtualBox window is divided into three main “parts”: the upper toolbar , through which you can quickly access the functions related to virtual machines and the program itself; the left sidebar , which lists all the virtual machines created; and the right pane , which shows a preview of the status of the selected virtual machine, together with the summary of its settings and the list of snapshots created (if any).
To start the creation of a virtual machine, click on the New button located at the top and follow the instructions you find in one of the following chapters of this guide.
How to use VirtualBox: Mac
If, on the other hand, yours is a Mac , you can install VirtualBox in the following way: go to the program download page, click on the OS X hosts item located near the wording VirtualBox [xyz] platform packages and wait patiently for the package containing the program is downloaded to the disk. When the download is complete, open the file obtained (eg. VirtualBox-xyz-OSX.dmg ) and double-click on the file called VirtualBox.pkg , located inside the window that opens on the desktop.
Now, authorize the Mac to start installing the software by pressing the Allow button (if required), click on the Continue and Install buttons and enter the Mac administration password in the new window that appears on the screen. Finally, click on the Install software button and wait for the process to complete, which could take up to a few minutes.
Now, in order for VirtualBox to work correctly, you need to authorize the system extensions added to macOS: click on the Open the Security preferences button located in the window that opens, in order to access the Security and Privacy section of the system preferences, click on the locked padlock symbol located at the bottom left and, to unlock the change of settings, type the password of the Mac and press Enter .
At this point, press the Allow button located near the notice relating to the system software release of the developer “Oracle America, Inc.” and restart the computer, pressing the button that is shown to you; if you prefer to restart your Mac at a later time, press the Not Now button instead , bearing in mind that VirtualBox will not work until the next login into the system.
Once the software setup is complete, I recommend that you also configure the extension package for VirtualBox , which you can download and install following the same instructions already seen for Windows; to complete the procedure, you will be asked to enter your Mac password . After this step too, proceed with the creation of your first virtual machine, following the instructions you find here.
How to use VirtualBox with Ubuntu
VirtualBox is available in the official Ubuntu repositories and, consequently, can be installed through the Ubuntu Software application : after starting the latter, search for the program name using the appropriate function and click on the most relevant result, in order to display the software summary screen. Finally, press the Install button , enter your account password when prompted and press the Authenticate button , in order to authorize the download and installation of the program.
To download and install the package of extensions for the program, follow the same instructions already seen for Windows; finally, proceed with the creation of a new virtual machine, as you will find explained in the next chapter of this guide.
How to use VirtualBox: create and manage a virtual machine
As you have surely noticed, the VirtualBox interface is identical on both Windows, macOS and Linux; therefore, starting from this moment, the procedures listed are the same on all three operating systems. But be careful: if you have a Mac with Apple Silicon chip (e.g. M1) you will not be able to install Windows in a virtual machine , as it is an operating system based on x86 processors (e.g. the Intel and AMD ones that are typically found on Windows PCs ) and at the moment there is no official stable version intended for systems with Apple Silicon chips.
That said, starting the creation of a new virtual machine (or VM) is very simple but, before proceeding, I think it is necessary to make a couple of clarifications: first of all, it is possible to create virtual machines that run practically all DOS -based operating systems , Windows and UNIX (therefore Linux, BSD and so on), both 32 and 64 bit. It is not possible to virtualize macOS operating systems , at least not officially, due to the restrictions imposed by Apple regarding the installation of its applications on hardware other than that of the Mac.
Secondly, before proceeding, make sure you have the ISO file of the operating system to be virtualized: if you don’t know how to get it, you can refer to my tutorials on how to download Windows 11 , how to download the Windows 10 ISO , such as download Windows 8 and how to download Windows 7 ; you can get the ISOs of the various Linux distributions ( Ubuntu , Linux Mint , Debian , Kali Linux , Arch Linux , Fedora and so on), instead, by going to their respective official websites.
Having said that, let’s see how to proceed together: to create a new virtual computer that can host the “guest” operating system (called guest ), click on the New button located in the upper toolbar of VirtualBox, type the name to be assigned to the virtual machine ( eg Ubuntu 21.10 ) and then select the type (eg Linux ) and version (eg Ubuntu 64 bit ) of the guest operating system. Once this is done, click on the Next button and, using the adjustment bar and the box that appears on the screen, indicate the amount of RAMto assign to the virtual machine. I recommend: always try to stay below half of the actual amount of physical RAM available on the real computer, otherwise you could completely block it; in general, you should keep below the green colored bar .
After this step too, you will be asked to add a new virtual hard disk to the machine: put the check mark next to the item Create a new virtual hard disk immediately and then click on the Create button , in order to access the creation screen. Now, put the check mark next to the VDI item , press the Next button , check the box next to the item Dynamically allocated and click again on the Next button , define the size of your virtual disk using the dedicated cursor (or type its size in the box next to it), and click the buttonCreate two consecutive times, in order to add the disk and finish the creation of the virtual computer.
If you want to change other parameters of the virtual hardware, click on the name of the virtual machine you just created (located on the left), then on the Settings button and, later, on the System items (for CPU and RAM adjustments), Display ( for video adjustments), Audio (for those related to sound hardware) and Network (for network settings). Also through the same window, you can configure any storage devices, access to USB drives and some other advanced settings. If you have no special needs, I advise you to leave the default parameters unchanged, in order to avoid future malfunctions.
Once the creation (and eventual customization) of the virtual machine is complete, select it with a click of the mouse and press the Start button , in order to start it: if everything went smoothly, you should be shown the window that allows you to associate a new virtual disk to the same. When this happens, click on the yellow folder symbol, click on the Add resident button on the next screen and use the window that appears later to select the .ISO file that contains the operating system to be installed. Then, click on the newly added support, press the Choose and start button the virtual machine, by pressing the dedicated button.
Now, all you have to do is proceed by following the instructions shown on the screen, which are absolutely identical to those you would see during a “real” installation of the operating system: if you need more specific help on Windows or Ubuntu installations, you can refer to my guides on how to install Windows 11 without TPM (so you can skip the minimum system requirements check), how to install Windows 10 , how to install Windows 7 and how to install Ubuntu.
During the installation of the guest operating system, and for the entire session of use of the virtual machine, the mouse may be “trapped” in the VirtualBox screen, preventing you from using the host operating system installed on your computer: to exit this situation and release the mouse, simply press the VirtualBox Host key , which by default corresponds to the CTRL / cmd button on the right of the keyboard.
Once the setup procedure is complete, you can use your virtual operating system exactly as you would on a “physical” computer: each virtual machine can be started by pressing the Start button on the main VirtualBox screen, and must be shut down using the procedure provided by the operating system (eg Start> Shutdown button> Shut down for Windows). If you wish, you can expand your virtual machine to full screen by pressing the Host + F key combination .
Please note that you can save the state of a virtual machine at any time by creating a snapshot of it: you can do this by calling the Machine> Create snapshot … menu visible in the virtual machine window, or by pressing the Host + T key combination . The snapshots thus created will then be displayed (and made bootable) from the main VirtualBox screen.
Note : through VirtualBox, it is possible to import and export virtual machines and applications complete with settings, disks and devices, generally in the form of files with the .ovf or .vbox extension . To do this, click on the Tools button of the program and then on the Import button , to add an entire virtual application, or Add , to load a pre-existing virtual machine.
Install the guest additions
To improve the experience of using the virtual operating system, I recommend that you install the Guest Additions , which are a series of add-ons that allow you to expand the functions of the virtual machine, with features such as 3D acceleration, clipboard sharing and the function to use VirtualBox shared folder .
So, once the installation of the virtual operating system is complete, start it and use the Devices menu> Insert the image of the VirtualBox Guest Additions CD (if you have activated the full-screen view, you can call up this last menu by moving the cursor mouse on the lower central edge of the virtual machine) to download the necessary files and add them, in the form of a virtual CD-ROM, to the running system; now, if requested, confirm the willingness to run the contents of the disk within the virtual operating system and follow the instructions you see on the screen, to complete the installation of the required components. Finally, restart the virtual operating system for the changes to take effect.
Share notes and devices
Although the virtual machine is a separate entity from the operating system installed on the computer and from the physical peripherals it has, it is possible, upon request, to share devices, folders and notes to simplify the work: for example, it is possible to connect a USB device physical to the computer and use it via the virtual machine, or use copy / paste between the host and resident operating systems as if they were one. However, please note that changes made via the virtual machine to external devices and / or shared folders are effective and cannot be undone.
That said, to connect a device to a running virtual machine, use the program’s Devices menu ; to connect physical devices already connected to the computer, move the mouse over one of the items Optical Readers, USB (for USB devices) or Webcam , and click on the device to connect; as regards, instead, the sharing of files and folders, always from the Devices menu, select the items Shared Folders> Shared Folders Settings … and click on the folder -shaped icon with the + symbol placed on the right, to configure a new shared directory.
Finally, you can activate the sharing of notes by going, again through the Devices menu , to the item Shared notes . You have four different options: the Disabled option prevents clipboard sharing, from Guest to Host allows you to copy from the virtual machine and paste on the resident operating system, from Host to Guest allows you to perform the reverse operation, and Bidirectional it allows you to do both.
Note : to quickly connect external devices to the virtual machine, when you run it in window or scaled mode, you can use the quick icons in the program status bar.