Installing Windows in VirtualBox Linux. VirtualBox and images for it

Many users want to try using Linux. However, the need to abandon the usual operating system leads to the fact that most quickly abandon this idea. But in order to try Linux, you don’t have to uninstall Windows; you can install Linux on a virtual machine and test your new system in a safe environment.

In this article we will talk about how to install Linux on a virtual machine. For example, we will use the Virtual Box virtual machine and Ubuntu, a popular Linux distribution.

To get started, you need an ISO file with a Linux distribution. To do this, go to the website and download the latest version of Ubuntu, at the time of writing this is Ubuntu 12.10.

We also need the Oracle Virtual Box program. It can also be downloaded absolutely free from the official website.

Launch the Virtual Box program and click on the “Create” button.

After this, a window will open with which we will create a new virtual machine. We indicate the name of the machine, the type of operating system and click “Next” to go to the next window.

In the next window, indicate the amount of RAM that will be available for your virtual machine. The selected amount should not exceed the amount of actual RAM in your computer. As a rule, 1024 megabytes is enough.

The next window prompts you to create a new hard drive for the virtual machine. Leave everything as default and move on.

In the next window you need to select Dynamic or Fixed disk. Here we also leave the standard value and click “Next”.

That's it, the process of creating a virtual machine is complete, you can start installing Linux.

In the Virtual Box window, select the created virtual machine and click on the “Start” button. After this, the “First Launch Wizard” will open, here you need to indicate where the ISO file with the Linux distribution is located. To do this, click on the button with the image of the folder and select the ISO file.

When the distribution is selected, the virtual machine will reboot and the Linux installation will begin. Wait a few seconds until the screen prompts you to install Ubuntu.

In the window that appears, select the Russian language and click on the “Install Ubuntu” button.

Since our task is simply to install Linux, we will take the path of least resistance and will not complicate our lives with fine tuning during installation. In the window that appears, click on the “Continue” button.

That's it, the installation has begun. While the installer copies the files, we can configure the time zone, keyboard layout and other settings.

In the account creation window, enter your name and password. You can also select “Log in automatically” here, in which case you will not have to enter a password when loading the operating system.

After this, you need to wait a little longer until the installation is completed.

After installation is complete, the virtual machine will reboot and the operating system will be ready to use.

VirtualBox (Oracle VM VirtualBox) is a free virtualization software tool for Microsoft Windows, Linux, FreeBSD, Mac OS X, Solaris/OpenSolaris, ReactOS, DOS and others operating systems. After the release of the first publicly available version of VirtualBox in 2007, in a relatively short time, this software product became one of the most popular virtualization packages due to not only being free, but also highly reliable, easy to use, support for many national languages, and a good help system (at the time of writing articles - only in English) and cross-platform.

    To put it simply, VirtualBox is a set of application programs, system services and drivers that emulate new computer hardware in the operating system environment where VirtualBox runs. On a virtual computer (virtual machine, abbreviated as 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) with a Linux operating system and use both operating systems simultaneously. In addition, you can configure interaction between these systems over a 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 discusses an example of installing and configuring VirtualBox in Windows 7 and installing Linux Mageia on a new virtual machine.

Installing Oracle VM Virtualbox on Windows 7

   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 in Windows 7 must be run as an administrator. The standard software installation will begin:

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

This means that when installing VirtualBox network drivers, current network connections will be reset and a temporary disconnection from the network will occur. If, for example, in parallel with the installation, data is being exchanged with a network drive, it will fail with an error. If you are not working on the network, then briefly disabling the adapters will have no effect, and you should allow the installation to continue by pressing a button Yes. Otherwise, you need to shut down the network resources first. Also, Windows security may request confirmation to allow the installation of new software:

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

After the installation is complete, the main VirtualBox software module will launch:

Installing Linux on an Oracle VM Virtualbox virtual machine

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

Creating 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 - you boot the VM from the installation disk and then follow the instructions of the installer. The boot source is determined by the virtual machine settings (By default, the boot order is as follows - floppy disk, CD-ROM, hard drive, Network).

