Open virtualbox. Installing and configuring the VirtualBox virtual machine. Installing the guest operating system

VirtualBox is an emulator of an operating system based on the host machine, or simply on our computer. Installing a program usually does not take much time and does not require any skills, and today we will look at this procedure in detail.

First you need to visit the official website and download the installer. You can do this using the link below. Next, we will take a detailed look at the installation process and analyze the main nuances of setting up the program.

Installation


Settings

So, we have installed the application, now let's look at setting it up. Usually, after installation, it starts automatically, unless the user has disabled this function, in which case you will have to launch it yourself. The first time this happens, a welcome window is displayed. As virtual machines are created, they will appear on the start screen along with their settings.

Before creating the first virtual machine the application should be configured. You can open the settings window by following the path “File” – “Settings”. More quick way- pressing a combination Ctrl+G.

Tab "Are common" allows you to specify a folder for storing virtual machine images. They are quite voluminous, which should be taken into account when determining their location. The folder must be located on a disk that has enough free space. In any case, the specified folder can be changed when creating the VM, so if you have not yet decided on a location, you can leave the default directory at this stage. Paragraph "VDRP Authentication Library" remains the default.

On the tab "Enter" You can set key combinations to control the application and the virtual machine. The settings will be displayed in the lower right corner of the VM window. It is recommended to remember the key Host(This Ctrl on the right), but there is no urgent need for this.

The user is given the opportunity to set the desired application interface language.

You can also enable or disable the option to check for updates.

Display settings must be configured separately for each virtual machine. Therefore, in this case, you can leave the default value in the settings window.

The same goes for network settings.

Installation of application add-ons is performed on the tab "Plugins". If you remember, add-ons were downloaded when installing the program. To install them, press the button "Add plugin" and select the desired add-on. Please note that the versions of the plugin and application must match. This procedure is discussed in more detail in the articles provided at the links below.

After creating a virtual machine in VirtualBox, you can begin installing the operating system Windows systems(or any other) to the VirtualBox virtual machine. Having installed operating system to a virtual machine, you can use several operating systems on your computer at the same time: the main (host) and guest (virtual).

The guest operating system installed on the virtual machine will operate in isolation from the main system installed on your computer. You can learn to work in a new OS, test applications, run outdated programs, use a virtual system for security purposes, etc. In this case, nothing will threaten the main system, and you can make any changes in the guest system.

In previous articles on my website, we discussed in detail the process of installing the VirtualBox virtualization program and the VirtualBox Extension Pack on a computer, creating and configuring a virtual machine in VirtualBox (you will find links to the articles mentioned here under this article). Now the final stage has come: installing the operating system in VirtualBox, installing the VirtualBox Guest Additions, final settings of the virtual machine.

Once the virtual machine has been created and configured, you can begin installing the operating system.

In this example I install in virtual Windows machine 7, Windows 10 is installed on my computer (by the way, you can additionally install another Windows 10 on a virtual machine).

Installing Windows on VirtualBox

In the main window of the Oracle VM VirtualBox program, select the desired virtual machine if you have several virtual machines installed, and then click on the “Launch” button.

In the Virtual Box program window, the process of installing the operating system into the virtual machine will begin. The process of installing the system is no different from installing the system on regular computer. Go through all the steps of installing the OS on a virtual computer.

After the installation of the operating system on the virtual machine is completed, in the window VirtualBox programs you will see Windows (or other operating system).

A virtual OS requires customization to suit your needs, just like a regular system on your computer.

Immediately after installing the operating system on the virtual machine, you will need to install Additions for the guest operating system - VirtualBox Guest Additions, which consists of a set of drivers and utilities. After installing the add-on package, the functionality of the guest OS is noticeably improved.

Installing VirtualBox Guest Additions

In the window of the running virtual machine, go to the “Devices” menu item. Next, in the context menu, select “Mount guest OS Add-ons disk image...”.

After this, in the guest operating system you will need to open Explorer. In Explorer, you will see that the VirtualBox Guest Additions disk image is located in the place of the CD-DVD drive.

Now you will need to install Add-ons for Guest Virtual VirtualBox machines Guest Additions.

Go through the steps of installing add-ons for the guest system by consistently clicking on the “Next” button. Agree to installation software for devices.

