How to Install Hyper-V on a Virtual Machine in Hyper-V

How to Install Hyper-V on a Virtual Machine in Hyper-V

  • Comments 53
  • Likes

BEFORE STARTING IT IS IMPORTANT TO KNOW THAT THIS ENVIRONMENT IS NOT SUPPORTED BY MICROSOFT. USE IT ONLY FOR SELF STUDY AND LABORATORY OF CLUSTER OF HYPER-V

Hello everybody, everyday often some information technology professionals ask me if it is possible to install Hyper-V on a virtual machine. We all know that a HYPERVISOR can only be installed and officially supported in production physical servers, this prevents many professionals study and increase your knowledge of Hyper-V.


If you have tried to install the Hyper-V in Windows Server 2008 R2 or 2012 through Server Manager probably encountered the following message: The following message appears preventing you from continuing the process: Hyper-V can not be installed: The hypervisor is already running.

Image01


Now I have good news and bad news for you who are eager to learn how to install the Hyper-V virtual machine. The good news is that through PowerShell you can install but the bad news is that unfortunately you are not able to start the virtual machines, but for self-study lab and is already a great improvement you can create a cluster of Hyper-V and verify in practice how it all works. However I will teach you how to install the Hyper-V as well as the Cluster service.

The first thing you need to do is to open and change the PowerShell execution policy scripts to RemoteSigned then run the following command to install the Hyper-V :

Enable-WindowsOptionalFeature –Online -FeatureName Microsoft-Hyper-V –All -NoRestart

Image02

PS: Do not restart the virtual machine


The above command installs only the hypervisor but does not install the administration tools, so you can manage the Hyper-V within the virtual machine you must install RSAT for Hyper-V to do this run the following command:

 Install-WindowsFeature RSAT-Hyper-V-Tools -IncludeAllSubFeature

Image03

Now I suppose you want to create a cluster then you need to install the Cluster service,  run:   

Install-WindowsFeature RSAT-Clustering -IncludeAllSubFeature

Image04

Optionally you can install Multipath I/O to enable multiple paths to the storage, if this is your case follow:

 

Install-WindowsFeature Multipath-IO

Image05

The image below shows a summary of all commands, simply restart to finalize the virtual machine with the command:

Restart-Computer

Image06

Done ! Now just open the console of the Hyper-V Manager and create a virtual machine, note that I created a virtual machine named VM-VM-INSIDE. Create your cluster and have fun !!!

Image07

DON’T FORGET ! BEFORE STARTING IT IS IMPORTANT TO KNOW THAT THIS ENVIRONMENT IS NOT SUPPORTED BY MICROSOFT. USE IT ONLY FOR SELF STUDY AND LABORATORY OF CLUSTER OF HYPER-V

  • With this - you are saying that you can use a Hyper-Visor, above / on a Hyper-Visor?

    But that is technically imposible, Isn't it....? ;-)

    Regards,

    MPvS

  • Hello Mark. You are right, all hypervisor must be physical, This is just an example to create environments for self-study and testing, is not supported by Microsoft as I wrote in red letters.

  • Awesome, Gilson!!!

    Congrats!

  • Gilsão,

    Excelente post!

    Servirá para uma porção de demos e apresentações.

    Só um adicional: alguns comandos estão com a linha de comando invertida ou sem espaço:

    Enable-Online-WindowsOptionalFeature FeatureName Microsoft-Hyper-V -All -norestart

    Mas, de resto, está Sensacional!

    Parabéns!

  • Olá Alexandro, realmente os comandos estavam invertidos, já corrigi. Obrigado pela observação.

  • That's what .. I filtered on all search engine..

    Thanks a lot Sir.

  • Gilson, isto vale também para máquinas criadas no VirtualBox, pois quando tento inicializar as mesmas, da erro.

    Cénario VirtualBOX, W2012 R2 Preview , Hyper-V.

  • Que bom agora pode deixar de usar em meus labs vmware e utilizar o Hyper-V 3.0

  • hi thank for the information but I should tell you with power shell hyper-v can be installed but New virtual machine cannot be installed. WhateverI tried to create a new virtual machine I received the error that

    "Hyper-v encounterd an error while configuring the network on new virtual machine"  I think it is because the hyper-visor is installed on a virtual machine not on physical hardware , do you have any workaround ?

  • Very Nice!

    Working as expected (and hoped for)

    Thank you for your efforts and even more for the sharing.

  • Great post!!! if it just supported what VMware does about hypervisor pass-through to run VMs within VMs my lab would be heaven.

  • So, i cant start windows phone emulators on a virtual windows 8 device is it right?

  • I don't know why it is impossible to start Virtual Machines in Hyper-V on Virtualized Machine.

    VMWare has a config file which should be edited and after that Hyper-V able to start VMs on Virtual Machine.. that's better for testing and make laboratory to test the failover and much more thing in Hyper-V based Cluster.. I think it's not impossible if VMWare can do it.. :-)

    Before a lot of question regarding my post, here's the link how to use hyper-v in a VMware virtualized machines:

    www.trainsignal.com/.../run-hyper-v-vsphere-5-1

  • I have successfully install Hype-v on two server (i am using Windows Azure Test Environment) now i want to add these Hyper-V in my System Center Virtual Machine Manager but when it to add these newly created Hyper-v it appears in VMM wizard but at the end i can't see any host  / hyper-v in my VMM servers, (i have create 1 VM on each Hyper-V) now i just want to practice my private cloud environment using Windows Azure environment, any suggestions how to do that?  

  • I cannot create VMs I keep getting an error that "Hyper-V encountered an error trying to access an object on localcomputer because the object was not found.  Verify that the Virtual Machine Management service on this computer is running.  If the service is running, try to perform the task again by using Run as Administrator"  

    I am logged in as the Domain Admin.  Not sure why I can't do this?

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment