How to set up smartphones and PCs. Informational portal
  • home
  • Errors
  • Launching a windows server of a linux virtual machine. Varieties of virtual machines

Launching a windows server of a linux virtual machine. Varieties of virtual machines

Sometimes you need to use Linux as a second OS, but you cannot completely remove the old operating system, constantly rebooting the computer to change the OS is long and inconvenient. What to do then? The solution has been invented for a long time, and this is a virtual machine.

An application from Oracle VirtualBox is a virtual machine for running different operating systems in a separate window. It can be Windows, any Linux distribution, Android, OS X, or Chrome OS. Today we are going to install Linux. Easy and casual.

We have already published articles on the VirtualBox virtual machine several times. Here are the latest:

What do you need?

To work, you need, firstly, VirtualBox itself, and secondly, an ISO Linux image. What is the first, what is the second - absolutely free. So you can safely download from the official sites. Download VirtualBox from this link. You can choose any Linux distribution, each has its own site where you can quickly find an ISO image.

You can easily install a virtual machine yourself, there is nothing complicated there. But how to install Linux on VirtualBox, we will consider in detail.

Installation of a virtual OS consists of three main stages: creation, configuration and launch.

Creating a virtual machine

In this step, we will create a virtual device for Linux. The specs of our machine should be sufficient for the OS, but not too generous - we need to leave something for Windows as well.

Open VirtualBox. At the top left, click Create.

A window will appear where you need to enter the name of the device (any), select the OS below, and even lower the OS version. It is more convenient to give a name that corresponds to the type of OS. For example, “Linux Fedora”. In this case, VirtualBox will pick up the next two items by itself.

Although you can set them manually. We will be installing the Linux Fedora distribution. Therefore, in the second paragraph, select "Linux", in the third - "Fedora".

