A small background to the question that I want to tell. In our organization, the Internet is distributed through usergate - a maximum of 40 people at a time. In the past six months, the problem has escalated. Increasingly, a page appears in the Internet browser, which says that you need to stand in line for the Internet.
Two years ago I made a test version of the proxy server. Made it on Zentyal 3.3, via squid. I went on vacation, I came - the test machine was gone. Since the problem wasn’t so acute, I was beaten about it for a while, and there was simply nothing to build a new proxy on.
At the end of the year before last, we had a new server for 1C with a powerful iron, on which a virtual machine may well spin, and not one at the same time.
')
Read repeatedly on Habré, how to set the role of Hyper-V, how to configure the network. At the same time there were few useful publications. Why? So I'll show you now.
January 30 of this year decided to put the role of Hyper-V on the server. On the same day, I installed a technical preview of Windows 10 on my working machine in order to see what was there and how, and put Hyper-V on my machine. But it was upset: Intel Core 2 Duo E8400 does not support Hyper-V virtual machines.
It was the first "cant": not on every computer where you can put Windows 8 and 10, you can run the hypervisor.
Attempts to put ClearOS from a USB flash drive on a personal machine were unsuccessful.
All this prompted me to install a hypervisor on an accounting server.
Started installing the role, chose
one network card from two physical ones only. It was just a "cant": as it turned out later, it was far from the last,
but the most important one.
In this choice, only one virtual network switch was created for the selected physical network card. After installation, the hypervisor did not allow to create another virtual switchboard, did not allow the second network card to be put into operation via the existing virtual switchboard created for one physical network card.
To be simple, when the hypervisor is installed and you have two or more physical network cards, you need to select them all to create virtual switches. What for? When creating a virtual switch, settings from the physical network card disappear, the card can be used simultaneously by several virtual machines.
In my case, the data was copied from only one network card, while the second, just like the first, stopped working as usual. The Hyper-V role in the network card settings can be deleted, but it will also be removed from the other network cards.
The virtual switch is turned on and off only by ticking it; turning it on again by turning off this switch in hidden devices results in a blue screen of death. Another achivka - caused the blue screen of death on the server 2012.
It can also be deleted only through the virtual switch manager, other methods of deletion lead to problems.
It was my next “cant”, after removing the Hyper-V role from the network card, everything became as it was before the installation of the hypervisor. But I could no longer connect to the Virtual Switch Manager. It was clear that somewhere in the registry all this hangs and does not allow to recreate everything anew.
Another jamb: deleted virtual machines that used a virtual switch. Hypervisor stopped working. I registered the settings in the network card - but the server also stopped working normally from this. It was impossible to go to it, to the shared folder, it was impossible to go to it from the network. And again, dancing with a tambourine: most likely, it was not included “client for Microsoft networks”, but I don’t want to check now. How to make these mistakes specifically for the purpose of taking screenshots of the screen.
After that, I thought to restore the Windows server through the recovery points. But I decided to try reinstalling the hypervisor role.
Where so many shoals? All predetermined wrong choice of network cards. It is necessary to choose all the physical and most likely non-physical too (the next "school"). When the virtual switch works, it becomes an interlayer between the programs and the hardware. But since I chose only one, and the virtual switch actually brought the second network card out of work (oops, I don’t remember exactly if it worked for me with the second one). Virtual machines did not see the local network through an external network card and this made me dance with a tambourine.
After removing the role of the hypervisor, I set it up again. But I have already chosen all the physical network cards and made a mistake again. I think the Hamachi virtual network adapter would also have to be chosen. Now, after installing two virtual switches for each physical network card from a virtual machine, I see a network from a virtual machine, and from the network you can see a virtual machine.
Conclusion
If you have chosen only one network card, and you have two or more of them, then it is better not to dance with a tambourine, trying to connect through the internal network card and nat. Make it easier - remove and install the role of the hypervisor again, so you will save yourself nerve cells and time, which, like the cells of course. Not every processor is suitable to raise a virtual machine on the embedded hypervisor.
PS ClearOs on the virtual machine did not start up normally - i386 version 6.5, some kind of problem with image display at boot.