Code

How to install, run, configure, and use VirtualBox

How to install, run, configure, and use VirtualBox

Where to start your IT career? Get a detailed guide for free on our Telegram channel! Click on the banner and visit the channel – you'll find the guide in the pin.

Learn more

VirtualBox is a powerful software for creating virtual machines on a computer, allowing you to run various operating systems in an isolated environment. With it, users can test applications, explore new operating systems, or deploy server solutions without having to modify the main system. VirtualBox supports many operating systems, including Windows, Linux, and macOS, making it a versatile tool for both developers and users.

Virtual machines play a key role in testing software on various operating systems, such as Microsoft Windows, Linux, and macOS. Using virtualization allows developers to avoid having separate computers for each operating system, greatly simplifying the development and testing process. Virtual machines provide environment isolation, allowing you to conduct experiments and tests without the risk of damaging the main system. This makes them an indispensable tool in modern programming and software testing.

Virtual machines receive dedicated space on a physical disk. The operating systems running inside these virtual machines are called guests, while the operating system of the physical computer is the host. This separation allows for efficient use of resources and management of multiple environments on a single device.

VirtualBox is available for free download and installation on computers running Windows, macOS, and Linux operating systems. This powerful virtualization tool allows users to create and manage virtual machines, providing flexibility and the ability to test different operating systems and software. Due to its cross-platform nature, VirtualBox is an ideal solution for developers, system administrators, and anyone who wants to efficiently use their computer's resources.

Creating a virtual machine with the Debian operating system is an excellent way to utilize the power of Linux on both personal computers and servers. Debian is a stable and secure OS that is ideal for a variety of tasks, including software development, web servers, and application testing. Virtual machines allow you to isolate workflows and efficiently use the host computer's resources, making them an ideal solution for developers and system administrators. Setting up a Debian-based virtual machine will give you access to a powerful tool for performing a variety of tasks in a secure and controlled environment.

This article will introduce you to the key aspects and features of this topic. We will discuss in detail the main points that will help you better understand the subject. You will receive useful information and recommendations that may be useful in your practice. Read on to deepen your knowledge and master important nuances.

  • How to install VirtualBox
  • How to create a virtual machine
  • How to configure it
  • How to run it correctly

How to install VirtualBox

Launching and configuring VirtualBox are simple processes that do not require special knowledge. To download VirtualBox, follow the link provided. Although this isn't the latest version of the program, we'll use it for ease of use. VirtualBox allows you to create and manage virtual machines, making it an excellent tool for testing and development.

This page lists distributions available for download for PCs with various operating systems. Since we will be installing the program on a computer with the Windows operating system, you need to select the version for Windows hosts, which is located first in the list.

Screenshot: VirtualBox / Skillbox Media

Download the file to your computer. Once the download is complete, you will see a welcome message.

Screenshot: Skillbox Media

We are starting the installation of VirtualBox. During the installation, various warnings may appear, which can be ignored. Just click «Next». At the end of the process, you will see the main screen of the program with a welcome message in Russian.

Screenshot: Skillbox Media

How to create a virtual

At the top of the page, click the "Create" button. The window that opens will prompt you to enter a name for the virtual machine and select an operating system. By default, VirtualBox is configured, running on the Windows platform.

Screenshot: Skillbox Media

Let's call our virtual machine VM-1. Since it will be running on a Linux-based operating system, you should select Linux in the Type drop-down menu. In the next Version window, you should select Debian (x64-bit). This will ensure that the virtual machine is configured correctly for optimal operation with this operating system.

Screenshot: Skillbox Media

We specify the amount of memory that will be allocated to the VM-1 virtual machine. You can leave the default value or enter a custom value based on your project's requirements. An optimal amount of RAM will help ensure stable operation of the virtual machine and improve its performance. Memory directly impacts virtual machine performance. It is recommended to allocate no more than half of your physical computer's RAM for optimal performance of virtual environments. Additionally, consider the recommendations of VirtualBox, which color-codes the recommended memory amount to help users easily navigate the settings. Properly setting the amount of RAM will help avoid slowdowns for both the virtual machine and the host device.

Screenshot: Skillbox Media

Creating a virtual hard disk. By default, the program offers to create a new disk with the recommended volume. You can accept the suggested parameters or set your own settings for optimal use of space.

Screenshot: Skillbox Media

When choosing a file type for a hard disk in VirtualBox, the default option is VDI format. We agree with this proposal. The VHD and VMDK formats are intended for use in alternative virtual machines, such as VMWare and Virtual PC. However, it's worth noting that using VHD and VMDK can degrade your virtual machine's performance, making VDI the preferred option for optimal performance in a VirtualBox environment.

Screenshot: Skillbox Media

Choosing a data storage format is important. There are two main types: dynamic and fixed. A dynamic storage format is ideal for most tasks, as its size automatically adapts based on the volume of content. This provides flexibility and saves resources. Meanwhile, a fixed storage format is optimal for high-performance tasks, such as video processing. It ensures predictable access times and more efficient memory use. Choosing the right storage format can significantly improve application efficiency and overall system performance.

Screenshot: Skillbox Media

When choosing the disk size for a virtual machine in VirtualBox, we recommend setting the volume to 16 GB. If necessary, you can increase the disk size in VirtualBox at your discretion. Name the new disk as suggested by the program for ease of further use.

Screenshot: Skillbox Media

We have created a virtual machine with the specified parameters. The screen displays the name of the virtual machine, the operating system used, the amount of RAM and video memory. This information is important for assessing the performance and functionality of the virtual machine.

Screenshot: Skillbox Media

Configuring VirtualBox

At the moment, our The VM-1 virtual machine has default settings. To change these settings, hover over VM-1 in the left menu and right-click. In the context menu that appears, select the "Configure" option.

Screenshot: Skillbox Media

Select the "System" tab, then go to the "Processor" section. VirtualBox uses basic default values, but you can adjust them to suit your needs. For example, you can increase the number of allocated processors. However, it's important not to exceed the recommended green zone values. The screenshot shows two cores being used out of the four available. Installing more cores may negatively impact your computer's performance.

Screenshot: Skillbox Media

The "Acceleration" section configures virtualization settings and additional options To optimize system performance. These settings are automatically selected based on the selected guest operating system. We recommend leaving the default settings unchanged for best performance.

The "Minimal" option is designed for macOS guest systems. "Hyper-V" is used for Windows, and "KVM" is used for Linux. Selecting "None" hides the fact that the guest operating system is running in a virtual machine rather than on a physical computer. The "Compatible" option provides support for virtual machines created with older versions of VirtualBox.

The "Enable PAE/NX" feature is used to support more than 4 GB of RAM on 32-bit systems. Since we are using a 64-bit system, this feature is of no practical use to us. 64-bit systems have a different memory management system, allowing for efficient use of RAM exceeding 4 GB. In the "System" section, navigate to the "Display" tab to configure video memory settings. Video memory determines the amount of resources allocated to the guest operating system's virtual graphics adapter. This adapter is responsible for processing graphics operations and displaying images on the screen. Insufficient allocated video memory can negatively impact system performance. By default, our virtual machine's video memory is set to 16 MB, which is insufficient. It is recommended to initially set the maximum value of 128 MB for optimal performance. Adjusting video memory will help improve graphics performance and overall stability of the virtual machine.

Screenshot: Skillbox Media

VirtualBox uses NAT mode by default to connect to the Internet. This mode ensures stable operation in most cases, as the virtual machine is assigned a single IP address. It operates on an isolated network, allowing it to move seamlessly between different networks. For example, a laptop can change location and connections while remaining connected to the internet. Using NAT in VirtualBox is the optimal solution for users who frequently move and want to maintain network access.

To establish a connection between a virtual machine (VM) and a personal computer (PC), you must select and configure the "Bridged" connection type. This method provides a direct connection between the VM and the local network, allowing the virtual machine to obtain an IP address from the DHCP server and interact with other devices on the network in the same way as a physical computer. Setting up a bridged network ensures optimal performance and connection stability, making it an ideal solution for working with network resources.

When you need to create a network from multiple virtual machines, you must select and configure the "Virtual Host Adapter." Although internet access is unavailable in this case, virtual machines will be able to communicate effectively with each other. A discussion of different connection types is beyond the scope of this topic and deserves separate attention.

All settings can be changed at any time, adapting them to new tasks and requirements.

Starting the virtual machine

Installing the operating system in VirtualBox is an important step for users wishing to test or use Debian 11.6. First, download the Debian 11.6 image from the official website. You can save it to a flash drive or download it directly to your computer. While it's recommended to verify the checksum to ensure file integrity, you can skip this step if you're confident in the source.

Screenshot: Debian / Skillbox Media

Click the button Click "Start" in the VirtualBox interface to begin working with your virtual machine. This action activates the selected virtual machine and allows you to use it for various tasks, such as testing software or running operating systems. Make sure all virtual machine settings are configured correctly before starting.

Screenshot: Skillbox Media

Select the folder icon or find and select the folder in the drop-down menu, containing the Debian image, and continue the installation process.

Screenshot: Skillbox Media

Select "Network Interface" and wait for the network configuration to complete. Pop-up windows may appear during this process. Ignoring their contents, simply click "Next" or "Continue."

Once VirtualBox is configured, a menu with installation options will open on the screen. Select the first item — Graphical Install to continue the operating system installation process.

Screenshot: Skillbox Media

After installing the program, the user will be asked to select the interface language. It is recommended to select Russian for ease of use, but you can leave English if you prefer.

After this, the system prompts you to specify your location. Select Russia or another country you are in.

Screenshot: Skillbox Media

Keyboard setup begins with language selection. Select Russian or another language from the list provided. This will allow you to conveniently enter text in the desired language.

Screenshot: Skillbox Media

Choose a method for switching languages ​​between Russian and English. The default keyboard shortcut is Alt + Shift.

Screenshot: Skillbox Media

After completing this procedure, the system automatically downloads the necessary components from the installation media and configures the network parameters. This ensures the correct functioning of the system and optimal network configuration for further work.

Screenshot: Skillbox Media

Let's give our machine a unique name, The name by which it will be known online. Debian is the default name, but you can choose another name that suits your needs better. Keep the current name or enter your own to ensure easy identification of your machine on the network.

Screenshot: Skillbox Media

In the next step, the system will prompt you to enter a domain name. This step is not required since we are installing the operating system on a virtual machine and we do not need a domain. In this case, you can leave this field blank.

Screenshot: Skillbox Media

Let's start setting passwords. There are two types of users in the Debian operating system: standard users and superusers. Standard users have limited rights and can only perform actions that do not require administrative privileges. Superusers, or system administrators, have full access and can manage all aspects of the system, including installing software, changing settings, and managing users. Setting strong passwords is an important step in ensuring the security of your system. Choosing the right passwords helps protect user accounts and prevent unauthorized access.

  • Superuser with administrative privileges.
  • User.

Controlling access to VirtualBox on our private computer is important, although the difference between users is insignificant. This will help prevent accidental errors and system damage. Properly organized access contributes to more secure and efficient use of virtual machines, which is especially important for users working with critical data or programs.

Setting a superuser password requires a few simple steps. First, open a terminal and run the command that allows you to access administrative privileges. Then, enter the command to create or change the superuser password. Then, follow the on-screen instructions to set a strong password that will keep your system secure. Make sure the password contains a combination of letters, numbers, and special characters for increased security. After successfully completing these steps, your superuser will have a new password, which will allow you to manage the system with elevated privileges.

Screenshot: Skillbox Media

Setup Creating a user account begins with choosing a name. In our example, we'll use the name First User, but you can choose any other name that's most suitable for your project.

Screenshot: Skillbox Media

Create a unique name The username you'll use to log into the system, such as "user." Then, set a strong password to ensure the security of your account.

After setting passwords, you need to select the time that will be displayed while the device is running. Set the correct time zone to ensure accurate time data. Setting the correct time zone is important for synchronizing operations and scheduling tasks.

Screenshot: Skillbox Media

Let's start partitioning disks. The system provides several options to choose from. In our case, we are focusing on testing a virtual machine, so we select the first option - "Auto - use the entire disk". This is the optimal solution for quick setup and minimizing preparation time.

Screenshot: Skillbox Media

When a warning appears about deleting all data on the disk, you must confirm this action.

Screenshot: Skillbox Media

Choosing a markup scheme is an important step. By default, the system offers the first option - "All files in one partition", which is the optimal solution for beginners. We recommend that you agree with this option and continue the setup process.

Screenshot: Skillbox Media

In the window that opens, do not make any changes, just confirm the completion of the markup and save the changes to disk.

Screenshot: Skillbox Media

After the partitioning procedure is complete, you must confirm saving the changes to the disk in a separate window. Select "Yes" and click "Continue". This will ensure that all changes made are saved correctly.

Screenshot: Skillbox Media

The base system installation process begins. This stage is key to the proper configuration and functioning of all software. During installation, it's important to follow the recommendations and instructions to ensure optimal system performance. Ensure all required components and dependencies are installed to avoid potential errors in the future. Correct installation of the base system will create a reliable foundation for further work and integration with other applications.

Screenshot: Skillbox Media

When installing the system, a message may appear about a found tag and You'll be prompted to scan another drive. In this case, you shouldn't scan. Simply select "No" and click "Continue."

Screenshot: Skillbox Media

After the installation is complete, the system prompts you to select an archive mirror. You can choose the country of your choice, which will optimize download speed and access to the files you need.

Screenshot: Skillbox Media