VirtaulBox has prepared settings for all operating systems known to it. Linux Fedora is one of them. Therefore, in the next windows ("Select the amount of memory", "Specify the hard disk", "Specify the type", Specify the storage format "," Specify the name and size of the file ") just click" Next ".

Setting up a virtual machine

At the configuration stage, we insert the disk into a virtual disk drive with Linux Fedora so that our machine knows where to install the OS. Only in our case, everything is virtual, even a disk. The ISO image we downloaded is the virtual DVD.

Go to "Settings". There on the right, select "Media", then click on an empty IDE controller, then - next to the drive on the window in the form of a disk. There we need the item "Select an optical disk image".

In the search box, look for an ISO file. We find and choose.

We see that now the IDE controller (DVD) is not empty, it contains a "disk" with Linux Fedora.

Running

In the startup phase, we will finally move on to installing Linux on VirtualBox. The Fedora installation window will appear, where there are 3 options: Fedora Live - go to the OS without installing (but then you always need a disk); Troubleshooting - problem solving; and installation. To start it, you need to press Tab. Which is what we are doing.

Fedora asks for some reason again - to run from disk or install. Install, so select "Install to Hard Drive".

Further language and basic settings - keyboard, date, installation location. Conveniently with Fedora, the installation location is automatically set. No need to manually configure partitions like in Ubuntu. If you're trying Fedora for the first time, this is just right. In a word, we press "Start installation".

The installation has started. Progress is visible at the bottom. Above are the items that need to be completed in the meantime.

In Linux, it is mandatory to set the Root password. Create it to complete the installation.

Everything, Linux is on your hard drive. Now you can remove the “DVD” (ISO file). To do this, "Settings", "Media", "Drive", "Remove the disc from the drive".

Run Linux Fedora without a disk. Just click "Run". If you have not created a user before, you will have to create one.

Two useful points:

  1. When you log off, it is advisable to shutdown Linux culturally - through Shut Down. Sometimes, if it bothers you, you can just turn off the virtual machine - this is not fatal.
  2. There are two modes of operation of the mouse: non-integrated and integrated. You can set them in the "Machine" menu. To return the mouse from integrated mode use "Ctrl".

A virtual machine is a very convenient way to test new versions of operating systems without disrupting the main system. I have been using it myself for a long time. Since my main operating system is OS X, I chose Parallels Desktop for myself.

But the essence of the virtual machine does not change from this - it is a simple, convenient and understandable (often at an intuitive level) means to see something new. Be sure to try, as you can see, there is nothing difficult about it.

The article will discuss what a virtual machine for Linux is, how it differs from others, for example, for Windows, how a new machine is created, where it is used, and, most importantly, how to install any Linux distribution on her. It is recommended to read the article to the end, as it reveals the essence of programs for running Linux on other operating systems.

What is a virtual machine

In fact, a virtual machine for Linux is no different from the one for Windows. In simple words, it is a computer emulator, and what operating system you will install on this virtual computer is up to you.

If you go deeper, a virtual machine is a special program designed to run an operating system within an already installed operating system. That is, you can easily install from the installation image of the same Linux, without even turning off the computer and without creating a bootable USB flash drive.

This program, as it were, creates a computer inside a computer. The virtual device uses the resources of, as you might guess, the real one, so you need to have a lot of resources so that the performance is enough for two operating systems at once.

How a virtual machine is created and interacted with

We figured out what a virtual machine for Linux is, now let's move away from the definition and talk about how virtualization happens.

First, there are several programs of this type on the network. It makes no sense to list them all, but let's say that the most popular are VirtualBox and VMware. After you have made your choice, the program must be installed. This is done in the standard way - using the installation file.

Having a virtual machine installed on the computer, you can proceed directly to launching it and virtualizing the working machine. But an operating system must be installed on the machine, so download its image from the Web in advance. Looking ahead, let's say that the article will provide instructions on how to install the OS, and Kali Linux will be taken apart as an example.

In general, that's all. With the installed program and operating system image, you can proceed to installing it. This is done in each program in different ways, but how exactly, we will consider a little later.

Scope of application

Now let's talk about why virtual machines are needed at all, because a common user will say that it is easier to write a bootable USB flash drive with the required distribution kit and install the OS directly on a computer through it. And the more knowledgeable will add that this can be done in a non-standard way, for example, next to an already installed Windows, or, without installing at all, start from the LiveCD. But not everything is so simple.

The most obvious and common reasons for using virtual machines are:

  • Checking for unknown operating systems. This is the most obvious reason, because when you find a distribution, you want to first look at it before installing to understand whether it is suitable or not. The virtual machine will help in this one hundred percent.
  • Testing software from questionable sources. If you value security and do not want to run anything on your main operating system, then it is better to check the questionable program on a virtual machine.
  • Surfing the Internet without the risk of catching a virus. Some people use virtual machines to keep them safe on the World Wide Web.

And these are only three reasons, although there are an order of magnitude more of them. But it won't take long to focus on this and let's move on to the varieties of these programs.

Varieties of virtual machines

As noted earlier, there are quite a few virtual machines on the market. So far, two have been named - VirtualBox and VMware. Without a doubt, they are the most popular and often used, but less noticeable, but no less good programs, for example, Qemu or Parallels Desktop, cannot be ignored. They are, no doubt, good to use, but will not be covered in the article for some reason.

So, Qemu is capable of running any version of operating systems, but it is difficult to use. Despite the fact that it contains an order of magnitude more all kinds of tools, it will be convenient to work with them only for professionals. The main drawback of Parallels Desktop is generally trivial - it only runs on MacOS. Yes, you can run both Linux and Windows on it, but only if you are a happy owner of an Apple product.

Preparations before installing Linux on a virtual machine

Now let's get to the fun part. As promised, now we will talk about installing Kali Linux on a virtual machine. However, before that, let's talk about the preparatory measures, without which nothing will work.

As already mentioned, you do not need to write any bootable flash drives, which is undoubtedly a plus. However, the operating system image must be loaded. Since we are talking about Kali Linux, download the ISO file from the official website of the developers. You also need to install the virtual machine itself. Below we will consider Virtual Box and VMware, so we recommend using one of them so that there are no problems with running the downloaded operating system in a virtual machine.

In general, this is all that needs to be done before installing Kali Linux on a virtual machine. Well, then we will go directly to the very process of setting up machines for the correct launch of operating systems on them.

How to install Linux on a virtual machine

So, you have downloaded the Linux distribution image, completed the installation of the virtual machine, so you can immediately start installing the OS on it. First of all, we will analyze the VirtualBox program, since it is more popular, but after it, we will talk about VMware.

Program # 1: VirtualBox

Installing Linux on a VirtualBox virtual machine is as follows:

  1. Run the program itself.
  2. In the window that appears, click on the "Create" button located on the top panel. Also for this you can click on the "New" button in the "File" menu.
  3. A new window will open. In it you need to enter the name of the future operating system (enter any name you like), select the type of operating system, since we are talking about Kali Linux, then select Linux, and as a result, the version of the selected distribution. Kali will not be among all the others, so choose Linux 2.6 / 3.x / 4.x (64-bit).
  4. At the next stage, you will be asked to set the amount of RAM that you are ready to give under the control of the virtual machine. It is recommended to select a value within the green line, otherwise there may be problems with virtualization.
  5. Now you need to select the virtual hard disk. You are given three options to choose from: do not connect a hard drive, create a new virtual one, or use a previously created one. If you are installing Kali Linux for the first time, then choose the second option, if it already exists and you want this one to contain the files from the previous one, then the third.
  6. Now you need to select the type of hard drive. Without going around the bush, let's say that VDI is the best choice.
  7. When choosing a format for storing data on a disk, it is recommended to specify "Dynamic" so that its volume increases as it is full, and does not immediately appear from the main system.
  8. Now specify the maximum amount to be allocated for the virtual OS.

That's all, the car is created. You just need to launch it, specify the image of the Kali Linux distribution and perform a standard installation.

Program # 2: VMware

Now let's show you how to install Linux on VMware. Here is a detailed instruction:

  1. Having opened the program, click on the "Create a new virtual machine" button.
  2. When choosing the type of machine configurations, select "Normal".
  3. Since the installation will take place from an image, select the "Image file" item and specify the image itself by clicking the "Browse" button.
  4. At the stage of choosing an operating system, select Linux and select the Debian 7 version, these are the parameters that are suitable for installing Kali Linux.
  5. Now you need to specify the name of the machine and the folder for storing all its data.
  6. Specify the amount of disk memory for the OS. It is recommended to leave everything as default and click "Next".
  7. Click Finish.

This completes the creation of the car. Click the Power On Virtual Machine button to launch the installation image. By the way, in the same way, you can install the Astra Linux distribution on a virtual machine.

Conclusion

We found out what it is - a virtual machine for Linux, and why use it. As a result, you even learned how to create your own machine to run Kali Linux, but as mentioned earlier, the instructions for this distribution can be applied to almost everyone else.

Linux OS interesting to many users, but few decide to change Windows to it. However, if you delve into the essence of this platform, you will see that Windows is not the only possible option (especially given its high cost). First, you need to understand how Linux is installed on a virtual machine.

What is needed to achieve this goal?

1. The processor must support hardware rendering
2. Installed VM VirtualBox application from Oracle (hereinafter - VB)
3. Downloaded Linux operating system ISO

Once you've set up a virtual machine (which is a pretty quick process), you can go straight to the Linux operating system itself.

Today, you can find many variations of Linux developed on top of its kernel. We will now look at the most common one - Ubuntu OS.

1. Launch VB and click "Create".

We indicate the name of the VM - Ubuntu and also OS type - Linux... You must also specify the version of the platform; it depends on whether the bitness of the loaded OS is 32x or 64x.

2. We set the amount of RAM that should be allocated for the operation of the VM. In this case, the operating system will function normally at 1024 MB.

3. We create a new hard drive. We select the type of file that is used when creating a new disk image. It is best to leave active the item VDI.



If we want the disk to be dynamic, then we mark the corresponding parameter. This will allow the disk space to grow as the VM fills up with files.

We created a VM, but it is not active now. To enable it, you must launch it by clicking on the button corresponding to the name. Or you can double-click on the VM itself.

Installing Linux

Installing Ubuntu is as simple as possible and does not require any special skills. After starting the VM, the installer window will appear. It should indicate the location of the downloaded Ubuntu image.

With this image selected, we'll move on to the next step. In the new window, select the interface language - Russian, so that the installation process is fully understandable.

You can get an idea of ​​the operating system in the first case, but a full installation will allow you to better immerse yourself in its environment. Let's choose "Install".

After that, the installation preparation window will appear. Let's check if the PC parameters are consistent with the requirements of the developers. If so, let's move on to the next step.

When installing, we will select the item that offers erasing the disk and installing Ubuntu.

During the installation process, you can set the time zone and specify the keyboard layout.

The installation procedure will take approximately 20 minutes.

After its completion, the PC will automatically restart, after which the desktop of the installed Ubuntu will start.

Installation Linux Ubuntu completed, you can start getting to know the system.

VirtualBox (Oracle VM VirtualBox) is a free virtualization software for Microsoft Windows, Linux, FreeBSD, Mac OS X, Solaris / OpenSolaris, ReactOS, DOS and others. After the release of the first public version of VirtualBox in 2007, in a relatively short time, this software product has become one of the most popular virtualization packages due not only to being free, but also by its high reliability, ease of use, support for many national languages, and a good help system (at the time of writing articles - only in English) and cross-platform.

& nbsp & nbsp To put it simply, VirtualBox is a set of applications, system services and drivers that emulate new computer hardware in the operating system environment where VirtualBox is running. On a virtual computer (virtual machine, in abbreviated form - VM), created in its environment, you can install almost any operating system (guest OS) and use it in parallel with the main one. So, for example, on a real Windows computer, you can install a virtual machine (VM - Virtual Machine) with an operating system of the Linux family and use both operating systems at the same time. In addition, you can configure the interaction between these systems over the local network, data exchange through removable media, shared folders, etc. Also, the current state of the virtual machine (and the state of the operating system installed on it) can be recorded, and, if necessary, in any point in time - perform a full rollback to this state.

This article provides an example of how to install and configure VirtualBox on Windows 7 and install Linux Mageia on a new virtual machine.

Installing Oracle VM Virtualbox on Windows 7

& nbsp & nbsp The latest version of VirtualBox for a specific operating system can be downloaded from the project download page.

The VirtualBox installer for Windows operating systems is an executable file that must be run under Windows 7 as administrator. The standard software installation starts:

During the further installation of VirtualBox, a warning will be displayed:

This means that when installing VirtualBox network drivers, current network connections will be dropped and a temporary disconnection from the network will occur. If, for example, in parallel with the installation, data exchange with a network drive is carried out, then it will fail. If the network is not working, then a short-term disconnection of the adapters will not have any consequences, and you need to allow the installation to continue by pressing the button Yes... Otherwise, you need to finish working with network resources first. Also, the Windows security system may ask for confirmation for permission to install new software:

You need to check the box "Always trust Oracle Corporation software" and click Install.

After the installation is complete, the main program module of VirtualBox will be launched:

Installing Linux on an Oracle VM Virtualbox

& nbsp & nbsp The installation process for Linux or any other OS consists of two parts:

Creation of a virtual machine for the guest operating system selected for installation.

Determining the source with the installation distribution and starting the installation process.

The process of installing a new OS on a virtual machine is practically no different from installing on a real one - the VM is booted from the installation disk and then the installer's instructions are followed. The boot source is determined by the settings of the virtual machine (By default, the boot order is as follows - floppy disk, CD-ROM, hard disk, Network).

When VirtualBox is launched for the first time, the main program window is displayed with a greeting and an active "Create" button to create a new VM:

In general, for a general acquaintance with the guest operating system, which will be Linux Mageia, no required settings are required. You can immediately start creating a virtual machine - press the button Create... After that, the process of creating a new virtual machine will be launched and you will need to determine its main parameters:

The name of the virtual machine. A directory with virtual machine files will be created in accordance with it. By default, this is a subdirectory in "C: \ Users \ User \ VirtualBox VMs \" .

The type of operating system that will be installed on the virtual machine. In this case - Linux

OS version. In this case, Mageia is a fork (s) of Linux Mandriva. We choose - Mandriva.

The rest of the requested parameters can be left by default, since they have already been selected based on the hardware configuration of the real machine and in accordance with the type and version of the operating system installed on the virtual machine. But if necessary, you can, for example, increase the amount of RAM allocated to the VM, the size and type of disk.

Here is an example of allocating 1024 MB of RAM to a virtual machine, instead of the recommended 512 MB. When allocating memory, you need to take into account its real amount and the minimum requirements of the guest OS. If you have difficulty in choosing this item, use the values ​​recommended by the program. Inappropriate memory allocation between real and virtual machines can degrade the performance of both.

The virtual machine hard disk (virtual hard disk) can be created either dynamic or fixed. A dynamic disk is created not for the entire specified volume, but for its part, and increases as necessary during its installation or operation, which saves space on a real hard disk. From the point of view of maximum performance of the guest operating system, it is better to choose a fixed VHD.

Physically, a virtual hard disk is a file on a real file system. This file can be presented in several formats:

Most of the parameters defined during the creation of a new virtual machine can be changed after its creation is complete:

The button has become active on the toolbar Tune... Fine-tuning a virtual machine is a separate topic, and at the stage of getting to know the guest operating system, there is no particular need for them. Therefore, you can immediately start starting the VM - press the button Run... At startup, you will see a message about the use Auto-capture keyboard

When switching to a virtual machine window, keyboard input will be performed for it, and not for real applications. By default, the right Ctrl is used to switch keyboard input between real and virtual machine windows.

Since the guest has not yet been installed, it will need to boot from the installation disc. You can use a regular CD / DVD drive with bootable installation media prepared in advance, or an image of this disc. VirtualBox allows you to connect an image file to a virtual machine as a virtual media drive. In most cases, the contents of the installation discs are downloaded as image files in the ISO-9660 format (files with the iso). VirtualBox allows you to do without burning the image to a CD, and connect such a file directly to the virtual machine as a virtual drive with installed media based on the contents of the iso image.

Image file Mageia-2-i586-DVD.iso will be connected as a virtual drive with the Mageia-2 installation disc. By pressing the button Continue will boot from the virtual drive and display the Mageia bootloader menu

To proceed with the installation, select Install Mageia 2... During the installation process, you can select the language to use, you need to confirm your agreement with the license agreement, select the language for the installed system (usually - Europe - Russian) and keyboard layout. The disk is then partitioned, partitions are formatted, additional installation sources are identified, and the user is prompted to select a graphical desktop environment.

The choice of a graphical environment is determined, as a rule, by personal preferences and the purpose of the installed system. The default is environment KDE(short for K Desktop Environment). The most common graphical shells in Linux are Gnome and KDE... Outwardly, they are in many ways similar, but it is believed that KDE is more promising and convenient, as well as more complex in settings, and more demanding on hardware, a graphical environment. You can get started with Linux in the KDE environment. Later, after installing the system, you can change the environment or even refuse to launch the graphical shell, for example, by changing the system startup level.

Once the graphical environment has been identified, the installation of Mageia will begin. The installation progress is accompanied by comments and highlighting of the name of the current stage on the left side of the screen. It should be noted that Linux Mageia, as a fork of Linux Mandriva, is very similar to its predecessor, is well Russified and is one of the most understandable Linux distributions, so the installation of the system, as a rule, does not cause any difficulties even at the first acquaintance with it.

During the installation process, you will need to set a password for the system administrator (user root), at least one regular username and password, and display parameters. As a result, upon completion of the installation, a summary of the installed major components and hardware is displayed.

All configurable parameters can be changed after the installation is complete. If you want and have internet access, you can also download and install Mageia updates.

After completing the Linux installation, it is advisable to perform some actions, which in the future can greatly simplify the development of the new OS. An extremely useful feature of VirtualBox is the ability to save the current state of the virtual machine (the ability to take VM snapshots) and return it to the state at the time of the snapshot. However, this feature is not a feature of VirtualBox, and almost all virtualization systems assume the ability to create snapshots of the system and restore a virtual machine from a snapshot. There can be many snapshots and restoration of the state of a virtual machine can be performed using any of them. For those cases when the system is rendered inoperative (due to incorrect configuration settings, for example), the presence of snapshots allows, literally with one click of the mouse, to bring the virtual machine back to life. For the novice Linux user, being able to rollback a virtual machine in this way can save a significant amount of time and frustration. It is advisable to take a snapshot of the newly installed "clean" system before changing Linux settings. A snapshot is taken through the Virtualbox menu "Machine" - "Take Snapshot" or "Host + T" (right CTRL + T). To manage the snapshots of the selected machine, use the Snapshots button displayed in the upper right corner of the screen.

Installed with default settings, the system is usually ready for use by most home users. Overall, the KDE graphical environment is intuitive and in many ways similar to the desktop of the Windows family of operating systems. Some differences, however, are significant. In Linux, you can use 4 virtual desktops at the same time and the so-called "rooms" - a means of grouping similar applications. The user has the ability to create a separate working environment for each desktop, and switch between them as needed by clicking on the icon in the taskbar. As for the rooms, at the moment this tool is at the stage of improvements and, in addition, for a novice Linux user, it is not of practical interest.

In the lower left corner is the Mageia-branded application launch button, which has the same function as the Windows Start button. The menu called up when you press the button consists of three parts:

To change system settings, parameters common to all users, install and uninstall applications, use Mageia Control Center... When you start it, you will need administrative privileges - entering the user's password root :

& nbsp & nbsp A virtual machine can be integrated into an existing local network, providing access to its resources in the same way as to the resources of a real machine. However, some settings in this case need to be changed. And it's not so much about changing the security settings of the installed operating system, but about providing the ability to network access to its network resources. The simplest and most effective way to solve this problem is to change the network settings so that the virtual machine has an IP address from the range of the real local network, and in the settings of the VirtualBox connection type for the virtual network adapter, instead of the address translation (NAT) mode, the network bridge mode would be used :

In this mode, all network frames created in the virtual environment will be broadcast directly to the real adapter. All that remains is to assign an IP address to the virtual adapter from the range of the local network, either automatically, if there is a DHCP server, or manually. This can be done using the Mageia Control Center, under Network and Internet - Network Center... Select a network adapter and click the "Configure" button:

Other network services can, if necessary, be installed using the Mageia Control Center - section "Program Management" and allow network access to them through the settings in the section "Security" - "Configure Personal Firewall"

Oracle VM VirtualBox is a set of application programs, system services and drivers that emulate new computer hardware in the operating system environment where VirtualBox is installed. On a virtual computer (virtual machine), you can install almost any operating system (guest OS) and use it in parallel with the main one. So, for example, on a real Windows computer, you can install a virtual machine (VM - Virtual Machine) with an operating system of the Linux family and use both operating systems at the same time. In addition, you can configure the interaction between these systems over the local network, data exchange through removable media, shared folders, etc. Also, the current state of the virtual machine (and the state of the operating system installed on it) can be recorded, and, if necessary, in any point in time - perform a full rollback to this state. In other words, a virtual machine is a very convenient tool for learning new operating systems, debugging software, conducting experiments without disrupting the operation of the main OS, researching viruses, diagnostics and recovery tools, and simply for running several operating systems in parallel on one computer.

Installing Oracle VM Virtualbox

The current version of Oracle VM VirtualBox can be downloaded from the project download page, which contains links to download installation packages for Windows x86 / x64, Linux, Solaris and OS X.

Installation in a Windows environment must be performed under a user account with administrator rights.

During the further installation of VirtualBox, a warning will be displayed:

This means that when installing VirtualBox network drivers, current network connections will be dropped and a temporary disconnection from the network will occur. If, for example, in parallel with the installation, data exchange with a network drive is carried out, then it will fail. If the network is not working, then a short-term disconnection of the adapters will not have any consequences, and you need to allow the installation to continue by pressing the button Yes... Otherwise, you need to finish working with network resources first.

After the installation is complete, the main program module of the VirtualBox user will be launched - Oracle VM VirtualBox Manager (Oracle VM VirtualBox manager):

Installing Linux Ubuntu on Oracle VM VirtualBox

All actions to create virtual machines, change their settings, import and export configurations, etc. can be performed using the Oracle VM VirtualBox Manager (in Russian software - Oracle VM VirtualBox Manager) or using the command line utility VboxManage.exe... The latter has slightly more possibilities for configuring virtual machines, but it is more difficult to use.

Installing a guest OS on a virtual machine can be roughly divided into 2 stages:

Creation of the required virtual machine using VirtualBox;

The boot source (Linux distribution media) is determined by the settings of the virtual machine. It can be a real or virtual CD / DVD drive, floppy disk, HDD, boot disk image or local network. By default, the boot order is as follows - Floppy, CD-ROM, Hard Drive, Network. This order can be changed in the settings of the virtual machine.

When VirtualBox is launched for the first time, the main program window is displayed with a welcome screen and an activated button. Create to create a new VM:

When creating a new virtual machine, the following parameters are defined:

The name of the virtual machine. A directory with virtual machine files will be created in accordance with it. By default, this is a subdirectory in C: \ Documents and Settings \ Username \ VirtualBox VMs \ in Windows XP and C: \ Users \ User \ VirtualBox VMs \ for Windows 7 and older.

The type of operating system that will be installed on the virtual machine. In this case - Linux

OS version. In this case, Ubuntu.

Other parameters can be left by default, since they are already selected based on the hardware configuration of the real machine and in accordance with the type and version of the operating system installed on the virtual machine. If necessary, the parameters can be determined based on your own preferences, for example, to increase the amount of RAM allocated to the virtual machine.

Here is an example of allocating 1024 MB of RAM to a virtual machine, instead of the recommended 512 MB. When allocating memory, you need to take into account its real amount and the minimum requirements of the guest OS. If you have difficulty in choosing this item, use the values ​​recommended by the program. Inappropriate memory allocation between real and virtual machines can degrade the performance of both.

A virtual machine hard disk (virtual hard disk) is a special format file in the Windows file system. A virtual disk can be created either dynamic or fixed. A dynamic disk is created not for the entire volume specified by the setting, but for its part, and increases as needed during the operation of the virtual machine. For maximum performance of the guest operating system, it is better to choose a fixed virtual hard disk, and to save disk space, choose a dynamic one.

VirtualBox allows you to use several different data formats for virtual disks:

Most of the parameters defined during the creation of a new virtual machine can be changed at any time, if necessary.

For the created virtual machine, the button becomes active Tune, which allows you to change some of its settings, add or remove virtual devices, change their modes of operation, manage the distribution of resources of the real operating system. To get acquainted with the Ubuntu Linux guest OS, the initial settings made during the creation of the virtual machine are sufficient. Therefore, you can immediately start starting the VM by pressing the button Run... After starting the VM, a usage message is displayed on the screen Auto-capture keyboard

This means that when the cursor is within the VM window, keyboard input will be performed for the virtual machine. By default, to switch keyboard input between real and virtual machine windows, use right Ctrl... The current input state is displayed in the status bar at the bottom of the virtual machine window.

The arrow in green means that keyboard input will be performed for the virtual machine, gray for the real one.

To install the operating system on a virtual machine, you will need to boot from the installation disk. In the VirtualBox environment, it is possible to boot not only from standard devices (CD / DVD drive, flash drive, network ...) but also using a virtual drive created on the basis of the boot disk image. Typically Linux distributions are distributed as ISO-9660 image files (files with the extension iso) and VirtualBox allows you to do without burning the image to a CD, but simply connect such a file directly to the virtual machine as a virtual drive with installed media based on the contents of the iso image. When you start the virtual machine for the first time, when there is no guest operating system installed yet, VirtualBox will prompt you to select a boot device

Instead of a physical drive, you can select an image file, for example ubuntu-13.04-desktop-i386.iso which will be connected as a virtual device with the Ubuntu 13.04 installation CD / DVD. By pressing the button Continue booting from the virtual drive and installing the guest operating system (Ubuntu)

The process of installing a guest OS is no different from installing on a real machine. You can select the language for the installed system (usually Russian), time zone, keyboard layout, etc. Most of the parameters can be left by default, including type of instalation

During installation, you need to set the computer name, user, password and login mode:

Further installation of Ubuntu is performed without any user intervention and ends with prompts to restart the computer. Compared to installing the system on real computer hardware, the installation on a virtual machine is slower, which is quite expected. The degree of performance degradation mainly depends on the performance of the real computer hardware.

When booting the newly installed operating system for the first time, the VirtualBox manager will automatically disconnect the virtual drive based on the disk image with the Ubuntu distribution, the boot will be performed from the virtual hard disk and upon completion, a login prompt will be displayed on the screen.

Changing Oracle VM VirtualBox Virtual Machine Settings

In some cases, such as when a virtual machine is included in a real local network as a peer with the ability to connect externally to its network services, you will need to change some of the default settings when the VM was created.

In the VirtualBox environment, it is possible to use 4 virtual network Ethernet adapters configured in the properties window of the virtual machine on the tab Net

By pressing the button Additionally reveals the values ​​of additional parameters of virtual network adapters, allowing you to select the type of adapter that will be used by the virtual machine driver, promiscuous mode when the virtual adapter will accept all Ethernet frames regardless of the receiver MAC address, the MAC address value that is assigned to the virtual network card.

For each network adapter, you can specify in which of the following modes they will function (field Connection type):

Not connected- In this mode, VirtualBox informs the guest OS that the network adapter is present in the hardware configuration, but it is not connected - as if the Ethernet cable were not connected to the card.

NAT (Network Address Translation)- the main connection mode, set by default when creating a virtual machine. Allows the most simple implementation of network access using client software (mail, Web, Skype, etc.)

Network bridge- the mode of the bridge between the virtual and real network adapter, when data exchange between them is carried out directly without any change in the guest OS environment. This mode allows you to access the network services of the guest OS in the same way as for normal real hosts on the local network. Using this mode, you can easily simulate a local network from real and (or) virtual machines.

Internal network- is used to create a virtual network accessible from a virtual machine, but inaccessible from a real application.

Virtual host adapter- is used to create a local network of virtual machines and a real machine where VirtualBox (host machines) operates. This mode does not use physical network adapter communication like loopback communication.

Universal driver(generic network interface) - Allows you to include a user-selectable driver in VirtualBox with additional extensions to merge virtual machines running on different hosts.

To connect a virtual machine to an existing local network with the ability to access its network services, use the mode Network bridge and configuring the virtual network adapter so that its IP address is in the range of addresses of the local network. For example, for the local network 192.168.0.0/255.255.255.0, you need to assign the virtual adapter (manually or automatically via DHCP) a free address from the range 192.168.0.1-192.168.0.254.

The first step, in the settings of the newly created virtual machine, in the section Net VirtualBox manager for network adapter needs to be changed Connection type NAT on the Network bridge... Then, using the guest OS tools (in this case, Ubuntu tools), set the new IP-address value. This can be accomplished using System parameters - Net- Select a connection and click the button Parameters

To change the IP address, you need to select the "Manual" mode

In the VirtualBox environment, just like on a real computer with the Linux operating system, you can use several virtual terminals, to switch between which use the keyboard shortcut CTRL - ALT + F1 ... F6(from the first terminal to the 6th). Thus, if necessary, you can simultaneously open several user sessions on different terminals and use them simultaneously. To switch to the graphical shell, use CTRL-ALT + F7... On different distributions, the key combinations for switching may differ. When changing or viewing system parameters that require the execution of commands on behalf of root, you can, for example, use the first terminal, logged into the context of a superuser account. The second terminal (as well as the graphical one) can be used under a regular user account.

To switch to account context root you need to execute the command su on behalf of the superuser.

sudo su- go to the console with rights root

su allows you to run a command as another user. If username is not specified, then it is assumed root... Work under an account root not recommended as doing it wrong can cause serious damage or even crash the system.

To view the current network settings in the console, use the command ifconfig... When it is executed without parameters, the current settings for all network interfaces are displayed:

Eth0 Link encap: Ethernet HWaddr A8: 00: 97: 6E: e9: 65 inet addr: 192.168.50.8 Bcast: 192.168.0.255 Mask: 255.255.255.0 inet6 addr: fe80 :: a00: 27ff: fe6b: e965 / 64 Scope: Link UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1 RX packets: 124 errors: 0 dropped: 0 overruns: 0 frame: 0 TX packets: 166 errors: 0 dropped: 0 overruns: 0 carrier: 0 collisions: 0 txqueuelen: 1000 RX bytes: 28340 (28.3 KB) TX bytes: 19383 (19.3 KB) lo Link encap: Loopback inet addr: 127.0.0.1 Mask: 255.0.0.0 inet6 addr: :: 1/128 Scope: Host UP LOOPBACK RUNNING MTU : 65536 Metric: 1 RX packets: 144 errors: 0 dropped: 0 overruns: 0 frame: 0 TX packets: 144 errors: 0 dropped: 0 overruns: 0 carrier: 0 collisions: 0 txqueuelen: 0 RX bytes: 12445 (12.4 KB ) TX bytes: 12445 (12.4 KB)

In this case, information about 2 network interfaces is displayed, eth0 and lo... First named eth0 is an Ethernet LAN interface and is created on a network card with a MAC address A8: 00: 97: 6E: e9: 65 and IP address 192.168.50.8. Second - lo is a loopback interface with an IP address of 127.0.0.1, commonly used to emulate data transmission within a given system.

If desired, a ready-made image of the VirtualBox virtual machine with the installed Linux Ubuntu OS can be downloaded from. Typically, the bootable image of the virtual machine reflects its state at the time the Ubuntu installation was completed using the default settings. The username and password to login to the system are listed on the download page.

The Sourceforge project also maintains a download page for images of VirtualBox virtual machines with installed operating systems Android, FreeBSD, OpenSolaris and several dozen flavors of Linux.

For maximum flexibility, starting with the version of VirtualBox 4.0, a mechanism for remote control of virtual machines has been implemented through the additional interface VirtualBox Remote Desktop Extension (VRDE). The basic VirtualBox package only implements support for this interface, and the support itself is implemented as an additional external module (plug-in) VirtualBox extension package, which can be downloaded and installed as an addition to the basic package. Installation of this module is performed by double clicking on the downloaded file with the extension vbox-extpack... Material taken from the site:

Top related articles