Installing and configuring hyper-v server for those who see it for the first time. Hyper-V - a virtual machine from Microsoft How to open the hyper v manager

Today we will learn about how to install and configure the hyper-v server hypervisor from Microsoft, as well as some pitfalls and ways to avoid them.

The reason for writing this article was the material of this post. This post is more suitable as a cheat sheet if you have already worked with this hypervisor. A beginner will have to deal with a lot of nuances and dig through a lot of forums in search of answers to non-standard questions.

For beginners, the article will outline in as much detail as possible all the actions and their meaning, so that they have the opportunity to start experimenting and come up with something of their own. For the more savvy, the article is divided into logical blocks and subblocks so that you can quickly find the necessary information.

Description

MS hyper-v server is a stripped-down version of MS server 2008 R2 in Core mode (i.e., in fact, there is no graphical interface) with the hyper-v role installed and nothing more. According to Wikipedia, hyper-v server is distributed free of charge, which, coupled with convenient management and integration with MS products, makes it a very attractive hypervisor. In addition, it has fairly high performance indicators, which means the resources of the host machine will be spent on running the services we need.

Installation

Before you begin installation, you must ensure that your processor supports Intel VT-x or AMD-V hardware virtualization technologies.

First, you need to download the hyper-v server 2008 R2 distribution from the Microsoft website (no need to register). Next, burn the image to a DVD or make an installation flash drive. Insert the disk/flash drive and boot from it.

Hyper-v server - selecting the installation wizard language

The installation window prompts us to select the operating system language. We choose English; later in the article we will explain why.

Hyper-v server - selecting OS language and keyboard layout

We chose English for the language, and it’s better to choose Russian for the time format, so that later we don’t have to worry about setting it up on the command line.

Hyper-v server - selecting installation type

Choose full installation(Custom).

Hyper-v server - setting parameters hard drive

At this stage, the wizard prompts you to configure the hard disk partition settings. It's best to create 2 logical drive. The first one is for installing the hypervisor itself; 15 GB is enough for it. The second is for storing virtual machine (VM) containers. Thus, it will be much more convenient to manage, import and migrate VMs.

Click “Next” and we can rest for a while. The computer will restart several times during the installation process.

Settings

Basic setup and remote access

After rebooting, hyper-v server will prompt us to set an administrator password. Since by default in group policy ms windows 2008 server r2 has a requirement for password complexity, you will have to come up with a password that is at least 6 characters long and must contain a capital letter and a special character or number (for example, “Password1”).

As you can see in the screenshots below, the control console is in Russian, although during installation it was selected English language, most likely this is due to the fact that a Russian distribution was downloaded from the official Microsoft website. This will not negatively affect the operation and configuration of the server. If you have a console in English, you can do it by analogy, all the settings will be easy to understand.

Hyper-v server - management interface

After loading the working environment, the OS offers us 2 control consoles. Standard command console cmd and console with preinstalled options. First of all, we need to ask static ip address and configure remote control server. In the control console, select item 8.

Hyper-v server - network adapters

The network adapters will be listed. Select the one you need and enter its index. Next, select “1 - set the IP address of the network adapter.” We enter “S” - which means a static IP address. For example, let's set the parameters:

IP address - 192.168.1.100 subnet mask - 255.255.255.0 default gateway 192.168.1.1 After applying the parameters, we will return to the submenu, where the previously made settings will be listed. If everything is correct, we return to the main menu. Now let's set up remote access. Select item 7, then enable the remote desktop by entering the English “E”. When asked about limiting connections from older versions of rdp clients, select “2” - connect from any clients.

In the main menu, select item 9 and set the current date and time on the server.

Server network name and workgroup

Now let's set up a working group. For the hyper-v server to work, we will not include it in the domain, which complicates the setup somewhat, but for experimentation this is perfect option. During tests and verification of various configurations, it is better to isolate the test machines from the target network.

Select item 1, then “join the working group” by entering “W”. Next we set the name working group, for example "test". It is very important that the name of the workgroup on the hyper-v server and the PC from which we plan to manage it match. After this we return to the main menu.

