Monday, 16 July 2012

Create and setup a VM in Hyper-V

Create and setup a VM in Hyper-V

Hyper-V is a role in Windows Server® 2008 and Windows Server® 2008 R2 that provides you with the tools and services you can use to create a virtualized server computing environment.
This type of environment is useful because you can create and manage virtual machines, which allow you to run multiple operating systems on one physical computer and isolate the operating systems from each other. 

This guide introduces Hyper-V by providing instructions creating and configuring a virtual machine.
Hyper-V has specific requirements. Hyper-V requires an x64-based processor, hardware-assisted virtualization, and hardware data execution prevention (DEP). 

Hyper-V is available in x64-based versions of Windows Server 2008—specifically, the x64-based versions of Windows Server 2008 Standard, Windows Server 2008 Enterprise, and Windows Server 2008 Datacenter. 

For more information about the requirements, see the Hyper-V installation prerequisites

Create the VM Network

In Hyper-V Manager, in the Actions pane, click Virtual Network Manager. Virtual Network Manager opens.

First, create a virtual network that virtual machines can use to connect to the Internet:

·       In the list of virtual networks, click External, and then click Add.

In the Name box for the new virtual network, change the name to External Network.
If you have more than one network adapter installed in the virtualization server, in the list of external network adapters, click the network adapter that you want your virtual machines to use
To create the new virtual network, click Apply. If the Apply Network Changes dialog box appears, review the warning information, and then click Yes.

You can create similar such Virtual Networks as shown below. I have created one External Network for Internet connectivity and a Private Network for internal VM connectivity.

To close Virtual Network Manager, click OK.

Create a Base Virtual Machine

After you create the virtual networks, you can create virtual machines and connect them to the virtual network that you want them to use. The first virtual machine that you create will be a base virtual machine that you can then use to create new virtual machines. You create the new virtual machines by exporting the base virtual machine, instead of creating each new virtual machine from scratch.

Create a new virtual machine as follows:

In Hyper-V Manager, in the Actions pane, click New, and then click Virtual Machine. The New Virtual Machine Wizard opens.

On the Before You Begin page, click Next 

On the Specify Name and Location page, in the Name box, type Base Virtual Machine, and then click Next.

On the Assign Memory page, in the Memory box, type 512, and then click Next. 

NOTE: If your virtualization server has enough RAM installed, you can assign more memory to the base virtual machine. Adding more memory might improve the performance of the base virtual machine. However, you might want to assign the minimum of 512 MB of memory to the base virtual machine, so that you can run several virtual machines on your virtualization server. It is important to note that the amount of memory assigned to each virtual machine can be adjusted later, according to the number of virtual machines that you want to run at the same time.

On the Configure Networking page, in the Connection list, click External Network, and then click Next.

On the Connect Virtual Hard Disk page, leave all the default settings unchanged, and then click Next.

On the Installation Options page, choose the method you want to use to install the operating system:
  • Install an operating system from a boot CD/DVD-ROM. You can use either physical media or an image file (.iso file).
  • Install an operating system from a boot floppy disk.
  • Install an operating system from a network-based installation server. To use this option, you must configure the virtual machine with a legacy network adapter connected to an external virtual network. The external virtual network must have access to the same network as the image server.

On the Completing the New Virtual Machine Wizard page, click Finish.

The new virtual machine is created and listed in Hyper-V Manager under Virtual Machines.

NOTE: If you are using VMware Workstation for this tutorial, you may run into an error while powering on the VM.

Error stated (Hyper-V error ID 20144)

The Virtual Machine Management Service failed to start the virtual machine '%machinename%' because one of the Hyper-V components is not running (Virtual machine ID %ID_of_the_virtual_machine%).

After reading a lot of docs there is one thing to do if you want to run nested VMs.

Edit VMX configuration file of virtual Hyper-V server and at the end add the following line:

hypervisor.cpuid.v0 = "FALSE"

NOTE: both the Virtual Machine as well as the VMware Workstation must be closed. After adding line, power on virtual Hyper-V server and everything will be ok.

You can now power on the VM as shown

You can then install the VM as you would on a normal system

That's it from me for now.. watch this blog space for more such articles on Hyper-V and Microsoft's Private Cloud..


Games 2 Girls said...

Very helpful advice in this particular post! It’s the little changes that make the largest changes. Thanks for sharing!

Heri Wijaya said...

may be useful for all, helpful article once and pardon me permission to share also here

Obat katarak
Cara mengatasi benjolan di kepala
Obat radang usus

nuy herbal said...

thank you very useful information admin, and pardon me permission to share articles here may help Obat darah tinggi tradisional

Nuy Nurhasanah said...

thank you very useful information admin, and pardon me permission to share articles here may help Obat penyakit lambung

Post a Comment

Note: only a member of this blog may post a comment.