When you launch VirtualBox for the first time, the main program window is displayed with a welcome message 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 mandatory settings are required. You can immediately start creating a virtual machine - click the button Create. After which the process of creating a new virtual machine will start and you will need to determine its main parameters:

Virtual machine name. In accordance with it, a directory with virtual machine files will be created. 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 of Linux Mandriva. We choose - Mandriva.

The remaining requested 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. 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 actual size and the minimum requirements of the guest OS. If you have difficulty selecting this item, use the values ​​recommended by the program. Improper memory allocation between the real and virtual machines can result in poor performance for both.

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

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

Most of the settings that are defined during the creation of a new virtual machine can be changed after its creation is completed:

The button on the toolbar has become active 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 launching the VM - click the button Launch. At startup, a message about use will be displayed. Automatic keyboard capture

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

Since the guest system is not yet installed, you will need to boot from the installation disk. You can use a regular CD/DVD drive with pre-prepared bootable installation media, or an image of this disk. VirtualBox allows you to connect an image file to a virtual machine as a virtual drive with media. In most cases, the contents of installation disks are downloaded as image files in ISO-9660 format (files with the extension 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 disk. When you press the button Continue The virtual drive will boot and the Mageia bootloader menu will be displayed

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

The choice of graphical environment is determined, as a rule, by personal preferences and the purpose of the installed system. The default environment is KDE(short for K Desktop Environment). The most common graphical shells in Linux are Gnome And KDE. Externally, they are similar in many ways, but it is believed that KDE is a more promising and convenient, as well as more complex to configure, and more demanding on hardware, graphical environment. You can start getting acquainted 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 run level.

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

During the installation process, you will need to set a password for the system administrator (user root), at least one regular user name and password, and display settings. Finally, once the installation is complete, a summary of the installed major components and hardware is displayed.

All customizable settings can be changed after installation is complete. If you wish and have Internet access, you can also download and install Mageia updates.

After completing the Linux installation, it is advisable to perform some steps that can greatly simplify the development of the new OS in the future. An extremely useful feature of VirtualBox is the ability to save the current state of the virtual machine (the ability to create VM snapshots) and return it to the state at the time the snapshot was taken. However, this feature is not a feature of VirtualBox, and almost all virtualization systems provide the ability to create snapshots of the system and restore the virtual machine from the snapshot. There can be many snapshots, and restoring 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 you to literally bring the virtual machine back to life with just one click. For a novice Linux user, the ability to rollback a virtual machine like this can save a significant amount of time and nerves. It is advisable to take a snapshot of the newly installed “clean” system before changing Linux settings. A picture is taken through the Virtualbox menu "Machine" - "Take a picture" or "Host + T" (right CTRL + T). To manage snapshots of the selected vehicle, use the “Pictures” button displayed in the upper right corner of the screen.

Installed with default settings, the system is usually ready to use for most home users. In general, 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 simultaneously use 4 virtual desktops and so-called “rooms” - a means of grouping similar applications. The user has the ability to create a separate work environment for each desktop, and switch between them as needed by clicking on the icon in the taskbar. As for rooms, at the moment this tool is at the stage of development and, moreover, for a novice Linux user, it is of no practical interest.

In the lower left corner there is an application launch button with the Mageia logo, the purpose of which is the same as the Start button on the Windows desktop. 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 running it, you will need administrative privileges - enter the user password root :

    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 need to be changed in this case. And this is not so much about changing the security settings of the installed operating system, but about providing 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 VirtualBox connection type settings for the virtual network adapter, instead of the address translation (NAT) mode, the network bridge mode is used :

In this mode, all network frames created in the virtual environment will be directly broadcast to the real adapter. All that remains is to assign an IP address from the local network range to the virtual adapter, 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 the network adapter and click the "Configure" button:

Other network services can, if necessary, be installed using the Mageia Control Center - section "Manage Programs" and allow network access to them through the settings in the section "Security" - "Setting up a personal firewall"

Good day, dear readers, admirers and all sorts of other personalities. Today we will talk about VirtualBox, as is clear from the title.

More precisely, I will tell you about virtualization and today together we will create, so to speak, a virtual computer inside a physical one, and install a virtual operating system into it, which will work inside an already existing one by simply switching a window.

This virtual system will be (in a virtual computer you can install Windows, but I think you can do this yourself, following the example of this article and the installation instructions that were once written), articles about which it would be high time to take root in this project.

Why is this necessary at all - all these virtual computers and virtual systems?

Let's figure it out.

Why might this be necessary?

Well, just for reference:

  • Firstly, at least just for reference, because I think many will be interested in knowing how the same one looks and operates Linux live. And considering that you don’t have to reinstall anything on the computer itself and that no harm can be done to the system during installation, this idea is completely safe and comparable to going to the zoo, which, as you understand, is convenient and great;
  • Secondly, the skill of using virtualization will be required, of which, by the way, there are quite a lot of people visiting this project. Virtualization is now used on servers everywhere and being able to master it will not be superfluous.
  • Thirdly, you can come up with quite a lot of different applications for a virtual computer and a virtual OS in it.

Everyone can come up with the rest for themselves.

Virtualization? How it can be applied

Let's see how:

  • You can store valuable data there (not everyone will realize that you have a “system within a system” at home, where all the most valuable things are stored);
  • Can be used as a testing ground: have you downloaded some strange, unfamiliar program? Scary? You never know, or something that, if used incorrectly, could harm the system? So why ruin your work computer - just install and run suspicious software in a virtual OS, and then you’ll see;
  • Install and try different distributions Windows, Linux and other systems, without really affecting anything on the computer and without leaving your favorite already installed system;
  • Use it as a shell for traveling across the Internet. You launched a virtual machine with Linux, opened your favorite browser there and you are not afraid of any viruses, unless you manually dragged them into the local system.

More theory and information

First, a few words about virtualization in general. What is it and what is it eaten with, and how does it work.

Everyone, I think, knows that a computer has certain capacities that are not always used to 100% of their capabilities and, in a sense, are idle, i.e. remain free (unused) until a task comes along where these resources can be used.

So, from these unused resources you can, so to speak, bite off a piece in order to imitate the so-called virtual computer (machine). We choose how much we want to use, how much processor power, how much and, voila, with the help of a virtualizer (special program) we get, so to speak, a computer within a computer with the configuration we set.

The resulting virtual computer turns on, turns off, reboots, boots in exactly the same way, you can install an operating system and programs in it. In short, it has almost all the same properties as a real one - the only difference is that it does not take up space in the apartment and is, in fact, software, not hardware.

We can say that a virtual machine is a resource shell for the guest OS installed in it (in the sense that it (the virtual operating system) is installed inside an already existing one and is therefore called a guest).

In general, my words may not look entirely clear, and therefore I suggest you move on to practice and, I think, everything will immediately become obvious to you;)