It is advisable to set the network name of the server, select item 2 and enter the name, for example “hyper-srv”. To apply the settings, you need to reboot; we agree with the OS offer.

Further, all settings (such as computer name, workgroup, users, IP address, etc.) will be used as those described during the installation process. If you set your parameters, do not forget to use them.

After rebooting, we can connect to the server using the Remote Desktop Client. Select start -> run, enter: mstsc In the first field, set the IP address (in my case 192.168.1.100), connect. The server will request authorization data, enter the username “hyper-srv\Administrator” and password “Password1”.

So, we have connected, now we need to configure additional remote control settings. We go to point 4. Now, in order, select sub-points 1, 2 and wait until the settings are completed. After completion, the OS will again ask you to reboot. Once these settings are completed, we will be able to connect to the server using the mmc console and the hyper-v server manager from the Remote Server Administration Tools (RSAT) package. This will be described in more detail later in the text.

Installing RSAT and hyper-v manager

For comfortable remote server management (creating/deleting/importing/configuring VMs, adding/removing equipment, managing users/group policies, etc.), we need to install RSAT on our PC. We will install it on Windows 7. First of all, download it from here. In this package we need the “hyper-v Manager” component for the mmc console - this is actually the main tool for managing future VMs.

Subsequent settings will need to be made both on the server (SRV for short) and on our control PC (MC).

Setting up users

The first step is to create a user on whose behalf we will carry out control. Usernames and passwords must be the same for UK and SRV!

On the SRV - in the management console, select item 3 (adding a local administrator). Set the name “admin” and the password for it “Qwerty1”. Let's check whether it was successfully added, in the cmd console we enter: net user admin This command will show us that it is a member of the “Administrators” and “Users” groups.

On the management company - launch the cmd console as administrator and enter the command: net user admin Qwerty1 /add add it to the administrators group: net localgroup Administrators admin /add for English version enter: net localgroup Administrators admin /add Check the results again using: net user admin

To configure users and security groups, there is a wonderful utility “HVRemote”, written by one of the Microsoft employees.

Download the utility and copy the “HVremote.wsf” file to the server. Remember at the very beginning, it was mentioned that you need to select English for the OS? So, for the “HVremote.wsf” script to work correctly, it is necessary that security groups and users be named in English.

A small digression: as was written earlier, hyper-v server does not have a graphical interface. This is not entirely true, Microsoft simply cut out everything related to Explorer to the maximum, but this does not prevent us from launching applications with graphical windows. For example, you can copy the program “ total commander"and run it from the console.

Hyper-v server - launching applications

Let's continue, on SRV - open the cmd console, go to the folder with the file “HVremote.wsf” (in the article the file is saved to the root of the C: drive). Execute the command: cscript hvremote.wsf /add:domain\account where domain is the name of your server (domain), account is the name of the account to manage. In our case, the command will look like this: cscript hvremote.wsf /add:hyper-srv\admin

Hyper-v server - script execution

As a result, you should get something like the screenshot. The script added the user to the necessary groups and assigned him rights.

On the management side, you need to run the following commands cscript hvremote.wsf /anondcom:grant cscript hvremote.wsf /mmc:enable

For the remote computer management console snap-ins to work, you need to create exception rules in the server firewall. First of all, let's create a rule that allows you to manage logical drives:

Netsh advfirewall firewall set rule group="Remote Volume Management" new enable=yes If you get an error like “Group cannot be specified with other identification conditions”, try retyping the command manually rather than copying/pasting. Result of successful command execution: Updated 3 rule(s). Ok. Next, let's enable remote firewall management netsh advfirewall firewall set rule group="Windows Firewall Remote Management" new enable=yes Result of successful command execution: Updated 2 rule(s). Ok. Let's allow access for any mmc console snap-ins netsh advfirewall firewall set rule group="Remote Administration" new enable=yes Result of successful command execution: Updated 3 rule(s). Ok. Let's enable the use of “Windows Management Instrumentation (WMI)” with the following command: netsh advfirewall firewall set rule group="windows management instrumentation (wmi)" new enable=yes Result of successful command execution: Updated 4 rule(s). Ok. Let's enable the icmp protocol: netsh firewall set icmpsetting 8 Let's allow access to shared files and folders: netsh firewall set service type=fileandprint scope=subnet If for some reason you cannot connect to the server, try disabling the firewall netsh command firewall set opmode disable You may have to create additional rules access.

