Skip to content

Installing Hyper-V Server 2012 on ESXi 5

by Chris Wahl on Sep 5th, 2012 | 4,740 views
windows-logo

Now that Hyper-V Server 2012 has been released, I thought it would be interesting to virtualize it and tinker around in the lab. I found two great posts on running nested hypervisors, one on VirtuallyGhetto (here) and another on Thep Huck (here). However, while the content posted in these locations were enough for me to piece together the whole puzzle, I wanted to lay out the process in a clear and concise manner for those specifically using Hyper-V Server 2012 on ESXi 5. Much of the content on the links I provided go over obstacles that simply don’t exist when using hardware version 8 on ESXi 5 (yay).

Prepare The ESXi 5 Host

Your first step is to follow the directions outlined in this post by William Lam. We need to set a configuration value to True on the host itself, which can be done without a reboot.

Either use SSH or the DCUI to connect to the host. Log in as root. Navigate and edit the config file located here:

/etc/vmware/config

To do so, I used the VI command:

vi /etc/vmware/config

Then, press the “i” key to change to Insert mode. Navigate to the last line in the file and insert a new row. Add the following:

vhv.allow = "TRUE"

Then, press the ESC key to leave Insert mode and type the following to write the changes and quit the VI editor.

:wq

Create The Hyper-V Server 2012 Virtual Machine

The next step is to create the virtual machine for Hyper-V Server 2012. Create a new VM and choose to do a “Custom” configuration. Accept the defaults and your own personal preferences except were noted below:

Virtual Machine Version

Make sure to use Version 8 for the virtual machine version. This assists in a number of tweaks that were required with Version 7 but are handled by 8.

Guest Operating System

For now, just choose “Other” and “Other (64-bit)” as the Operating System. Later, we will change it to ESXi 5 (64-bit), but that option is not available while creating the VM.

Network Connections

You’ll need to use the E1000E adapter for the network. I decided upon 2 NICs.

SCSI Controller

Go with the LSI Logic SAS controller, which has been the default choice for Windows since 2008.

Edit The Virtual Machine

Finish answering any other questions required to create the VM. Once it has been created and placed into your inventory, do the following edits:

Edit Guest Configuration

Edit the VM, click on the Options tab, then click on the “General” Settings item. In the lower right corner there will be a “Configuration Parameters…” button. Click it, then add a configuration entry to the VM with a value of FALSE by using the “Add Row” button.

hypervisor.cpuid.v0

Change Guest Operating System

Edit the VM, click on the Options tab, make sure the “General Options” setting is highlighted, and change the Guest Operating System type to “VMware ESXi 5.X” as shown below.

Insert the Installation DVD

As a final step, insert the install ISO and power on the VM. I put the media on a datastore and mounted it to the VM.

The installation process of Hyper-V Server 2012 is rather straight forward. Just follow the prompts to complete the install. Make sure to dismount the DVD / ISO once finished.

Below is the finished product showing the installation of Windows 7 on a Hyper-V VM. :)

Update 11/20/2012 – ESXi 5.1 Required Step

If you’re using ESXi 5.1, there’s one thing you’ll have to do in order to get this to work. It’s documented in a few places, but notoriously difficult to pin down exactly unless you know what the error is in the first place (which means you are probably frustrated right now). When trying to install the Hyper-V role the error is:

The processor on this computer is not compatible with Hyper-V. To install this role, the processor must have a supported version of hardware-assisted virtualization, and that feature must be turned on in the BIOS.

Before you power on the VM (if you powered it on, power it off) you’ll need to check a box in the vSphere Web Client. The old “thick” client will not work!

Edit the VM from the vSphere Web Client and expand the “CPU” field. Check the box for “Hardware virtualization”. I’m including a photo below of my Hyper-V 2008 virtual machine.

Make sure to accept the change. Now you can power it on and install the Hyper-V role.

Installing VMware Tools

If you’d like, you can also install the VMware Tools on the Hyper-V Server 2012 VM.

First, mount the tools ISO to the VM. Click on the “Connect to ISO image on a datastore…” option, then navigate to vmimagestools-isoimageswindows.iso file.

Then, from the console of the Hyper-V VM, click on the cmd prompt window. Change to the D: drive and launch Setup64.exe.

Follow the VMware Tools installation GUI prompts. Once finished, you will be asked to restart the server.

Troubleshooting

If you forget to modify the host as described in the first section, you will get this error when you try to power on a VM: virtual machine could not start because the hypervisor is not running(Microsoft KB 2490458)

Make sure to edit the ESXi host’s config file and add the entry vhv.allow = “TRUE” entry.

This means that you forgot to edit the ESXi host config file

Also, don’t vMotion the VM around. It tends to get cranky and stop responding.

Thoughts

While this process has been documented in a few place, I felt some clarity was in order to streamline things, and to emphasize that this process works for the newly released Hyper-V Server 2012.

From → Tech Guides

11 Comments
  1. Luigi Tiano permalink - Sep 5th, 2012

    Thanks for the info Chris. I was actually looking to try this in our lab as well.

  2. Luke permalink - Sep 5th, 2012

    Good step-by-step walk through. I saw you in passing at VMworld and meant to say hi. Turned around and you were gone. Thanks for the ping back. Fyi, it’s ThepHuck (pronounced Tep Huck), although everyone reads it how you posted it. Makes it memorable at least :-)

    • Chris permalink - Sep 5th, 2012

      Haha, my bad. I’ve corrected the spelling. I tend to dart around a lot at VMworld, so much to do. :)

  3. It’s worth noting this also works in Fusion by toggling the vhv.enable = TRUE param. Check out how vSamurai did this on an all-in-one Mac Mini setup. Pretty sweet stuff!

    -Nick from NetApp

  4. Paul Braren permalink - Sep 16th, 2012

    Great article, Chris!
    Any chance you’ve had a chance to try this on ESXi 5.1 yet?

    FYI, following these exact instructions gets this error on first reboot of the “Microsoft Hyper-V Server” VM as it nears the end of the install:

    “Windows failed to start.”
    Status: 0xc0000001

    • Chris Wahl permalink - Sep 16th, 2012

      I have not yet upgraded the lab to 5.1, but I have done this on 5.0 u1 in both my work lab and home lab successfully.

      • Paul Braren permalink - Sep 16th, 2012

        Thanks Chris (and so sorry about the duplicate posting, seems to be a lag, so I had thought the first one didn’t make it through).

  5. Chris Wormald permalink - Sep 21st, 2012

    Got the same problem as Paul with ESXi 5.1 and Hyper-V 2012 :
    “Windows failed to start.”
    Status: 0xc0000001

    Any ideas?

    Thanks

    Chris

  6. Chris Wormald permalink - Sep 21st, 2012

    Investigated the ESXi 5.1 and Hyper-V 2012 problem a bit further and it looks like adding the following to the configuration parameters seems to get past the problem:
    hypervisor.cpuid.v0 = FALSE

    Thanks

    Chris

    • Chris Wahl permalink - Sep 21st, 2012

      Glad you worked it out – that is definitely a required step. :)

Trackbacks & Pingbacks

  1. Installing Hyper-V Server 2012 on ESXi 5 [Video] | Wahl Network

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS