Install & Configure Hyper-V and create a Virtual Machine.

Brief Description of Hyper-V:

Hyper-V enables you to create a virtualized server computing environment. You can use a virtualized computing environment to improve the efficiency of your computing resources by utilizing more of your hardware resources. This is possible because you use Hyper-V to create and manage virtual machines and their resources. Each virtual machine is a virtualized computer system that operates in an isolated execution environment. This allows you to run multiple operating systems simultaneously on one physical computer.

Steps:

  • Install Roles.
  • Configure Hyper-V
  • Create a Virtual Machine.

Installing the Roles:

Open up Server Manager.Hyperv1

  • Once the server has initialized all its roles then click on Manage as shown above and then click on “Add Roles and Features”

Hyperv2

  • Read through the information (if you knew to this), to continue click Next.

Hyperv3

  • Select “Role-Based or feature-based installation” and click Next.

Hyperv4

  • Leave the defaults and then click Next.

Hyperv5

  • Click on the checkbox next to Hyper-V.

Hyperv6

  • After you have selected the role Hyper-V this window will come up. Click on add Features.
  • Click Next.

Hyperv7

  • On the Feature screen click Next.

Hyperv8

  • You can read the note regarding the install and then click Next.

Hyperv9

  • Make your selection and then click Next.

Hyperv10

  • If you want to allow live migrations then click the checkbox above, otherwise accept the defaults and then click Next.

Hyperv11

  • Specify the default location for your virtual harddisks by clicking the Browse button or accept the default locations and then click Next.

Hyperv12

  • Click the checkbox to “Restart” the server automatically if required.

Hyperv13

  • After you made the selection in the previous section this box will come up. Click Yes.
  • Click Install.

Hyperv14

  • Installation started, you can close this window and then view the install from Server Manager.

Hyperv15

  • Installation complete.
  • Restart your server.

Configuring Hyper-V:

Hyperv16

  • You can open this shortcut either by using Server Manager or going to Control Panel -> Administrative Tools -> Hyper-V Manager.

Hyperv17

  • This is the Hyper-V window that will open.
  • Click on Hyper-V Settings on the right hand side, the screen below will come up.

Hyperv18

  • Here you can change all your settings. Once done click on Apply then OK.

Hyperv19

  • Below Hyper-V settings you have Virtual Switch Manager, Click on it and you will see the screen above.
  • Here you can create your virtual switch. When done click on Apply then OK.

Create a Virtual Machine:

Hyperv20

  • Click on New -> Virtual Machine.

Hyperv21

  • Enter in the name of the new virtual machine, if you want to change the storage location of the VM select the checkbox and then click on browse.
  • Click Next.

Hyperv22

  • Set the memory for the virtual machine and then click Next.

Hyperv23

  • You can select the Virtual Switch you setup earlier or you can leave the VM “Not Connected”.
  • Click Next.

Hyperv24

  • Here you can create a new Virtual Disk. Adjust the size and change the location to suite you otherwise select the defaults and then click Next.

Hyperv25

  • You can install an operating system later or make the selection above, click the browse button to select a valid ISO file. If you want to install from the Hosts physical drive then choose “Physical CD\DVD drive”

Hyperv26

  • The summary screen will show, click Finish to create the virtual machine.

Hope it helps.

Advertisements

Exchange 2010 and Hyper-V 3 VHDX disks

So i decided to installed another Hyper-V server using Windows Server 2012 and i created another Exchange server to add to my DAG. I thought using .VHDX VM’s is great because of all the new features.

Upon connecting the newly created Exchange 2010 server to the existing DAG i noticed that it would not sync. So i dismounted the store, moved all log files to another folder, cleared out the “Passive Copy” folders and let the sync run again.

After 3 hours i had a “healthy” copy, but the CopyQueueLength and ReplayQueueLength would just not clear. I went and checked the log files and Exchange was complaining about a mismatch of the sectors.

I then realized that the newly created .vhdx works differently and has these features:

  • Support for virtual hard disk storage capacity of up to 64 TB.
  • Protection against data corruption during power failures by logging updates to the VHDX metadata structures.
  • Improved alignment of the virtual hard disk format to work well on large sector disks.

The VHDX format also provides the following features:

  • Larger block sizes for dynamic and differencing disks, which allows these disks to attune to the needs of the workload.
  • A 4-KB logical sector virtual disk that allows for increased performance when used by applications and workloads that are designed for 4-KB sectors.
  • The ability to store custom metadata about the file that the user might want to record, such as operating system version or patches applied.
  • Efficiency in representing data (also known as “trim”), which results in smaller file size and allows the underlying physical storage device to reclaim unused space. (Trim requires physical disks directly attached to a virtual machine or SCSI disks, and trim-compatible hardware.)

So i decided on windows server 2012 to convert the newly created VM back to.VHD, after doing this all the queues cleared in a matter of minutes and Exchange was as happy as it could be.

Hyper-V Guest Console just wont open.

Today trying to install an OS on a newly created VM i could not open the console for the guest. It kept giving an error “Cannot connect to virtual machine” and after a few seconds a screen pops up and asks if you want to try again.

Thought it was AV so i uninstalled it. That did not fix anything.

Disabled windows firewall, rebooted, still could not access the VM. I then checked and i could not access any of the other VM’s i had running.

Tried running vmconnect from a command prompt, still did not work.

Dug a bit deeper and opened up IPSEC manager and added in a rule as follows:

I gave it 5-10 min and after that i was able to open up the console of the VM.