Now we can use the mmc snap-ins to manage the server (managing services, users, policies, etc.) and most importantly the hyper-v manager. Let's open it: launch the mmc console -> file -> add or remove snap-in -> hyper-v manager. Select the Action menu -> connect to server -> another computer. Enter the network name of your server (hyper-srv) in the field and connect.

Hyper-v server - VM control manager

That's all, we have successfully installed and configured our hyper-v server. Now you can safely deploy virtual machines and various services.

Wikipedia - Hyper-v server Useful console commands

Back in Windows 8, Hyper-V virtualization technology appeared, previously available only in Microsoft server operating systems. This solution looks more successful than the virtual one included in Windows 7 Windows machine Virtual PC. Today I will tell you how to create a virtual machine in Windows using Hyper-V, and also set up the Internet, local network and file sharing in it.

In addition to Coreinfo, you can use Intel's proprietary utility (AMD has a similar one).

You can also look at the virtualization technology support table on your processor manufacturer's website: Intel | AMD.

Enable Hyper-V

Hyper-V is an operating system component that is initially disabled. Advanced users can enable it with one PowerShell command:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

If you prefer a GUI, press Win + R, enter OptionalFeatures and press Enter.

In the window that opens, select the Hyper-V checkbox.

One way or another, the component will become available after a system reboot. Among the problems with installation in Windows 8 RP, a cyclic reboot due to the fault of USB 3.0 controller drivers has been noticed so far, which on some systems was solved by disabling USB 3.0 in the BIOS.

Creating and configuring a virtual machine

Press Win + R, enter virtmgmt.msc and press Enter to open Hyper-V Manager. From the menu Actions select CreateVirtual machine.

Creation Wizard virtual machine is extremely simple, but I will note some points for those who like detailed instructions with pictures. I will skip the network setup step now, since I will analyze this issue in more detail.

The standard location for virtual machines is a folder ProgramData, but it can be changed.

If you already have virtual disk in VHD format, you can connect it. By the way, I did just that, using the disk I created earlier for Virtual Box.

When you specify an existing VHD, the wizard removes the step where you specify the media for installing the system.

However, you can specify the path to the ISO later by opening the virtual machine settings in the main Hyper-V Manager window.

Starting a virtual machine and installing Windows on it

Everything here is also simple, but a little unusual for those who have not previously encountered Hyper-V.

In Hyper-V Manager:

  • To start the virtual machine, click “Start”
  • To interact with it, click “Connect” or double-click the machine’s thumbnail

When the machine parameters indicate Bootable ISO image Windows, you will see on the screen the familiar inscription Press any key to boot... Then you can handle it yourself, but if you need step by step instructions for installation, they are on OSZone for Windows 7 and Windows 8.

If the operating system on the physical machine is newer than the one installed on the virtual one, it is recommended to update the integration components (thanks, Artem). To do this, connect to the virtual machine in the Hyper-V manager, press Ctrl + I and run setup.exe.

Setting up Internet access and local network

The instructions in this section are only necessary if you are unhappy with the Default Switch introduced in Windows 10 1709, which cannot be removed or renamed. When using Default Switch, if the host is connected to VPN virtual the machine also uses a VPN. This is one of the main differences from an external switch, the creation of which I will describe later.

On the menu Actions select Setting up virtual switches. A window will open in which you can create a switch of one of three types. To enable your virtual machine to access the Internet, create external switch.

Now you need to set the name of the switch and select network adapter, if you have more than one. At home I use wireless network, so I chose a Wi-Fi adapter.

All that remains is to specify the created switch in the network connection parameters of the virtual machine.

Now in installed Windows you will have an Internet connection and the local network between physical and virtual machines.

In the picture above you see:

  • on the left is the result of adding a virtual switch to Hyper-V on a physical machine, i.e. network bridge and virtual adapter
  • on the right – Internet access and connection to the local network on the virtual machine

As you can see, setting up the Internet and local network is not so much complicated as it is unusual for users of Microsoft client operating systems.

Sharing files between physical and virtual machines

As you work with a virtual machine, you regularly need to copy files from a physical one to it, or vice versa. I will describe several ways to solve this problem.

Shared network folders

This method works in all editions of Windows 10. Since we have a local network at our disposal, we can use shared folders to share files. In fact, the instructions below boil down to the basics of creating shared folders.

Access from virtual machine to physical machine

A picture is worth a thousand words, as the Americans say.

The figure shows the virtual machine explorer (VIRTUAL-PC), from where the physical machine (VADIK-PC) is accessed. Once you enter your account credentials, access to your profile will be at your disposal.

You may want to create a shared folder located on a physical machine outside of your profile. To do this, it is enough to use standard means providing shared access, but I will explain this process using the example of access to an arbitrary folder of a virtual machine.

Access from physical machine to virtual machine

Let's say there is a folder in the root of the virtual machine disk Shared. Right click on it and select General accessIndividual people(or Specific users in Windows 7).

Now you can open shared folder over the network in Explorer, including by entering address bar address like \\computer-name\folder-name.

Connecting to a remote desktop of a virtual work machine

In Hyper-V, files cannot be exchanged between a physical and virtual machine by copying and pasting. You can only paste text copied on a physical machine using the combination Ctrl keys+V. However, once the virtual machine is running, you can connect to it via RDP instead of opening it from Hyper-V Manager. This method works in Pro editions and higher.

Actions on a virtual machine

First, you need to enable remote desktop connections on the virtual machine in the system properties. Press Win + R and run:

RUNDLL32.EXE shell32.dll,Control_RunDLL sysdm.cpl,5

Then allow the connection as shown in the picture.

All that remains is to find out the IP address of the virtual machine with the command ipconfig

Actions on a physical machine

Press Win + R and enter mstsc and expand login options.

In the window that opens:

  1. Enter the IP address of the virtual machine (required).
  2. Enter the username you want to use account you will be logged in.
  3. Enable login credentials to be remembered.
  4. Save the connection settings.

You can also set the Display tab to a resolution lower than what is used on the physical machine.

Now you can exchange files between physical and virtual machines using the usual keyboard shortcuts Ctrl + C and Ctrl + V.

Finally, I would like to virtualize a few recommendations from Denis Diaghilev for working with Hyper-V.

Use RDP to connect to virtual machines.

This will not only allow you to share files between the physical and virtual machine by copying and pasting, but will also save system resources that vmconnect consumes when connecting to the virtual machine in Hyper-V Manager or from the command line.

If you plan to regularly use RDP to connect to various virtual machines, pin the program to the taskbar. Then the list of cars will be saved in the transition list.

Be careful with your photos

With Hyper-V you can create snapshots of a virtual machine using differential disk technology. However, the logic of the images is almost the opposite of what a person who has never stepped on a rake would expect from it.

Alexander Kosivchenko (MVP for virtualization) described in detail, although somewhat chaotically, the principle of operation of Hyper-V snapshots on Habré.

Use virtual machine import if necessary

Import will be more interesting to IT specialists, but I happened to use this function by accident. After creating the virtual machine, I renamed the drive letter where it was stored, and then Hyper-V Manager lost it.

Looking around in the snap, I saw the import option and instantly restored the machine.

Moreover, I didn’t even suspect that the actions I performed became possible only due to the emergence of a new feature in Hyper-V :)

Hyper-V vs. VirtualBox

While understanding Hyper-V, I involuntarily compared Microsoft solution for a client operating system with Oracle VirtualBox.

