Install Hyper-v On Windows Server 2012 R2

To enable Hyper-V (optional) under Windows Server 2012 R2 complete the following steps: Start Server Manager console; In the Configure this local server area of Server Manager main window, click Add roles and features; Click Next three times to get to the Select server roles page. Check the box next to Hyper-V and click Add Features. Note: If you have connected your Server Manager to another server you could install Hyper-V remotely to that server is you are running Windows Server 2012 or Windows Server 2012 R2. On the Select server roles, select Hyper-V, when the Add features that are required for Hyper-V appears, click Add Features. On the Select server roles.

I/ Introduction

The feature installation will run and if all goes well your server will reboot then come up with the full GUI version of Server in 10-20 minutes. Install-WindowsFeature Server-GUI-Mgmt-Infra,Server-GUI-Shell -Restart -Source wim:e: sources install.wim:4.

In this blog post I will go through the steps to create a portable Hyper-V server. We will prepare a USB drive to store the Server Operating System so that we can boot this USB up from a random server hardware should we need a Hypervisor urgently.

As you know, Hyper-V Server 2012 R2 is a free Hypervisor provided by Microsoft. It is a standalone server with only the Hyper-V role on it. Although it is free, it has all the bells and whistles that the Hyper-V server role in Windows Server 2012 R2 has.

II/ Preparation

In this lab, we will need three things:

  1. Hyper-V Server 2012 R2. Download this file: 9600.16384.WINBLUE_RTM.130821-1623_X64FRE_SERVERHYPERCORE_EN-US-IRM_SHV_X64FRE_EN-US_DV5.ISO from: http://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2012-r2
  2. Windows AIK for Windows 7 downloaded here: http://www.microsoft.com/en-ca/download/confirmation.aspx?id=5753 (the file you download will be KB3AIK_EN.ISO).
  3. Windows 7 Workstation (in this post I used Windows 10 Technical Preview Workstation).

III/ Step By Step Instructions

Step 1: Installing .NET and Windows AIK

In the Control Panel, click Programs and Features; turn on the .NET Framework 3.5. This will include .NET 2.0 and 3.0. .NET 2.0 is a prerequisite of Windows AIK setup.

The installation of .NET Framework 3.5 requires a reboot.

After rebooting, we need to install Windows AIK for Windows 7. Mount the KB3AIK_EN.ISO file. Run the StartCD.exe file.

Choose Windows AIK Setup.

Click I Agree to accept the license.

Note the installation Path and click Next.

Click Next.

Click Close when done.

Step 2: Copy the Install.WIM file.

We need to copy the INSTALL.WIM file from DVD Sources of the Hyper-V Server 2012 R2 to a temporary location, for example, C:Tmp.

Copy this file:

Paste it in C:Tmp (you have to create the Tmp folder first).

Ensure that the file is pasted correctly.

Step 3: Create a VHD using Diskpart and also show the VHD Drive.

Change the directory to C: (Root directory) and then create a temporary directory called HVBOOT to store boot files for Hyper-V.

Run diskpart to create a VHD file; at the command prompt type:

diskpart

Issue the following command to create a VHD file with volume of 6GB and store that VHD file under C:HVBOOT.

create vdisk file=C:HVbootHYPERV.VHD maximum=6000 type=fixed

Now, select that virtual disk and then create a partition and attach the VHD file we just created, we will it as V: drive (V: stands for Virtual – but it does not matter).

select vdisk file=c:hvbootHYPERV.VHD

attach vdiskDownload quickbooks for mac free.

create partition primary

assign letter V:

Now format the drive

format quick fs=ntfs label=MYHYPERV

Note that now the new 6GB drive shows up under the Computer tree. This drive is the Virtual Disk that we created.

Type exit to quit diskpart

At this point, we should have a V: drive showing up which is a virtual disk with volume of 6GB. We will now insert the Hyper-V image (Install.WIM) into the VHD that we created and then detach the HYPERV (V:) drive. We cannot simply use copy/paste to insert the Hyper-V image into the VHD. Rather, we will use the ImageX utility inside Windows AIK tools to do that.