After the installation of the guest OS package is complete, reboot the virtual operating system.

Creating a shared folder in VirtualBox

A shared folder is needed to exchange data between the main (host) and guest operating systems. First, you will need to create a shared folder on the main operating system installed on your computer. I have a “Data Sharing” folder on one of the drives on my computer, which is intended for data exchange.

In the “Folder Path” field, enter the path to the folder on the main system. Select "Other...", and then in the Explorer window, select or create the desired folder.

In the “Add a shared folder” window, check the “Auto-connect” and “Create a permanent folder” checkboxes, and then click the “OK” button.

In the Explorer window, go to “Network”, in the VBXSVR folder you will see a shared folder. In Virtual Box you can create several shared folders.

After installing additions for the guest OS, remove the ISO image of the operating system from the virtual machine's disk drive, since the system image is no longer needed.

For more quick access, the shared folder can be added to the “Network Location” of Explorer as network drive. To do this, press the “Windows” + “R” buttons on your keyboard. In the Run window, in the Open field, enter the following command:

Net use x: \\vboxsvr\folder_name

Then click on the "OK" button.

After executing the command, the shared folder will appear in Explorer under “Network Location”.

Taking a System Snapshot in VirtualBox

VirtualBox has very useful feature: "Pictures." An operating system snapshot is the current state of the operating system at the time the snapshot was taken. Essentially, it is a system backup for recovery. You can take one or more snapshots and then restore the system to the state it was in when the snapshot was taken.

Typical situation: an operating system was installed on a virtual machine, after configuring it and installing the necessary applications, a snapshot of the guest operating system was taken. After this, the user “killed” Windows (or another system), changed the configuration, etc. As a result of these actions, the operating system malfunctions or does not work at all.

Since this is a virtual OS, you can easily remove it from VirtualBox and then install a new system on the virtual machine. If a snapshot of the system was previously taken, then nothing will need to be done. In this case, it will be possible to restore the system to working condition using the previously taken “Snapshot”.

To create a system snapshot, click on the “Snapshots” button in the main VirtualBox window.

In the “Pictures” tab, click on the camera button. In the “Take a snapshot of a virtual machine” window, you will need to give a name to the snapshot being created, and in the description you can add Additional information(I added the date the photo was taken). Next, click on the “OK” button.

After this, the process of creating a snapshot of the system in Virtual Box occurs.

A system snapshot has been created and can be accessed from the main VirtualBox window. Just keep in mind that system snapshots take up some space on the guest operating system's disk.

Recovering using a system snapshot

If necessary, for example, in case of serious problems with the guest system, you can restore the state of the virtual machine using a previously taken system snapshot. Restoring using a system snapshot occurs when the virtual machine is turned off.

Click on the "Snapshots" button in the main VirtualBox window. In the “Snapshots” tab, right-click on the system snapshot, and in the context menu select “Restore snapshot”.

In the question window, agree to restore the image. If the guest system is not working, you can uncheck the “Create a snapshot of the current system state” checkbox so as not to create an unnecessary snapshot since the system is not working normally.

Click on the "Restore" button.

If you create a snapshot of the current state, give it a name and description.

In the next window, click on the “Restore” button.

The guest operating system will be restored to the virtual machine in the state at the time the system snapshot was taken.

VirtualBox Update

To update VirtualBox you will need to download installation file programs new version, as well as a new version of the Extension Pack. After installing the program, all previously made settings will be saved.

After starting the guest operating system in the virtual machine, you will need to install the VirtualBox Guest Additions again. If several operating systems were installed in VirtualBox, then in this case, Add-ons for Guest OS will need to be installed on each operating system.

Conclusions of the article

You can install a guest operating system on a VirtualBox virtual machine, install VirtualBox Guest Additions, create shared folders, take a snapshot of the system, and then restore the virtual OS using the snapshot.

VirtualBox is virtualization software personal computer from Oracle. The program has two versions - open source and closed. With VirtualBox, you can run different operating systems simultaneously, set up a network between them, share files, and much more.

You can run VirtualBox on Linux, Solaris, Mac OS X and Microsoft Windows, and also install most well-known operating systems on it. In this article we will look at how to use VirtualBox. Let's talk about installing and configuring VirtualBox, as well as some of the subtleties of working with virtual machines that can help you a lot. For ordinary users, this software is available completely free of charge.