From the point of view of typical tasks of home users (testing the system installation, familiarization with it, checking the operation of applications), these solutions are practically no different from each other. But VirtualBox can be used in Windows 10 Home editions, while Hyper-V is not available in them.

VirtualBox does not have such strict hardware requirements, and its graphic capabilities even wider, since there is support for 3D hardware acceleration (although I have never used it).

Concerning GUI, then this is purely a matter of taste. Probably, the hypervisor that came from server operating systems looks more ascetic, but the parameters and configuration of virtual machines are generally very similar.

The presence of Hyper-V in Windows will primarily please IT professionals accustomed to this technology. For home users this is good opportunity take advantage of the built-in tools of the system and expand your horizons by joining the server Microsoft technologies.

Survey

I met virtual machines in 2004, when I started auto-installing Windows. Since then they have become an integral part of my daily work, including testing system settings, programs, etc.

In comments Tell us what virtualization solution you use and for what purpose!

I would like to thank Denis Diaghilev for his assistance in preparing this material. One of the benefits of the MVP program is exposure to top Microsoft technology talent. This means that you can get competent advice on any issue privately;)

Denis also kindly offered his assistance in facilitating the discussion. Therefore, if you have any technical questions regarding this article, you can count on qualified answers.

I want to specifically emphasize that

If you have Windows 10 Pro or Enterprise installed on your computer, you may not be aware that the operating system has built-in support for Hyper-V virtual machines. Those. everything you need to install Windows (and more) in a virtual machine is already on your computer. If you have a home Windows version, You can .

The average user may not know what a virtual machine is and why it can be useful, I will try to explain it. A “virtual machine” is a kind of software-based separate computer, or even more simply, Windows, Linux or another OS running in a window, with its own virtual hard disk, system files and so on.

How to do it:

  1. In Hyper-V Manager, select the second item (your computer name) from the list on the left.
  2. Right-click on it (or the “Action” menu item) - Virtual Switch Manager.
  3. In the Virtual Switch Manager, select “Create a virtual network switch, “External” (if you need Internet) and click the “Create” button.
  4. In the next window, in most cases, you don’t need to change anything (if you are not a specialist), except that you can set your own network name and, if you have both a Wi-Fi adapter and a network card, select that one in the “External network” item and network adapters, which is used to access the Internet.
  5. Click OK and wait until the virtual network adapter is created and configured. During this time, the Internet connection may be lost.

Done, you can proceed to creating a virtual machine and Windows installations into it (you can also install Linux, but according to my observations, its performance in Hyper-V leaves much to be desired, I recommend Virtual Box for these purposes).

Creating a Hyper-V virtual machine

Just as in the previous step, right-click on the name of your computer in the list on the left or click 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 your computer instead of the default one.

The next step allows you to select the generation of the virtual machine (appeared in Windows 10, this step was not present in 8.1). Please read the descriptions of the two options carefully. Generation 2 is essentially a UEFI virtual machine. If you plan to experiment a lot with booting a virtual machine from different images and installing different operating systems, I recommend leaving the 1st generation (2nd generation virtual machines do not boot from all boot images, only UEFI).

Third step - selection random access memory for a virtual machine. Use the size required for the OS you plan to install, or better yet, even more, taking into account that this memory will not be available in your main OS while the virtual machine is running. I usually uncheck the “Use dynamic memory” checkbox (I like predictability).

The virtual hard disk is mounted or created in the next step. Specify the desired location on the disk, the name of the virtual hard disk file, and also set the size that will be sufficient for your purposes.

After clicking “Next” you can set the installation options. For example, by selecting the “Install operating system from a bootable CD or DVD” option, you can specify the physical disk in the drive or the ISO image file with the distribution. In this case, when you turn it on for the first time, the virtual machine will boot from this drive and you can immediately install the system. You can also do this later.

That's all: you will be shown a summary of the virtual machine, and when you click the “Finish” button, it will be created and appear in the list of virtual machines in the Hyper-V manager.

Starting a virtual machine

In order to start the created virtual machine, you can simply double-click on it in the Hyper-V manager list, and in the virtual machine connection window, click the “Enable” button.

