If you have Windows 10 Pro or Enterprise installed on your computer, you may not know that this operating system has built-in support for Hyper-V virtual machines. Those. all that is needed to install Windows (and not only) in the virtual machine is already on the computer. If you have a home version of Windows, you can use VirtualBox for virtual machines .
An ordinary user may not know what a virtual machine is and why it can come in handy, I will try to explain it. A "virtual machine" is a kind of software-launched separate computer, if even more simply - Windows, Linux, or another OS running in a window with its own virtual hard disk, system files, and more.
You can install operating systems, programs on a virtual machine, experiment with it in any way, while your main system will not be affected in any way - i.e. if you wish, you can specifically run viruses in a virtual machine without fear that something will happen to your files. In addition, you can first take a “snapshot” of the virtual machine in seconds, so that at any moment you can return it to its original state in the same seconds.
Why is it necessary for the average user? The most common answer is to try some version of the OS without replacing your current system. Another option is to install questionable programs to verify their operation or install those programs that do not work in the OS installed on the computer. The third case is to use it as a server for certain tasks, and this is far from all possible applications. See also: How to download ready-made Windows virtual machines .
Note: if you are already using VirtualBox virtual machines, then after installing Hyper-V they will stop starting up with the message that “Failed to open the session for the virtual machine”. About what to do in this situation: Running VirtualBox and Hyper-V virtual machines on the same system .
Install Hyper-V Components
By default, Hyper-V components in Windows 10 are disabled. To install, go to Control Panel - Programs and Features - Turn Windows Features on or off, check Hyper-V and click OK. Installation will happen automatically, you may need to restart your computer.
If the component is suddenly inactive, it can be assumed that you either have a 32-bit version of the OS and less than 4 GB of RAM on your computer, or there is no virtualization hardware support (available on almost all modern computers and laptops, but can be disabled in BIOS or UEFI) .
After installation and reboot, use Windows 10 search to start Hyper-V Manager, it can also be found in the "Administration Tools" section of the list of programs in the Start menu.
Configuring a network and the Internet for a virtual machine
As a first step, I recommend setting up a network for future virtual machines, provided that you want to have Internet access from the operating systems installed in them. This is done once.
How to do it:
- In Hyper-V Manager, on the left in the list, select the second item (the name of your computer).
- Right-click on it (or the menu item "Action") - Virtual Switch Manager.
- In the virtual switches manager, select "Create a virtual network switch," External "(if you need the Internet) and click the" Create "button.
- In the next window, in most cases, you do not need to change anything (if you are not an expert), unless you can set your own network name and, if you have both a Wi-Fi adapter and a network card, select the “External network” item and network adapters, which is used to access the Internet.
- Click OK and wait for the virtual network adapter to be created and configured. At this time, your Internet connection may be lost.
Done, you can proceed to creating a virtual machine and installing Windows in it (you can install Linux, but according to my observations, in Hyper-V its performance is poor, I recommend Virtual Box for these purposes).
Creating a Hyper-V Virtual Machine
Also, as in the previous step, right-click on the name of your computer in the list on the left or click on the "Action" menu item, select "Create" - "Virtual Machine".
At the first stage, you will need to specify the name of the future virtual machine (at your discretion), you can also specify your own location of the virtual machine files on the computer instead of the default one.
The next stage allows you to choose the generation of the virtual machine (appeared in Windows 10, in 8.1 this step was not). Read the description of the two options carefully. In fact, Generation 2 is a virtual machine with UEFI. If you plan to experiment a lot with booting a virtual machine from various images and installing different operating systems, I recommend leaving the 1st generation (virtual machines of the 2nd generation are not loaded from all boot images, only UEFI).
The third step is to allocate RAM for the virtual machine. Use the size that is required for the OS planned for installation, or better, even larger, given that this memory will not be available on your main OS while the virtual machine is running. I usually uncheck "Use dynamic memory" (I like predictability).
Next we have the network setup. All that is required is to specify the virtual network adapter created earlier.
A virtual hard drive is connected or created in the next step. Indicate the desired location on the disk, the name of the virtual hard disk file, and also specify the size that will be sufficient for your purposes.
After clicking “Next” you can set the installation parameters. For example, by setting the option “Install the operating system from a bootable CD or DVD”, you can specify a physical disk in the drive or an ISO image file with a distribution kit. In this case, when you first turn on the virtual machine will boot from this drive and you can immediately install the system. You can also do this later.
That's all: they will show you the code on the virtual machine, and by clicking the “Finish” button it will be created and will appear in the list of virtual machines of the Hyper-V manager.
Virtual machine startup
In order to start the created virtual machine, you can simply double-click on it in the list of Hyper-V manager, and in the window for connecting to the virtual machine, click the “Enable” button.
If during its creation you indicated the ISO image or the disk from which you want to boot, this will happen the first time you start, and you can install the OS, for example, Windows 7 in the same way as the installation on a regular computer. If you did not specify an image, then you can do this in the menu item "Media" connecting to the virtual machine.
Usually, after installation, the boot of the virtual machine is automatically installed from the virtual hard disk. But, if this did not happen, you can adjust the boot order by right-clicking on the virtual machine in the list of Hyper-V manager, selecting “Parameters” and then the “BIOS” settings item.
Also in the parameters you can change the size of RAM, the number of virtual processors, add a new virtual hard disk and change other parameters of the virtual machine.
Of course, this instruction is just a superficial description of creating Hyper-V virtual machines in Windows 10, all the nuances here can not be fit. In addition, you should pay attention to the possibility of creating control points, connecting physical drives in the OS installed in the virtual machine, advanced settings, etc.
But, I think, as a first acquaintance for a novice user, it is quite suitable. With many things in Hyper-V, you can figure it out yourself if you wish. Fortunately, everything in Russian is reasonably well explained and, if necessary, is searched on the Internet. And if you suddenly have questions during the experiments - ask them, I will be happy to answer.