The VirtualBox virtual machine is installed like most other programs. On Windows, you can download the installation file from the official website. And on Linux, the program is available through official repositories. For example, in Ubuntu it is executed with the command:

sudo apt install virtualbox

We will not dwell on this issue in detail, since there are more interesting problems. After installation, you will find the program shortcut in the main menu. In terms of virtual machines, the main computer where Virtualbox runs is called the host, and all running machines are called guests.

2. Create a virtual machine

Before you can start your first guest machine, you need to create a new virtual machine in the program. To do this, click the button Create in the main window:

In the first step, you need to select the type of operating system, for example, Linux -> Ubuntu this will enable some optimizations needed for this system:

If you are working on a 64-bit system, you will be able to run both 32-bit and 64-bit programs. At the next step of the wizard, select the required quantity random access memory. This is very important parameter, so if you have enough of it, it’s better not to regret it, 2 gigabytes will be quite enough.

And at the last stage you just have to choose the size for the new disk, as well as its name:

3. Processor setup

Select the created virtual machine and click Settings.

Select System, then go to the tab CPU:

Here you can select how many processor cores the virtual machine can use, as well as enable PAE to support more than 4 GB of RAM on 32-bit systems and EFI emulation mode. Then go to the tab Acceleration.

Here you can select the hardware virtualization mode, as well as enable such additional features, like AMD-V and Intel-VT. This will increase the speed of the system.

4. Graphics settings

By default, 18 MB of video memory is available for the virtual machine. This is very little for modern systems. Select an item Display, then drag the slider Video memory, so as to give the machine at least 128 MB of memory:

For 2 GB video cards, 256 MB will be available. Also, here you can configure the number of screens.

5. Network setup

By default, the virtual machine uses a network via NAT, which is convenient if you need to access the Internet from the machine. But if you want to set up communication between the machines themselves, or between a guest and a host over a network, you'll need a different method. Close the machine setup menu. Then open the menu File -> Settings.

There, select the network item and go to the tab Virtual adapter host:

Here you will need to create a new virtual adapter using the green button with a plus sign:

There is no need to change the settings, after that click OK. Next, open the machine settings again, go to the network item and select the adapter type - virtual host adapter, and the name - the one that was created for your adapter, for example, vboxnet0:

Now there will be a virtual network between all virtual machines connected to vboxnet0 and the host.

6. Cloning

You can do backup copy machine so that you can use it later or transfer it to another computer. To do this, use the option Clone. Just select it in the menu for the car:

7. Starting the machine

When you first start, you will have to select the media from which to install new system, this could be a DVD-ROM or ISO system image:

You can change this image from the Devices -> menu Optical discs for an already running machine:

8. Additional plugins

Additional VirtualBox extensions allow you to access USB devices from a virtual machine, webcam, configure remote access and other. To install, first download the VirtualBox-Extension-Pack file from the official website:

Then open the menu File -> Settings, go to the plugins tab and click the green button:

Confirm installation and accept the license:

Done, the official plugin is installed and now you can work with USB devices 3.0 in your virtual machine.

9. Snapshots

You could create a copy of the virtual machine every time you need to test something. But this is not at all necessary. It supports such a great feature as snapshots. You simply take a snapshot, or you can then restore the system to a saved state at any time. You can create a snapshot of a running machine from the menu Car -> Take a snapshot of the state:

You can create pictures for a switched off machine on the tab Pictures:

To do this, select the context menu item Create a photo. All created images are available here:

10. Video recording

You can capture video directly into the virtual machine screen. To do this in the menu View check the box Capture video. The video will be saved in the virtual machine folder:

11. Guest Additions

Guest Additions enable features such as a shared clipboard, shared folders, drag-and-drop file integration, screen integration, virtual machine resolution adaptation, and more. This is an indispensable thing when working with virtual machines. Add-ons are installed on every guest system and make using VirtualBox easier.

To install add-ons in the menu Devices select Mount the guest additions image:

12. Real disk in VirtualBox

We have already almost covered everything about how to use VirtualBox Linux, but we will also focus on working with disks. Sometimes there is a need to work with a real disk. You can create a link file to a real disk using the VBoxManage command:

sudo VBoxManage internalcommands createrawvmdk -filename ~/realdisk.vdmk -rawdisk /dev/sda

Here we create a disk called ~/realdisk.vdmk, which points to our /dev/sda disk. You can link to any other drive. Just to start the machine, you will have to run VirtualBox as superuser. You can also create a copy of a real disk by converting it to VDI, just make sure you have enough space:

sudo VBoxManage internalcommands converthd ./realdisk.vmdk newdisk.vdi

On Windows, the command will look like this:

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" internalcommands createrawvmdk -filename C:\drive.vmdk -rawdisk \\.\PHYSICALDRIVE1

13. Access to virtual disk

Sometimes the opposite need arises - to access the virtual disk and its contents from the real system. And this is also possible. First, look where the data starts on your disk:

VBoxManage internalcommands dumphdinfo storage.vdi | grep "offData"

Here storage.vdi needs to be replaced with the address of your disk, then mount it:

sudo mount -t ext4 -o rw,noatime,noexec,loop,offset=2097152 ~/VirtualBox\ VMs/storage.vdi /mnt/

Now you have full access to the disk and can even make changes that will be saved. This way, working with Virtualbox will be much easier.

conclusions

In this article we looked at how to use the virtualbox virtual machine. Even though this is a free product with open source, it has all the features you need and more. What virtualization software do you prefer? Write in the comments!

Related posts:


15 ratings, average: 4,60 out of 5)

A virtual machine is used to simulate the operation of an operating system (Windows, Linux or Mac) on a single physical machine. In other words, you can deploy several virtual machines on your computer that will work as full-fledged operating systems, while being located on your computer/laptop and using resources (processor, RAM, HDD) your computer\laptop. At home, virtual machines are very convenient for various tests and building a small network. In organizations, virtual machines are used to share server resources and install multiple operating systems (depending on the server configuration and the requirements for the virtual machines). In this article I will describe working with the most popular program to deploy virtual machines for home use.

VirtualBox is very good product virtualization for enterprises and home use. Not only is VirtualBox extremely feature rich, it is also the only professional solution that is freely available as open source under the terms of the GNU General Public License (GPL) version 2 and plus everything is entirely in Russian.
First of all you need to download latest version distribution VirtualBox .
After that, run the installer file. In the welcome window, click "Next"

After this, you will be prompted to select installation components and the path, I recommend leaving everything as is and clicking "Next"


The next window will ask you to install VirualBox shortcuts, you can leave everything as is and click "Next".


The next window warns that the network may turn off during installation; if you do not download anything during installation, you can click "Next", otherwise finish the download and then continue installing VirualBox.


In the next window click "Install"


During installation, windows will appear about installing the USB controller, network services and network adapters, click "Install".


After installation is complete, click "Finish"


After installing VirtualBox, we will begin creating a virtual machine, but first we will change the interface language, unless of course it suits you. To do this, in the VirtualBox panel, click “File-Preferences...”


In the Settings window select "Language" and in the right column select the necessary panel language settings, in this case Russian, press "OK".

Now let's start installing the virtual machine. Click on the top of the panel "Create"


In the window Create a virtual machine enter the name that will be displayed in VirtualBox, select the type and version of the operating system to be installed.


Then we indicate the amount of allocated RAM for this virtual machine; in the future, this value can be easily changed.


Since we are creating a new virtual machine, in the next window we select “Create a new virtual hard disk”.


Then we indicate the type of file that will serve as the hard drive for the new virtual machine, I recommend leaving VDI.


After that, choose a storage format, I recommend leaving Dynamic virtual hard disk.


Specify the size hard drive, the smallest size is indicated by default; if this is not enough for you, use the slider to determine how much space is needed.


We launch the created machine, to do this, select it and click on the top of the VirtualBox panel “Run”.


When you start, a window will appear in which you need to select the drive of your drive in which it is installed installation disk, or specify the ISO image of the operating system and click "Continue" after which the familiar installation of the operating system on the virtual machine will begin.


If after installing the operating system you need to change the parameters of the virtual machine, you must select it in the VirtualBox console and click "Settings".


On the menu System you can change the amount of RAM allocated to the virtual machine and determine the boot order when turned on.

In masonry CPU specify the number of processors allocated to the virtual machine, as well as the processor load limit.


In the network menu you can define the number of network adapters and the connection type.
In mode "NAT", the guest network interface is assigned by default an IPv4 address from the range 10.0.x.0/24, where x denotes a specific NAT interface address, determined by the formula +2. Thus, x will be equal to 2 if there is only one active NAT interface. In this case, the guest operating system receives an IP address of 10.0.2.15, the network gateway is assigned an address of 10.0.2.2, and the name server (DNS) is assigned an address of 10.0.2.3.

In connection type "Network bridge" the virtual machine works the same as all other computers on the network. In this case, the adapter acts as a bridge between the virtual and physical networks. On the external network side, it is possible to directly connect to the guest operating system.

When connecting type "Virtual Host Adapter" guest operating systems can interact with each other, as well as with the computer on which the virtual machine is installed. In this mode, the host adapter uses its own dedicated device called vboxnet0. They are also created a subnet and assigned IP addresses network cards guest operating systems. Guest operating systems cannot interact with devices located on the external network, since they are not connected to it through a physical interface. The Virtual Host Adapter mode provides a limited set of services useful for creating private networks under VirtualBox for its guest operating systems.


On the menu Shared folders you can mount a folder for easier file sharing with virtual machines. To do this, click on the button Add a shared folder(on the right is a folder with a plus sign) and specify the path and name of the shared folder.


I hope this article helped you in installing and configuring VirtualBox.

Installing software on a computer, especially little-known software, is always associated with a certain risk. The program may contain errors that affect the stability of the system, built-in advertising or tracking modules, and other unwanted elements. In addition, any software leaves traces on the system that may not have the best effect on its operation. As for experiments with Windows, everything is even more risky here, because sometimes even a seemingly insignificant change in registry data or modification system files can lead to the most unpleasant consequences.

Ask how to avoid them? Very simple, use virtualization systems, for example, the VirtualBox virtual machine - special program, which allows you to install, run and test different operating systems in an isolated environment. You can do anything with such virtual computers - install programs on them, configure them, modify system files, work with disks and partitions, in a word, perform any experiments. If the virtual OS is damaged, you can restore it from a snapshot or delete it altogether - to the host OS, that is, the main one working system, it won't have any effect.

Installing VirtualBox for Windows

Perhaps all this may seem complicated to some, but in fact there is nothing in working with Virtualbox that a novice user cannot handle. So how to use VirtualBox? As usual, it all starts with installation. We go to the developer’s website www.oracle.com/virtualization/virtualbox/index.html and download the latest version of the program.

Installing VirtualBox on Windows 7/10 is almost no different from installing most other programs; you just need to follow the instructions of the wizard and do not change anything in its parameters. Upon completion of the procedure, you will receive a ready-made virtualization platform.

Creating and basic configuration of a virtual machine

Like installing VirtualBox, creating and configuring virtual computer is not particularly difficult; the program automatically selects the best configuration depending on the operating system being installed. User control, however, will not hurt.

Let's create a virtual machine for Windows 10 32-bit as an example. Launch VirtualBox and click the “Create” button on the toolbar. In the window that opens, give the machine a name (can be arbitrary); in the drop-down lists, select the operating system and its version.

At the next stage, you will be asked to specify the amount of RAM allocated to the virtual machine. There are no strict rules regarding the allocated RAM; for 32-bit Windows it is advisable to reserve at least 1 GB of memory, for 64-bit Windows - at least 1.8-2 GB.

At the third stage, a virtual hard disk is created, here we leave everything by default. Click “Create”, select the disk type VDI or VHD.

As for the storage format, it is better to select “Dynamic”, this way you will save time and space on the physical disk, although losing a little in performance.

We set the size of the virtual disk as desired, but not less than specified in the operating system requirements. Click “Create”.

The virtual machine has been created and now you can quickly go through its settings. First of all, however, go to the settings of the VirtualBox program itself and on the “General” tab change the path to the virtual machine storage directory. It is best to allocate a folder for them on drive D, where there is the most space.

Now go to the settings of the created VM and check the following parameters:

  • In the “General” section on the “Advanced” tab, change the path to the VM snapshot files if necessary (it is advisable to place them in the folder with the main VM container file). Here you can enable a shared clipboard for the host and virtual machines.
  • If you want to install the system in EFI/GPT mode, in the “System” section, be sure to check the “Enable EFI (special OS only)” checkbox.
  • To be able to run 3D applications on a virtual machine, in the “Display” section, check the “Enable 3D acceleration” checkbox.

Setting up the Internet and shared folders

If you plan to provide access to the VM to other users of the local physical network, you should select the “Network Bridge” connection type in the VirtualBox network settings. To ensure interaction between different virtual machines, the “Virtual Host Adapter” mode is used; to connect guest operating systems to a single internal network, the “Virtual Host Adapter” mode is used. Internal network" There is also a connection type " Universal driver", but it is used much less frequently.

Of particular interest are shared folders in VirtualBox, thanks to which the user can exchange between the host and virtual machines any files. You can connect such a directory in the “Shared Folders” section. To do this, click on the plus sign opposite the “Machine Folders” item, select a folder on your hard drive through the overview and connect it, not forgetting to check the “Auto-connect” checkbox.

Starting a VM and installing the operating system

Now you know how to configure VirtualBox and the created VM. Next, let's see how to install the operating system on it. The procedure for installing an OS on Virtualbox is practically no different from installing it on a physical computer, except that instead bootable flash drive or DVD, the installation installation is used here ISO image. Launch the created virtual machine and specify the path to bootable ISO image with the system.

The standard installation procedure will begin and you will be prompted to accept license agreement, partition the disk, and after copying the system files, create account user.

The guest operating system is installed, but some functions, in particular, shared folders and the clipboard, will not work until you install a special plugin - guest OS additions. In addition, without these add-ons you will not be able to adjust the screen resolution, connect flash drives to the virtual machine, etc. Fortunately, you don’t need to download anything; guest OS add-ons are included with VirtualBox. All you need to do is select the option in the virtual operating system menu Devices – Mount the Guest Additions disk image.

Go to the “This PC” section in the virtual OS, open the disk drive VirtualBox Guest Additions and, if the system does not offer to do this itself, run executable file VBoxWindowsAdditions.exe.

Install addons as regular program, accepting the security agreement, and reboot the virtual computer.

The guest system is ready for use, all that remains is to check the network operation. We will not dwell in detail on how to set up the Internet in VirtualBox. If you selected NAT, the VM will connect to the Internet automatically. With other types of connections, you will most likely have to tinker a little. Remember the main thing, if the IP address for your main computer is issued automatically by the router, the same settings must be set in the parameters network adapter virtual system. If settings are assigned manually, then they must also be assigned manually in the guest system network adapter settings.

Main problems when working with VirtualBox

VirtualBox is a stable and high-quality software product, and if users have to encounter problems during its operation, the causes of the latter are most often the errors of the users themselves. Thus, those who try to launch virtual machines on VirtualBox with Hyper-V active will encounter the error “Failed to open a session for the virtual machine” (code E_FAIL 0x80004005). The reason is the incompatibility of these virtualization platforms. If you are planning to use VirtualBox, please disable Hyper-V and vice versa.

However, the disabled virtualization function in the BIOS can lead to the same error. This will be indicated by the unavailability of hardware virtualization options in the virtual machine settings (VT-x/AMD-V and Nested Paging in the section System - Acceleration). By the way, these options must be enabled even with active virtualization in the BIOS, otherwise the VM will also not start.

A VM crashing into BSOD upon startup is a common problem caused by a lack of physical computer resources allocated to the guest operating system. When creating a virtual machine in VirtualBox, you need to ensure that the allocated resources meet the requirements of the operating system.

The Blue Screen of Death can also be caused by Hyper-V enabled on the host system and a controller type mismatch. If earlier virtual disk was connected to SATA, and then you connected it to IDE, the guest OS will fail with a critical error and fall into BSOD. The issue is resolved by creating a new compatible controller and connecting a container file with the guest system to it.

Accidental deletion of snapshot files by the user may result in the inability to start the VM. You need to delete snapshots correctly - through the “Snapshots” section, otherwise you will have to completely reinstall the guest system. If VirtualBox itself does not start or when you start it you get the error “Cannot access the kernel driver!”, most likely you will have to uninstall the program and then reinstall it.