Change to this directory:

cd “Program FilesWindows AIKToolsx86″

Type the following command to apply the Hyper-V install image (called Install.Wim that you copied to C:Tmp earlier) to the V: drive.

ImageX /Apply C:TmpInstall.WIM 1 V:

Ensure that we get 100% success.

Now we will use diskpart to unmount the V: drive. Type the following four commands:

diskpart

DISKPART> select vdisk file=c:HVBOOTHYPERV.VHD

DISKPART> detach vdisk

DISKPART> exit

Step 5: Insert USB key, format the USB drive and insert the VHD file to it

Insert a USB drive and use diskpart to determine the disk number before formatting.

diskpart

list disk

In my case, it shows the USB as disk 4.

We are going to select the disk, create a partition, set the partition to be active, format this USB drive with NTFS partition and assign drive letter Z: to it.

select disk 4

clean

Enable Hyper V On Windows Server 2012 R2

create partition primary

select partition 1

active

format quick fs=ntfs

assign letter=Z

exit

After all of the above commands, we will have an empty USB drive (Z:)

Now we are going to copy the VHD file (C:HVBOOTHYPERV.VHD) to the USB drive (Z:). Paste it to the USB key.

Step 6: Create MBR (Master Boot Record) and copy all the boot files to the USB.

For this task we will use the BOOTSECT tool (in the Windows AIK) to create MBR for the USB. Depending on the server architecture, change directory to:

CD ”C:Program FilesWindows AIKToolsPETools x86”

Type the following line to create MBR for the USB (Z: is the USB drive):

bootsect /nt60 Z: /force /mbr

Now, attach VHD again to create BCDBOOT for the next step.

Diskpart

Select vdisk file=Z:HyperV.vhd

Attach vdisk

Exit

Copy the system files from the Hyper-V’s Windows directory (which is the V: drive at this point) into the USB (Z:) drive.

bcdboot V:Windows /s Z:

Step 7: Disable Paging file and then detach HyperV.VHD

Install Hyper-v On Windows Server 2012 R2

Load the Registry:

Reg load HKLMHyperVTemp V:WindowsSystem32ConfigSystem

Remove paging file (replace the value by an empty value)

C:>reg add “HKLMHyperVTempControlSet001ControlSession ManagerMemory Management” /v PagingFiles /t REG_MULTI_SZ /d “” /f

Delete page files

C:>reg delete “HKLMHyperVTempControlSet001ControlSession ManagerMemory Management” /v ExistingPageFiles /f

Unload the registry

C:>reg unload HKLMHyperVTemp

Now we can detach the VHD file using diskpart.

Diskpart

Install Hyper-v Manager Windows Server 2012 R2

Select vdisk file=Z:HyperV.vhd

Detach vdisk

exit

Step 8: Verification

Now plug the USB drive to a computer and boot it up from the USB. Ensure to change the boot device sequence in your motherboard BIOS.

Install Hyper-v On Windows Server 2012 R2

The first time you boot it up, the OS will prompt you to change the Administrator’s Password. You should do so at this point.

After all that, we will need to change the Computer Name, configure TCP/IP network settings, Firewall Settings, Date and Time Settings, TimeZone Settings, etc…

Yes, you can run 1 VM.

from page 8

'Windows Server 2012 R2 Essentials as its own Hyper-V host. With previous versions of the Windows Server Essentials edition, it was necessary to obtain a hypervisor separately in order to run as a virtual machine—options included the free Microsoft Hyper-V Server or using Windows Server Standard edition to run Hyper-V. With Windows Server 2012 R2 Essentials, the product licensing terms have been expanded to enable you to run one operating system instance on the physical server in order to run Hyper-V, plus a second instance on that server in order to run Essentials as a virtual machine. Installation wizards have also been created to simplify the process of deploying as a virtual machine by automating the steps necessary to set up and configure the host server environment. This makes it easier than ever before to take advantage of Hyper-V and its features, such as Live Migration and Hyper-V Replica.'

Enable Hyper V Role In Windows Server 2012 R2

0