Friday, 15 January 2016

How to Run Hyper-V in vSphere 5.5


How to Run Hyper-V in vSphere 5.5 :- 





VMware vSphere has the special ability to nest hypervisors, e.g. Host a Hypervisor as a virtual machine. But it is not enabled by default; if you try to add the Hyper-V role to a Microsoft Windows Server, you will receive the following error message:-
 
Hyper-V cannot be installed: A hypervisor is already running.
2014-12-10-12-39-23-Greenshot.jpg
 This is correct, because this virtual server FS01, is being hosted by a VMware vSphere (ESXi) 5.5 Server.


Shut down the virtual machine, because we need to edit the virtual machine configuration settings (the VMX file).

2014-12-10-13-17-13-Greenshot.jpg
At the VMware vSphere (ESXi) inventory, Remove the Virtual Machine from the Inventory. To do this, Right Click the virtual machine, and select Remove from Inventory.

2014-12-10-13-22-21.jpgThe next few steps can be done in many different ways. Essentially, you need to edit the virtual machine VMX file on the VMware vSphere ESXi host server. I've listed some methods here: 
 
  1. Download the VMX file using the datastore browser, edit the VMX file in Windows notepad, and then upload the VMX file back to the host, overwriting the original.
  2. At the ESXi console, or remoely via SSH, edit the VMX file using vi.
  3. Use WinSCP, connect to the VMware vSphere (ESXi) server and edit the file directly.

I'm going to demonstrate Option 3 in this tutorial. It's quicker.

Download WinSCP from here - http://winscp.net/eng/index.php and start WinSCP. Enter the 
 
  • hostname, IP Address or fully qualified domain name (fqdn)
  • username
  • password

and Click Login to login and connect to your VMware vSphere (ESXi) host.

WinSCP.jpg
Select the virtual machine machine datastore and folder. In this tutorial, the virtual machine is stored on datastore /vmfs/volumes/nfs_datastore8_dcs_san2a

WinSCP1.jpg
Right Click the vmx file in the right hand pane. In this tutorial the file is called fs01.vmx and click Edit:

2014-12-10-14-29-02-FS01---WinSCP.jpg
Notepad will launch, add the following lines to the VMX file
 
vhv.enable = "TRUE"
hypervisor.cpuid.v0 = "FALSE"
 Open in new window

2014-12-10-14-41-08--vmfs-volumes-2868ea
Save the file, and exit WinSCP. Browse to the location of the virtual machine folder on the datastore, and register the VMX file with the Inventory.

Right Click the VMX File > Add to Inventory

2014-12-10-14-45-00-vcenter.net.dcs.hull
TOP TIP: If the files icon appears like a "blank notepad" -- examples of this are the files beneath the FS01.vmx file -- the VMX file you have updated is not correct or corrupted. This could be something as simple as missing quotation marks!

Power-up and start the virtual machine.

2014-12-10-14-56-01-FS01.jpg
Login to the server, and add the Hyper-V Role. Select Add roles and features


2014-12-10-15-33-32-FS01.jpg
Click through the wizard, and select the Hyper-V role.


2014-12-10-15-39-03.jpg
Click Add Features.


2014-12-10-15-43-48-Greenshot.jpg
Follow by Next to continue (it's at this point usually the error message is displayed, 
Hyper-V cannot be installed: A hypervisor is already running.
as shown at the start of this article).


2014-12-10-15-45-06-Greenshot.jpg
Continue with the wizard, and Click Install to complete the installation of Hyper-V. Tick the box to Restart the destination server automatically if required.

2014-12-10-15-49-05-Greenshot.jpg
The installaton will start.


2014-12-10-15-50-46-Greenshot.jpg
A Progress bar is displayed as installation progresses


2014-12-10-15-51-22-Greenshot.jpg
A Progress bar is displayed as installation progresses.


2014-12-10-15-51-40-Greenshot.jpg
The server will restart to add the Hyper-V role and features.


2014-12-10-15-52-02-Greenshot.jpg
Click the Hyper-V Manager icon on the start menu.


2014-12-09-16-26-12-Greenshot.jpg
The Hyper-V Manager will show the Inventory. You are now ready to create virtual machines.


2014-12-10-15-55-41-Greenshot.jpg
Congratulations you have successfully ENABLED and RUN Microsoft Hyper-V in a VMware vSphere Virtual Machine.

No comments:

Post a Comment