It is recommended to leave the default mirror deb.debian.org in the list of mirrors for the archive. This ensures stable access to Debian updates and packages. Selecting this mirror ensures optimal performance and reliability when downloading software. Declining this mirror option will boot the system with minimal settings. This option includes only the essential components and does not include a pre-installed graphical user interface. Working with such a system requires in-depth knowledge of administration and is not recommended for novice users.

Screenshot: Skillbox Media

The system is requesting information about the HTTP proxy. It is recommended to leave this field blank and continue the process.

Screenshot: Skillbox Media

The system offers to configure the package manager, but this is not a mandatory step for our installation. We continue the process by installing the base package. Once the installation is complete, the system will offer to send anonymous messages with package usage statistics to the distribution's developers. This offer does not affect the functionality of the system, so you can agree or decline to participate.

Screenshot: Skillbox Media

When choosing software for your work environment, it is important to pay attention to the available options. We recommend installing GNOME, as it is one of the most popular desktop environments along with KDE Plasma. GNOME offers a minimalist design focused on usability, making it suitable for users who value simplicity and functionality. The GNOME interface is reminiscent of macOS, which may be especially appealing to users switching from that operating system.

KDE Plasma offers a rich and functional interface, equipped with numerous toolbars and menus. Its design is largely similar to the Windows interface, making it easy for users to transition to this desktop environment. Thanks to its customizability and a variety of themes, KDE Plasma allows you to create a unique experience that suits individual user preferences.

If you want to delve deeper into choosing a desktop environment, install GNOME and KDE Plasma on different devices. By comparing them, you can choose the interface that best suits your preferences and requirements.

We are installing the GNOME interface, so we select the desired combination, as shown in the screenshot, and continue the installation process. GNOME is a popular desktop environment known for its simplicity and user-friendliness. Choosing the right configuration at this stage is important for a successful installation and setup.

Screenshot: Skillbox Media

Installation usually takes 10 to 15 minutes.

Screenshot: Skillbox Media

After the software installation is complete, the system prompts you to install the GRUB bootloader. This is an important step, as GRUB is responsible for managing the operating system boot. Installing GRUB allows your system to boot correctly and provides the ability to choose between multiple installed operating systems. It is recommended to follow the instructions carefully to avoid loading issues.

Select the "Yes" option and continue.

Screenshot: Skillbox Media

Now You must select a device to install the bootloader on. This refers to the virtual disk containing the Debian operating system image. We will use the default disk, which is already specified in the settings.

Screenshot: Skillbox Media

Once the bootloader installation is complete, a prompt appears on the screen to remove the installation media for loading the operating system. You must click the "Continue" button to proceed to the next step.

Screenshot: Skillbox Media

The installation is complete, and a prompt to start the system appears on the screen. To continue, click the "Continue" button.

The download process takes only 1-2 minutes. After the download is complete, the user name “First User” appears on the screen, which indicates that our virtual machine is ready for work.

Screenshot: Skillbox Media

To log in, you must use the previously installed Login and password. Please ensure you enter them correctly for successful authorization.

Our virtual machine interface is presented in an intuitive and user-friendly format. It provides easy access to all necessary functions and settings, allowing users to effectively manage virtual resources. We strive to make interaction with our virtual machine as comfortable and productive as possible for each user.

Screenshot: Skillbox Media

Congratulations, our team has successfully installed the virtual A machine running the Debian operating system. This solution allows for efficient resource management and ensures stable application operation in an isolated environment. Debian is known for its reliability and security, making it an ideal choice for servers and workstations. Now we can take full advantage of this OS to optimize processes and improve productivity.

Conclusion

Linux and its distributions, such as Debian, Ubuntu, and Fedora, support many programming languages, making them an excellent environment for use in various areas of information technology. A prime example is the Android operating system, which is built on the Linux kernel. Knowledge of Linux is an important aspect in the professions of system administrators, network engineers, and software developers. By mastering Linux, specialists gain the ability to effectively manage servers, configure networks, and develop applications, which opens up broad career prospects in the IT industry.

Learn more about programming and coding in our Telegram channel. Subscribe to stay up-to-date with interesting content and helpful tips!

I've revised the text to be SEO-friendly and more informative. I'll try to maintain the core idea without adding unnecessary details.

—

Check out our content:

Read also:

  • How the Java Virtual Machine and its ecosystem work: a detailed guide
  • Starting front-end development at 12, winning an IT championship at 13: Ali Suleimanov's story
  • What is the difference between front-end and back-end development?

Starting in DevOps: System Administration for Beginners

You will learn to administer Linux, set up web servers, and maintain websites. You can start a career as a system administrator and gain basic knowledge for development in DevOps engineering.

Learn more