NAKIVO Blog

Hyper-V Role Installation, Remote Management and more

Previously, we looked at getting the Windows Server 2016 operating system installed as a Server Core installation and the initial configuration of the server. Now, let’s take a look at installing the Hyper-V role onto the new Server Core OS. Once rebooted the server from the computer name change/domain join, we will want to install the Hyper-V role which is accomplished by running a command from powershell. At the command prompt, type powershell to launch powershell and then type the following command:

Install-WindowsFeature -Name Hyper-V -Restart

Install-WindowsFeature -Name Hyper-V -Restart

Administration of Server Core

Administration of Server Core requires that you use an administrative workstation or server to connect using Hyper-V management tools or other MMC consoles for various configuration since these management utilities are not built into the Server Core install. If you are using a workstation OS such as Windows 10 for administration, you will need to download the Remote Server Administration Tools or RSAT to use the Hyper-V management tools. Windows Server 2016 OSEs will already have the binaries installed for Remote Administration Tools, however, the Hyper-V Management Tools will need to be activated in Server Manager under Features. Also, you will find that various firewall rules may need to be enabled on the Hyper-V server to allow connectivity from the management workstation or server.

Hyper-V Role: Storage Configuration

If you have additional dedicated storage that you would like to bring online to be used for VM storage, this can be accomplished with the diskpart utility. I had provisioned a 1TB hard drive in the lab host in this example. Using diskpart commands below we can bring the disk online, convert to GPT disk, create a partition, and format the file system.

DISKPART〉 list disk DISKPART〉 select disk 〈disk number〉 DISKPART〉 online disk DISKPART〉 attributes disk clear readonly DISKPART〉 clean DISKPART〉 convert gpt DISKPART〉 create partition primary DISKPART〉 select volume 〈volume number〉 DISKPART〉 format fs=refs label=VMs quick DISKPART〉 assign letter d DISKPART〉 list volume Hyper-V role: Storage configuration

If you want to use Disk Management for remote administration of the Core Installation of Hyper-V server, you need to add a firewall exception.

Netsh advfirewall firewall set rule group=”Remote Volume Management” new enable=yes

Microsoft Windows - Firewall exception: Remote Volume Management

***Note*** This command will have to be run on both the Server side and the client from which you are wanting to connect using the disk management MMC console (if the Windows firewall is running on the client as well).

Hyper-V Settings

Once we have our storage purposed for VM storage online, we can modify the Hyper-V Settings on the server. To do this, we can launch the virtmgmt.msc console on either our Windows management workstation or Server OS. This will launch the Hyper-V Manager.

Hyper-V Manager

From here we can set up our Hyper-V Settings and Virtual Switches. One thing we want to do is to change the default location for our Virtual Hard Disks and configuration files. We need to change the default location on the system drive to our dedicated storage for performance, administration, and best practice. As you can see below, we have changed the Virtual Hard Disks as well as the Virtual Machines configuration location to our new volume mounted as D:\ in Windows. Now we have our VMs located on our dedicated storage for virtual machines.

Hyper-V settings: storage for virtual machines

From a storage point of view on our standalone host, we have storage mounted and configured as well as Hyper-V utilizing the new location for storing the virtual hard disks and configuration files. Next, critically important is the configuration of the host networking and virtual switch. In the next post, we’ll see how we can configure our Hyper-V networking.