If, when creating it, you specified ISO image or the disk from which you need to boot, this will happen on the first start, and you will be able to install an OS, for example, Windows 7, in the same way as installation on regular computer. If you did not specify an image, you can do this in the “Media” menu item for connecting to the virtual machine.

Typically, after installation, the virtual machine will automatically boot from the virtual hard disk. But, if this does not happen, you can adjust the boot order by right-clicking on the virtual machine in the Hyper-V manager list, selecting “Options” and then “BIOS” settings.

Also in the settings 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.

Finally

Of course, this instruction is only a superficial description of creating Hyper-V virtual machines in Windows 10; all the nuances cannot be covered here. Additionally, you should pay attention to the possibilities of creating checkpoints, connecting physical drives to the OS installed in a virtual machine, advanced settings, etc.

But I think it’s quite suitable as a first introduction for a novice user. You can figure out many things in Hyper-V yourself if you wish. Fortunately, everything is in Russian, explained quite well, and if necessary, can be searched on the Internet. And if you suddenly have questions during the experiments, ask them, I will be happy to answer.

We will add the components Hyper-V in Windows 10, consider the option of creating a virtual machine using Hyper-V, and also consider its parameters.

Adding Hyper-V components.

Let's launch "Run" in any of two ways:

  1. Right click on the menu "Start" and choose "Run".(Fig.1)
  2. Press the key combination "Win"+"R".
Fig.1 - Right click "Start" -> "Run".

Enter appwiz.cpl(Fig.2)


Fig.2 - Enter appwiz.cpl

A window will open "Programs and Features". Click on the left "Turn Windows features on or off".(Fig.3)


Fig.3 - Programs and components.

A window will open "Windows Components". Select everything that is in the section Hyper-V.(Fig.4)

Click "OK".

Fig.4 - Selecting Hyper-V components.

We are waiting for the components to be installed - Applying changes, and press "Restart now".(Fig.5)


Fig.5 - Using components, rebooting the system.

On this Adding Components finished. Getting started with Hyper-V

Launching Hyper-V.

On the menu "Start" -> "Facilities Windows administration" a shortcut appeared "Hyper-V Manager". Let's launch it. (Fig. 6)

Fig.6 - Launch Hyper-V Manager.

Before us is the start window "Hyper-V Manager".(Fig.7)


Fig.7 - Hyper-V Manager start window.

We select our computer on the left, I have this - DESKTOP-9PLBR7Q, a menu will appear on the right "Actions", Click on the item "Virtual Switch Manager".(Fig.8)


Fig.8 - Go to the Virtual Switch Manager.

IN "Virtual Switch Manager" click "Create a virtual switch".(Fig.9)


Fig.9 - Creating a virtual switch.

Enter Name, I have this - Hypernet and note, I have this - Hyper-V network.(Fig.10)

You will also choose Connection type. I chose to connect to External network through my network card -"Realtek PCIe GBE Family Controller". And also checked the checkbox "Allow the management operating system to share this network adapter".

Click "Apply".


Fig. 10 - Properties of the virtual switch.

A warning pops up "Pending changes may disrupt network connectivity".(Fig. 11) I assume that this article will be read by beginners, which means they are unlikely to repeat step by step after me, using the involved server, of their enterprise 😀 . Therefore, it’s okay that we may lose our network connection for a while. Click "Yes" and wait "Applying Changes".


Fig. 11 - Warning about a possible network connection failure.

Now having entered "Network connections" -> "Configuring adapter settings". We can see our newly created vEthernet (Hypernet), also adjacent to it is not connected vEthernet (Default Switch) - " Standard Network automatically grants virtual machines access to the computer's network using network address translation ( NAT). NAT on this moment we are not interested. And we will not touch this switch. (Fig. 12)


Fig.12 - Network connections -> Configuring adapter parameters.

This completes the network setup. Let's move on to the most important thing, why the virtualization system was created Hyper-V- WITH creating a virtual machine.

Creating a virtual machine.

Right click on our computer -> "Create" -> "Virtual machine". (Fig.13)