What will we use?

For all of the above, we will need, in fact, a computer, a virtualizer program, as well as a downloaded image (if you still have CD/DVD, then of course it will do) with the installation distribution Linux or Windows.

If we talk about virtualizers:

  • In fact, there are a great variety of virtualization programs, both paid and free. It so happened that my (and many) choice fell on VirtualBox, which I have been using almost all my life, and therefore in this article we will talk about it;

If we talk about distributions Linux:

  • In general, the choice of distribution is a matter of taste for everyone. There are a lot of debates on this topic on the Internet, even though all Linux users represent a kind of anti-Windows community;
  • In my case, the choice fell on Linux Mint. Beginners can try Ubuntu. There are many options for every taste - choose yours and go ahead.

That is, at the moment you must have downloaded the distribution kit, virtualizer VirtualBox and the computer, in fact, is in front of your eyes.

First, which is logical, we need to install a virtualizer; to do this, run the downloaded .exe file, after unpacking the archive. The installation is typical and simple and I will not dwell on it, fortunately it consists of points " Next-next" once again " Further" (Next).

It is possible that at one stage you will be asked to install a network interface or some other driver. Agree:

After launch, it would be very logical to launch the virtualizer VirtualBox using the appropriate shortcut. The program at the time of updating the article will look something like this:

Now let’s move on to the initial setup and use of this wonderful miracle, but first of all I must tell you something that you must understand here and further.

A little warning about virtualization and VirtualBox

Now we will create a virtual machine and do all the things for which this article was written.

But before that I want to notify you that received in program computer virtual, but he uses it completely real(physical) resources (they are not taken out of thin air, but “bitten off” from the current system).

So do not turn the sliders to maximum, because the local system may “suffocate” if you take away all its power :)

Creating a virtual machine in VirtualBox

You have already seen the main window of the program, so now we need to click the button " Create":

The next window will prompt you to select the operating system, its type and name (at your discretion):

In order not to suffer too much (remember that we are biting off real resources?), I recommend sticking to about a quarter (give or take) of the total computer memory:

The next stage, which will undoubtedly appear after you press the button " Create", he will ask you, what kind of virtual hard disk would you like to have? Here and now I will not describe the types and nuances, I simply recommend, for starters, making the disk a fixed size (if space allows) of, say, 64 GB and format VDI:

If you are interested in learning about other formats, as well as why you chose this particular size, format (fixed) and other nuances, then feel free to ask them in the comments.

In the upper right corner you can select the place where the disk of this very disk will be located, so I recommend placing it where you have enough space, resource, speed and everything else, i.e. a virtual disk, as you remember, occupies quite physical place:

The machine itself, formally, has been created for the sim, but it still needs to be configured and, as in the case of a real computer, an operating system must be installed on it, which, in our case, Linux Mint.

Next, I will show only the right side of the settings, naming the tab, so as not to constantly make it huge and clickable (like the previous one). For example, on the tab " System"First of all, it's worth checking the box" Net":

And, secondly, on the subtab " CPU" tick " Enable PAE/NX" and set (at your discretion the number of processors (cores), as well as the load limit. Again, I would recommend sticking to a quarter of the total resources, at least in this case:

On the display tab, it may make sense to increase (I usually increase to the maximum) the amount of available video memory, as well as 3D And 2D-acceleration (which is usually not relevant for Linux):

Regarding the section " Carriers", then switch to the second line, then select the disk icon and point to the distribution Linux or Windows, which you probably downloaded in advance. If you are using a real CD/DVD, then insert the disk into it and check the appropriate box:

The audio tab is responsible for audio transmission and playback. The checkboxes, I think, are logical for everyone:

The network tab usually allows you to transfer (emulate) a network interface or several, as well as NAT, port forwarding and many other tails. Usually you don't need to touch anything if you have previously checked the " Net":

The remaining tabs, except perhaps the section " General Tabs" touching, in our case, is usually not required. Unless using the plus sign, in fact, create a shared folder (it will be needed to exchange files between the virtual and real machines:

Then create a folder somewhere convenient for you (preferably a new and empty one) and indicate the path to it. It would also be extremely and completely useful to check the box " Auto-connection":

This completes the initial setup and (previously) creation of a virtual machine in VirtualBox can be considered complete, which means you can try to run it and proceed to the installation.

Installing Linux or Windows using VirtualBox

Actually, now you just need to start the machine to begin the process of installing the content:

If you did everything correctly, the image you downloaded will start and you will see it in the window of the virtual computer that you just created:

When you click on the area (window) of the virtual machine, you will be warned and told how the transfer of the mouse, keyboard and everything else occurs. I recommend that you read this message carefully. In short, it comes down to the fact that by clicking into the virtual machine area, you transfer control to it, and if you want to return the mouse and keyboard to their native space, then you will need the host key " Right Ctrl":

Then, in fact, all that remains is to do the installation and use the machine to your health. How to install Linux, Windows or anything else, we have already talked about in the relevant articles. For Linux this is approximately, but for Windows approximately .

That's probably all there is to it. After installation, everything should work like clockwork, and according to the stated principle, you can create virtual machines even in millions and for different tastes - if you have enough resources.

Turning on/off and managing the virtual machine is controlled by the corresponding items at the top of the screen.

Preface to Afterword

Congratulations, you have just completed a full installation Linux or Windows, and even in a virtual system. This is not given to everyone;)

By the way, the installation is really, so to speak, “real” and, if you decided to install Linux Mint not to a virtual computer, but to a local one and, previously recorded on disk, but to BIOS set to load from CD, then everything would be exactly the same (except that the disks would be formatted a little differently and not in a file, but live). So, here’s another use for a virtualizer - training to install systems - here format or don’t format, twist or turn, but it’s almost impossible to break something. But gaining experience is easy.

I will only add that the virtual computer can be paused, turned off and rebooted using the first tab (Machine) or (which is better) the functions of the system itself (Start button), as well as create shared folders between the virtual and local system using the second tab ( devices). In general, there are a lot of applications and we provide them on.

I repeat that you can install any operating system in a virtual machine, including everyone’s favorite Windows.

Afterword

I have just given you a powerful tool that will allow you, if you wish, to learn many aspects of computer literacy - from self-taught installation and use of various operating systems to, if you have imagination and literacy, the deployment of system-in-system security systems. Enjoy it for your health.

By the way, as promised, a visual video format of the article (though this is an old version, but still):

As always, if you have any questions, additions, or suggestions, ask and I will always be happy to answer them in the comments.

PS: I will write a number of articles later on how to use virtualization, especially in terms of security.

If you need to have multiple operating systems on your computer but don't want to dual boot, then the only option left is virtualization and virtual machines for Linux. When using dual boot on slow systems, rebooting from one system to another can take up to several minutes, which is very inconvenient.

Therefore, virtualization is an excellent solution, because with enough RAM and processor power, you can run several systems at the same time and even fully work with them. But what software is better to use? What to choose and how it all works is the topic of our article today.

Virtual machines are programs that create a software environment that simulates the desired hardware. An operating system can be installed into this environment and can then be fully used. We call such systems guest systems, while the main system installed on the computer is called the host.

Previously, virtual machines did all the work themselves, at the software level, and it is clear that all this worked very slowly. But then processors began to support hardware virtualization, which significantly speeds up the operation of the guest operating system. These are technologies such as AMD-V from AMD or Intel VT-x from Intel. However, these technologies may be disabled by default in the BIOS.

In addition to virtual machines that completely emulate the operation of a computer, virtualization for Linux includes containers, for example, LXC or OpenVZ. Next we will look at virtual machines for Linux that you can use to install your systems.

1. VirtualBox

VirtualBox is a universal Linux virtualization software that supports other operating systems, including Windows and MacOS. You can install almost any system here, except, of course, systems designed for devices on an ARM chip. All installed virtual machines are stored in files that contain disk images. This makes it very easy to back them up or transfer them to another computer by simply copying the machine file.

VirtualBox supports both 32 and 64 bit systems and you can install not only a Linux distribution, but also Windows or even MacOS. All systems will work perfectly. When creating a virtual machine, you can select a guest OS profile, which will automatically set the correct memory, processor and video card parameters.

In addition to virtualization itself, VirtualBox also supports additional functions, such as recording video from the virtual machine screen, creating system snapshots for quick recovery, and creating a virtual network between multiple machines. In addition, if you install guest OS add-ons, you can set up a shared clipboard between the host and guest systems, transfer files between them, or even integrate guest system program windows into the main one.

We can say that this is the best virtual machine for Linux, it offers all the necessary features, and at the same time is quite easy to use.

2.VMWare

Unlike VirtualBox, which is open source, it is a commercial product, the full version of which costs money. But for home use there is a simplified version that is completely free to use.

VMWare has almost all the same features as VirtualBox, in some tests it performs better than the first option, but overall their performance is the same. It is also possible to organize a network between virtual machines, combine the clipboard and transfer files, but there is no video recording.

A notable feature of VMWare is that for some systems, automatic installation scripts have been developed and are already ready, which allow you to install the system automatically and without specifying too many parameters. This can be very convenient in some situations.

3. Qemu

If you want to run not the usual x86 operating system, but a system for ARM devices, for example, Android, Raspbian or RISC OS, then the two previous Linux virtual machines will not help you. Only Qemu can handle this task.

Qemu is short for Quick Emulator. This is a very easy to configure console utility, but it allows you to do many interesting things at the VirtualBox level, you can run any operating systems, including ARM, you can install the OS on a real hard drive or to a file, use hardware acceleration and even automatically download some distributions via the Internet.

Despite its name, it is a very powerful tool for working with virtualization on Linux; to install Qemu on Ubuntu, run:

sudo apt install qemu qemu-kvm libvirt-bin

4. KVM

KVM or fully Kernel-based Virtual Machine (kernel-based virtual machine) is a kernel-level implementation of a virtualization platform that provides additional capabilities to Qemu and very high speed by running directly in the kernel.

All this means that KVM is faster and more stable than VirtualBox, but KVM is much more difficult to configure and maintain. KVM technology is a very popular solution for hosting virtual machines, including on many servers on the Internet.

To start using KVM, you first need to check whether your hardware supports hardware acceleration; to do this, use the cpu-checker utility. If everything is supported then you can proceed to install KVM:

sudo apt-get install qemu-kvm libvirt-bin virtinst bridge-utils virt-manager

Once installed, you will be able to access kvm virtual machines using the virtual machine manager that will appear in the menu. Other Linux virtualization systems, such as XEN, are also managed using this manager.

5. XEN

This is another virtualization platform for Linux that is very similar to KVM. But there are some differences. Like KVM, it supports hardware acceleration, many architectures, including ARM, as well as running various guest systems, including Windows. But the main difference is that KVM is built into the Linux kernel by default, and for Xen to work you need a specially built kernel that supports it.

Among other features of Xen, it can be noted that the system will work quite quickly even without hardware acceleration if you run Linux. Otherwise, these Linux virtualization systems,

conclusions

In this article, we looked at the best virtual machines for Linux. As you can see, virtualization on Linux is developing very quickly and there are quite a lot of solutions that you could use on your system. What virtual machine or virtualization system are you using? Write in the comments!

To install a new virtual machine with Linux we need:

  • The program itself for launching virtual machines.
    Download VM VirtualBox
  • Ubuntu Linux installation image.
    Download the installation image from here. We take Ubuntu 13.10. Downloading one of the images
    • Ubuntu 13.10 Desktop (64-bit)
    • Ubuntu 13.10 Desktop (32-bit)
    We choose the 64-bit version, or the 32-bit version if your computer’s processor is not 64-bit, although now there are few of them. The fastest way to download is with a torrent; you can also select the nearest server. For example, here is the official mirror in Russia.

Install Virtual Box.

Click the “Create” button and then use the wizard to configure the new virtual machine.


Enter the name of the virtual machine, the type “Linux”, and the version “Ubuntu (64 bit)” (or just “Ubuntu” if you install 32 bit). If you want to install the 64-bit version, but you do not have 64-bit configurations in the list of versions, then you may have a 32-bit processor. If the processor should still support it, then read the F.A.Q. on the VirtualBox forum.
When I installed an HP 630 (Core i3 processor) on my laptop, I just encountered the fact that the program did not provide 64-bit configurations. As stated in the F.A.Q. that in some BIOS virtualization support needs to be enabled, it turned out that by default it was disabled for me.


Next, we set the size of RAM that will be available to the virtual machine.


The virtual machine needs a virtual hard disk, which will actually be a file on our hard drive. We create a new virtual hard disk, the wizard will ask for the type - select default, and set the hard disk size limit.




The virtual machine is ready.


But it needs to be further configured in order to work more comfortably later. Click “Configure”. Go to the “System” section. I increase the number of available processor cores to two, because the GUI with one core is very slow.


Then go to the “Display” section, set the maximum video memory and check the box to enable “3-D acceleration”

Installing Ubuntu Linux

Now close the settings and start the machine. We will install the operating system. The machine starts but there is no OS on its hard drive, so we see a black screen. You can install the OS directly from the image; for this you need to mount it as an optical disk. To do this, select “Devices” - “Optical disk drives” - “Select optical disk image” from the menu and specify the iso image of the downloaded ubuntu.


Then in the “Machine” menu we restart the machine. Booting from the disk begins. And after a while the installer welcome screen will appear. We immediately select the language. And click “Install Ubuntu”. The “Launch Ubuntu” button allows you to boot to the Ubuntu desktop without installation for evaluation purposes, but we don’t need this mode, we install it right away.

Now you need to set the installation conditions. Set the disk placement method. Ubuntu typically requires two partitions, one regular and one page file partition. You can also create three partitions in order to place the /home mount point on the third partition, which will store all user files. An analogy with Windows drives C: and D:.
But because This is a virtual machine, and the (virtual) hard disk is not large anyway. Let’s leave the default option, the installer will create the necessary partitions itself.


Set the time zone


Choosing a second language after English


Enter the new user name and password. You need to enter a password, because... on Linux this is an important security point.


Skip entering your Ubuntu One account - click Login later


And wait until the OS is installed




At the end of the installation, the machine will ask you to reboot in graphical mode, and then in text mode you will need to press Enter.


After the reboot, enter the user password and start using it.

Configuring installed Ubuntu Linux 13.10

In Ubuntu 13.10, the ability to switch layouts using the usual Ctrl+Shift is no longer available. Therefore, you need to configure the combination to switch. On the panel we find the language icon. (If it's not there, reboot Ubuntu)
Then click on it and select “Text input options”. In the window that appears, in the field with a key combination, you just need to click and press the combination that will be convenient to use. I set myself Ctrl+Space


The next step for convenient use of the virtual machine is to install the guest system add-on. These are special programs that are installed in the virtual machine and are available in the “Devices” menu - “Mount the Guest OS Additions disk image.” After connecting, the disk will autostart, you must agree to run it. A terminal will be launched in which you will need to enter the user password. When entering a password into terminals, no characters will appear. Then you will need to press Enter. Wait for the installation to complete and reboot the virtual machine.


After installing these add-ons, the screen resolution in the virtual machine will be adjusted to the window size, you can enable the shared clipboard, see the “Devices” menu. And an equally important function is to create a shared folder between your operating system and Ubuntu on a virtual machine.
To create such a folder, go to “Devices” - “Setting up a shared folder”. Click add a shared folder, select a folder in the main OS, check the Auto-connect and Create permanent folder checkboxes.

Console

A console or terminal is an application with a text interface that provides no less, or even more, opportunities for controlling a computer than programs with a graphical interface.


When you start the console, it contains the line %username%@%computer name%:~$
~ is the short name for your home folder


To open the console, you can remember the key combination Ctrl-Alt-T or press the super key (the key with the Windows icon on the keyboard) and enter terminal or terminal in the line and click on the icon.

Connecting the shared folder is half completed. We gave the folder to Virtual Box but did not configure this folder in Ubuntu. And in order to work with it, you need to mount it. There is a command for this

Mount -t vboxsf Share /home/user/share-folder

Here, for example, Share is the name of the folder that we configured in VirtualBox
/home/user/share-folder - folder in the virtual machine file system, if your user name is user
To create this folder you can navigate with the cd command and then run the command

Mkdir share-folder

But every time (after a reboot) mounting the folder will quickly get boring, I found a solution in the article and it consists of adding the command line to the /etc/rc.local file:

Mount -t vboxsf Share mount-point

The folder names are still the same for example. To get into the file you can run the command

Sudo nano /etc/rc.local

Here sudo is a flag that the command comes from the superuser, this is necessary because The configuration file is a system file and the appropriate rights are required. Calling commands with sudo will require you to enter a password.

nano is one of the console editors. You could use gedit instead - this is already a window editor.


Now you can install programs. And enjoy all the benefits of Ubuntu.
For example, you can install Git. You can enter the git command into the terminal and see a prompt that this program is not installed and you can install it with the command

Sudo apt-get install git

But before running this command you need to call

Sudo apt-get update

To have ubuntu update its repository lists.


After installation you can dial

Git --help

And if you see the help for the git program, make sure that it is now installed.