Before installation, make sure that your processor supports hardware virtualization technology Intel VT-X or AMD-V.
Download a distribution kit hyper-v server 2008 R2 from Microsoft official website (no registration required). Then record image on DVD or make installation flash drive.
Insert the disc/flash drive and boot form it.
Installation Window suggests to select the language of operating system. Select English or any other convenient for you language.
Then press “Install now”. Read and accept the license agreement.
Select Custom installation.
At this stage installation wizard suggests to configure parameters of hard drive’s partitions. The best way is to create 2 logical disks. First one to install hypervisor itself, 15 GB will suffice. Second one for storing containers of virtual machines (VM). Therefore, it will be much easier to manage VM import and migration. Press “Next” and its tea time. During the installation computer will restart several times.
Basic configuration and remote access
After restart Hyper-V will suggest to set administrator’s password. Since the group policy of MS Windows 2008 Server R2 by default has a requirement concerning password difficulty, you will have to think of a password over 6 symbols and containing capital letters and special symbol or a digit (for example “Password1”).
After operating environment is loaded OS suggests 2 management consoles. Standard management console cmd and console with pre-installed options. First of all you need to assign a static IP address and configure remote control over server. Select point 8 in management console.
It will list network adapters. Select the necessary and enter its index. Then select “1 — configure an IP address of network adapter”. Enter S – which means static IP address. Lets set the parameters for example:
IP address — 192.168.1.100
Subnet mask — 255.255.255.0
Default gateway – 192.168.1.1
After parameters have been set, go back to sub menu which will list previously entered settings. If everything is correct, go back to the main menu.
Now lets configure remote access. Select item 7, then turn on remote desktop by entering E. When asked about restricting connections from RDP clients of old versions, select 2 – connect from any client.
Select item 9 in the main menu and set actual data and time on server.
Server’s network name and workgroup
Now lets configure a workgroup. For Hyper-V Server’s operation I did not include it in domain, which complicates configuration but is really good for experimenting. It is better to isolate tested machines from the destination network during tests and checking different configurations.
Select item 1, then “connect to workgroup” by entering W. Then set the name of workgroup, for example, “test”. It is important that the name of workgroup on Hyper-V Server and PC (from which we plan to control it) matched. Then go back to the main menu.
It is advised to set server’s network name, select item 2 and enter the name, for example, “hyper-srv”. To apply parameters you need to restart, agree when prompted.
Here after we will show the settings that we had during installation process (like name of computer, workgroup, users, IP address, etc.), do not forget to use them as well.
After restart we can connect to server using remote desktop client. Select Start -> Run, enter mstsc. Set the IP address in the first field (in our case 192.168.1.100), connect. Server will request authorization data, enter username “hyper-srv\Administrator” and password “Password1”.
So, we are connected, now we need to configure additional parameters of remote control. Go to item 4. Now select subitems 1,2 one after another and wait until configuration is over. After it is over, OS will restart again. Upon completion of these settings we will be able to connect to server with the help of mmc console and Hyper-V Server manager from Remote Server Administration Tools (RSAT).
Installation of RSAT and Hyper-V Manager
For convenient remote server management (creating/deleting/importing/configuration of VM, adding/deleting equipment, managing users/group policies, etc.) you will have to install RSAT to your PC. In this case we will install it in Windows 7. First of all download it. In this package we need only “Hyper-V Manager” for mmc console — it is the main tool for managing future VMs.
All other configurations you will have to perform both on the server (SRV) and your control computer (CC).
First of all you need to create a user, on behalf of which you will manage and control. Usernames and passwords shall match for SRV and CC!
On SRV — select item 3 in management console (adding local administrator). Set the name “admin” and password “Qwerty1”. Check whether is has been added successfully, enter net user admin in cmd console. This command will show you that he is in “Administrators” and “Users” groups.
On CC — run the cmd console on behalf of administrator and then run net user admin Qwerty1 /add, add it to the group of administrators net localgroup Administrators admin /add. Now lets again check the results with the help of net user admin.
There is a great tool called “HVRemote” which will help configuring users and security groups. Download this tool and copy the file “HVremote.wsf” to the server.
On SRV — run cmd console, go to script file folder (we saved it in disk C: root). Run cscript hvremote.wsf /add:domain\account, where domain – is your server’s name (domain), account — name of account for control/management. In our case the command will look like: cscript hvremote.wsf /add:hyper-srv\admin.
As a result, you will have something like on the screenshot. Script has added user into necessary groups and assigned rights to it. Run the following command in CC: cscript hvremote.wsf /anondcom:grant and cscript hvremote.wsf /mmc:enable.
For operation of console snap-ins of remote computer management you need to create filter rules in server’s firewall. First of all lets create a rule enabling you to manage logical disks:
Netsh advfirewall firewall set rule group="Remote Volume Management" new enable=yes.
If you have an error like “Group cannot be specified with other identification conditions” — try retyping the command manually, instead of copy/paste.
The result of successful command execution:
Updated 3 rule(s).
Then allow firewall remote management: Netsh advfirewall firewall set rule group="Windows Firewall Remote Management" new enable=yes.
Updated 2 rule(s).
Lets allow access for any mmc console snap-ins: netsh advfirewall firewall set rule group="Remote Administration" new enable=yes.
Updated 3 rule(s).
Lets allow using “Windows Management Instrumentation (WMI)” by running the following command:
netsh advfirewall firewall set rule group="windows management instrumentation (wmi)" new enable=yes.
Updated 4 rule(s).
Allow icmp protocol — netsh firewall set icmpsetting 8.
Allow access to extended files and folders:
netsh firewall set service type=fileandprint scope=subnet.
If for some reasons you cannot connect to server, try turning off firewall by running:
netsh firewall set opmode disable
Perhaps, you will have to create additional access rules.
Now we can use mmc snap-ins for server management (managing services, users, policies, etc.) and what’s most imporant is Hyper-V Manager. Lets open it: run mmc console -> file -> add or remove snap-in -> Hyper-V Manager. Select menu Action — > connect to server -> other computer. Write network name of your server (hyper-srv) and connect.
This is it, we have successfully installed and configured our Hyper-V Server. Now you can go ahead and have virtual machines and various services.