Fig. 13 - Creating a Hyper-V virtual machine.

The “Virtual Machine Creation Wizard” will open (Fig. 14)

  • Click the button "Ready" to create a virtual machine with default settings.
  • Click the button "Further" to create a virtual machine with specific configuration settings.

Fig. 14 - Virtual machine creation wizard.

Specify the name of the virtual machine and its location. (Fig. 15)

I decided to test with Ubuntu Server 18.04.

So this is what I have:

  • Name: ubuntuserver 18.04.
  • Location: E:\hyper-v ubuntu server 18.04\.

Fig.15 - Specify the Name of the virtual machine and its location.

Select the generation of the virtual machine. (Fig. 16)

In most cases, you should choose the second generation, but if you are installing something 32-bit something worth choosing - Generation -1.

For me personally Ubuntu Server 18.04 64-bit with the support UEFI, therefore I choose - Generation 2.


Fig. 16 - Select the generation of the virtual machine.

We select the amount of RAM. (Fig. 17)

My operating system is enough 1Gb RAM=> I leave the default ones included 1024 Mb. Let's go "Further".


Fig. 17 - Allocating the amount of RAM.

We select which switch our network interface will be connected to. (Fig. 18)

Choose our "Hypernet", let's go "Further".


Fig. 18 - Network setup.

Create a virtual hard disk. (Fig. 19)

We indicate Name,Location and maximum Size virtual file HDD.

I have so:

  • Name: ubuntu server 18.04.vhdx.
  • Location: E:\hyper-v ubuntu server 1804\.
  • Size: 10 GB.

Fig. 19 - Creating a virtual hard disk.

Choose ISO image from which we will install the operating system. (Fig. 20)

Select an item "Install operating system from boot image file"-> Click "Review"-> Choose iso image. -> Click "Further".


Fig.20 - Selecting an OS image.

Completing the virtual machine creation wizard (Fig. 21)

Click "Ready".


Fig.21 - Completing the virtual machine creation wizard.

Now in Hyper-V Manager we see a newly created virtual machine - ubuntu server 1804. (Fig.22)

Right-click on it -> "To plug".


Fig.22 - Hyper-V Manager, New virtual machine.

A window will appear (Fig. 23)

If you want to install the system Windows then when you press the button "Start" The installation should start without any errors.

But in order to start Ubuntu Server 18.04 I had to "File" - > "Options"->"Safety" disable "Secure Boot".(Fig.24)


Fig.23 - Connecting to a virtual machine.
Fig.24 - Disable Secure Boot.

Turn on the virtual machine. (Fig. 25)


Fig.25 - Turn on the virtual machine.

Everything is fine, the virtual machine started. The installer meets us Ubuntu Server 18.04.(Fig.26)


Fig.26 - Running virtual machine. Ubuntu Server 18.04 installer.

Changing virtual machine settings.

Let's take a short overview of the virtual machine parameters so that you can see the main functions before you decide to use the virtualization system Hyper-V.

"File" - > "Options".(Fig.27) Fig.27 - Go to "File" -> "Options"

Equipment.

"Firmware"- you can change the boot priority of devices in the virtual machine. (Fig. 28)


Fig.28 - Selecting boot priority.

"Safety"- Can "Switch on switch off secure boot", "Enable/Disable encryption support".(Fig.29)

Fig.29 - Security parameters of the virtual machine.

"Memory"- you can edit the amount allocated RAM, Enable/Disable function Dynamic memory.(Fig.30)


Fig.30 - RAM parameters.

"CPU"- you can edit the number of virtual processors in accordance with the number of processors on the physical computer. (Fig. 31)

You can also distribute the load across "Resource management".


"SCSI controller" can add HDD ,DVD drive or Shared drive.(Fig.32)


Fig.32 - SCSI controller parameters.

You can also change parameters of connected media, for example here we can change inserted into virtual DVD drive ISO image (Fig. 33)


Fig.33 - Media parameters.

