Installing Hyper-V on Windows Server 2008 Server Core

The Server Core installation option of the Windows Server 2008 operating system installs a minimal server installation of Windows Server 2008 to run supported server roles, including the Hyper-V role. When you select the Server Core installation type option, the Windows setup program installs only the files that are required for the supported server roles. For example, the Explorer shell is not installed as part of a Server Core installation. Instead, you must configure the server locally using the command line. You can read more information about Server Core on my “Understanding Windows Server 2008 Server Core” and “Managing Windows 2008 Server Core Local Settings” articles.

The benefits of using the Hyper-V on a Server Core installation include a reduced attack surface, reduced management, and reduced maintenance.

After you have enabled the Hyper-V role on Server Core, you can manage the Hyper-V role and virtual machines remotely using the Hyper-V management tools. The management tools are available for Windows Server 2008 and Windows Vista Service Pack 1 (SP1).

Download

Hyper-V is a virtualization platform from Microsoft, originally available as Beta 3 on the RTM installation DVD of Windows Server 2008, but the RTM update for Hyper-V is now available for download or from Windows Update (after July 8, 2008).  In order to get the Hyper-V role on Windows Server 2008 you need to install this update. The update package consists of the Hyper-V role, including the x64 version of the remote management tools, and integration services for the supported versions of the Windows operating system. With this update, you can now use Hyper-V in a production environment for supported configurations.

Description of the update for the release version of the Hyper-V technology for Windows Server 2008 – 950050

Note: The Hyper-V role update package is a permanent package. Once you install the update package, you cannot remove it.

Note: Looking at the above link, it might appear like there’s a 32-bit version of Hyper-V. That is NOT correct. The 32-bit download is just for the Hyper-V management tool and connection tool.

The download itself, around 30 MB, can be found here.

Note: You can manage Hyper-V servers from other Windows Server 2008 machines, or from Windows Vista machines. See the following link for the download paths.

Description of the Windows Vista Service Pack 1 Management Tools update for the release version of Hyper-V – 952627

The update that allows the Hyper-V role is for Windows Server 2008 x64 editions, and after installing it you will be able to enable the virtualization role through Server Manager. After the Hyper-V role is enabled, Hyper-V Manager will become available as a part of Administrative Tools. From the Hyper-V Manager you can easily create and configure virtual machines.

BIOS Settings

You must enter the BIOS setup of the server and make sure that “Virtualization Technology” and “Execute Disable” are both set to Enabled.  In most cases, the required BIOS settings can be found in these BIOS sections (actual names may differ, based upon your server’s BIOS settings):

  • Security > Execute Disable (set to On)
  • Performance > Virtualization (set to On)
  • Performance > VT for Direct I/O Access (set to On)
  • Performance > Trusted Execution (set to Off)

Operating System Version and Architecture

In case you were not the person that has initially installed the server, you’d better make sure it supports Hyper-V and that is has the appropriate license to operate it, before starting to install the role. To find out what kind of Windows Server product is currently installed, you to run the following command:

​wmic OS get OperatingSystemSKU

The number that is returned corresponds with Microsoft’s list of SKU numbers for Windows Server. Please ensure that your version supports Hyper-V:

  • 12 – Windows Server 2008 Datacenter Edition, Server Core
  • 13 – Windows Server 2008 Standard Edition, Server Core
  • 14 – Windows Server 2008 Enterprise Edition, Server Core

If any other number is returned, this means that you should not install Hyper-V on this server.

You should also check the architecture of the server installation as well:

​wmic OS get OSArchitecture

The architecture should be 64-bit in order to be able to install Hyper-V.

Installation procedure

Below is the step-by-step on installing Hyper-V on Windows Server 2008 Server Core:

Note: For regular Windows Server 2008 Hyper-V installations please read my Installing Hyper-V on Windows Server 2008 article.

  1. Complete the Server Core installation and initial configuration tasks. These include the following tasks:
  2. Note: All the following configuration tasks need to be done from the Command Prompt. Please read my Managing Windows 2008 Server Core Local Settings article.

  • Setting the administrative password – Use the NET USER command.
  • Configuring the server’s computer name – Use the NETDOM command.
  • Setting a static IP address on all relevant NICs – Use the NETSH command.
  • Activating the server – Use the SLMGR.VBS command.
  • Joining the server to a domain (if required) – Use the NETDOM command.
  • Configure the firewall for remote administration – Use the NETSH command.
  • Enable Remote Desktop for Administration if you want to manage the server running a Server Core installation remotely – Use the SCREGEDIT.WSF command.
  • After you have installed Windows Server 2008, you must apply the Hyper-V update packages for Windows Server 2008 (KB950050). See download links above.
  • Download the Hyper-V updates, copy them either to the Server Core local hard disk or to a network share and then type the following command at a command prompt:

    ​wusa.exe Windows6.0-KB950050-x64.msu /quiet

    Lamer note: Please provide the correct path for the file…

    To view the list of software updates and check if any are missing, at the command prompt, type:

    ​wmic qfe list

    After you install the updates, you must restart the server.

    Important note: Before you enable the Hyper-V role, ensure that you have enabled the required hardware-assisted virtualization and hardware-enforced Data Execution Prevention (DEP) BIOS settings. Checks for these settings are performed before you enable the Hyper-V role on a full installation, but not on a Server Core installation. If you enable the Hyper-V role without modifying the BIOS settings, the Windows hypervisor may not work as expected.

  • To install the Hyper-V role, at a command prompt, type:
  • ​start /w ocsetup Microsoft-Hyper-V

    Note: The syntax for Ocsetup.exe is case sensitive.

  • Add a user or group to the local Administrators group so that they can manage the Server Core installation remotely. To add a user to the local Administrators group, you must first add the user. At a command prompt, type:
  • ​net user <username> * /add

    To add a user to the local Administrators group, at a command prompt, type:

    ​net localgroup administrators /add <user>
  • Restart the server to make the changes take effect. At a command prompt, type:
  • ​shutdown /r /t 0
  • Use a regular installation of Windows Server 2008 or Windows Vista SP1 to remotely connect to the Server Core machine and manage the Hyper-V role on it. You can download and install the Hyper-V management tools from the downloads section above. More about that in a future article.
  • Links