"Network adapter" you can change the configuration network adapter: Choose Virtual switch, register VLAN ID, configure Bandwidth.(Fig.34)


Fig.34 - Network parameters.

Control.

"Name"- you can easily change the virtual machine to one more convenient for your use. (Fig. 35)


Fig.35 - Changing the name.

"Integration Services"- Selecting the services that you want to make available to the virtual machine. .(Fig.36)


Fig.36 - Integration services.

"Checkpoints"- Here you can configure Checkpoints( snapshot, restore points), enable auto mode their creation and designate a place for their storage. (Fig. 37)


Fig.37 - Control points.

"Smart Padding File Location"- You can specify the path to the swap file.(Fig.38)

Smart Padding- a function that makes it possible, if there is insufficient memory to boot a virtual machine, to use a swap file on the host.


Fig.38 - Smart Padding file location.

"Automatic startup actions"- You can select the operation that you want to perform with this virtual machine when starting the physical computer. (Fig. 39)

Good afternoon. Thanks to my site, I constantly tinker with the operating system and, of course, over time I began to look for a way so that I could write instructions, but at the same time make fewer changes to the operating system of my work computer... The solution came to an elementary one - a virtual machine. This is an emulation of a completely (or almost completely) working operating system that runs on your operating system. I tried VirtualBox, VMware Workstation and Hyper-V... VirtualBox is free and not as user-friendly as the other two. VMware Workstation is excellent in all respects, but is paid. Hyper-V is a completely balanced virtual machine, which migrated from server operating systems to Windows 8 and simply requires turning on for access. Therefore, the choice fell on the latter: simple, free and tasteful. By the way, I have Windows 10 Professional, which is licensed, but I got it for free thanks to Windows program Insider (six months of suffering with bugs and a license in your pocket)).

I’ll probably warn you right away that when you enable Hyper-V components, you will not be able to use other virtual machines. So, let's begin:

Right-click on the corner of “Start” and select “Programs and Features.”

In the left pane, select “Turn Windows features on or off”

Now open the “Start” menu → “All Programs” → look for the “Administration Tools” directory and find “Hyper-V Manager” in it.

By launching it, we will see the virtual machine management console, I already have one created machine on which the music bot for my TeamSpeak server is located. But now we are creating another machine to show how this is done. But first, let's immediately create a “Virtual Network” so that our VM has the Internet. To do this, click on the computer name in the left column, and in the right column select “Virtual Switch Manager”.

I add this paragraph two months after writing the article. That’s because below I described an easier way to connect a virtual machine to the Internet, but I myself use a slightly different one. The difference between them is that in the method described here, the VM gets the main access, and the computer works after it and this is not correct, but it is easier to configure. If you use your computer not only for running virtual machines, select “Internal” → “Create a virtual switch” and check the “Allow identification” checkbox. Internet access is configured using .

On the left select “Create a virtual network switch”, on the right “External” and click “Create a virtual switch”.

Enter a name for the network, in the “External Network” section, select your network adapter and click OK.

Now let's create a virtual machine. Click “Create” - “Virtual machine”.

" New Virtual Machine Creation Wizard“, on the first window just click “Next”.

Specify the name for the future virtual machine. If desired, you can also change the storage location of the virtual machine, I changed the location in the settings so as not to clog the SSD and all virtual machines are stored on one of hard drives. Click “Next”.

Everything is simple here, read what is written if you have motherboard without UEFI support or you are going to install a 32-bit system, then select the first option; if the conditions for using the second generation match your capabilities, select the second generation. I want to install 32-bit Ubuntu for one of the following articles, so I choose the first generation of Hyper-V. Click next.

Amount of virtual memory. In the case of Windows, 2-3 GB for 32-bit systems and 3-4 GB for 64-bit systems are desirable. More does not make sense for a virtual machine, and less can affect the operation of the system. You can also use “Dynamic memory”, in this case the VM will be allocated as much memory as it needs.

We select the size of the hard drive of the future machine and the storage location for its file. According to the needs, for Win 8-10 you need at least 25GB. I use Ubuntu with a lot of reserve.