Thursday, December 19, 2013

Windows Server 2012 - Hyper-V - installation of role, creation of a virtual server

Some time ago, I worked with VMware ESXi 4.1. Although the underlying concepts of virtualization are probably similar, Hyper-V is a new world for me. I thought I'd start by simply installing the role and creating a virtual server.

Warning: this will be very basic for anyone having more experience than I with Hyper-V so unless you are interested in how to install the role and create an virtual server, you may prefer other sources, be it other blogs or TechNet articles.


 Installation of the Hyper-V Role

First, we go to Server Manager (which may open automatically on logon) and in the upper right-hand corner, select "Manage" and then "Add Roles and Features". We can click "Next" on the "Before you begin" page. This will bring us to the "Select installation type" page which is shown (in part) below.



Select "Role based or Feature based installation".
 
Note: because of the way images are rendered on Blogger, I usually do not capture - and post - entire screenshots. It might be helpful to follow the steps with the interface open in front of you. It should also be understood that after doing whatever is necessary at a given step, we click on "Next" (or whatever the command might be). I will not waste time specifying "Click Next" for every single screenshot.


In this scenario, I have two servers on which I could install the Hyper-V role. Since "Best Practice" mandates that we "let domain controllers be domain controllers" and do not complicate their management with other roles, we'll select the other server (SVR-003) for our Hyper-V host. This will also illustrate how we can manage remote servers via Server Manager. In the following screenshots, we will, in fact, be acting on SVR-003.






Select Hyper-V for the role, note the features that will be added (include Management Tools), and click on "Next", as shown in the three illustrations below:






We can click "Next" on the "Features" page (I made no additional selections and the Hyper-V role was installed all the same):




On virtual server hosts, there is often more than one network interface (or "NIC"). One may be used for the "production" network (the network that provides services to users) and one may be part of a management network. On the following screens, we have the option to select the interfaces we want to use.




Here I select the adapter:





The next option requires some thought about the future role of the Hyper-V host. As this is a strictly practice environment in which I will not configure a cluster (or probably perform migrations) it does not matter, but in a production network we have to take the following into consideration. In summary, if the server will be part of a cluster, we should not enable the "live migration" function at this point:




On this screen, we configure the location of the virtual machine configuration files and the virtual hard disk files. I have simply created a folder on a separate physical drive of my server. In other environments, the files might be located on a SAN (Storage Area Network):




The following screens summarize the operations to be performed and offer the option to restart the server automatically:








 
Creation of a virtual server

What follows is a simple example of the creation of a virtual server in which I will use a Windows 2008 R2 DVD as the source for the operating system. In reality, it might be more likely that a .iso image file would be used.

First, we open Server Manager, go to "Tools" and select "Hyper-V Manager":



Then (in the Action pane) Actions | New | Virtual Machine:




Note: in fact, there are a couple options here:
  • We can select Action | New | Virtual Machine
  • We can right click on the SVR-003 icon (opposite left-side pane), then "New" | "Virtual Machine"
  • In the Action pane, New | Virtual Machine



The "Before you begin" page informs us that we could create a virtual machine with default values by clicking "Finish", or "Next" to configure custom options. In most cases, we would click "Next" since it is unlikely the default values would suit the various virtual machines we might wish to create. Furthermore, "Next" will allow us to see - and learn - the different options.
 



Now we select a name for the virtual machine. The assistant suggests a name that identifies the role or the operating system. I'll simply name my virtual machine "vSvr-01-W2K8":



Next, we specify the amount of memory to be allocated to the server. 1024 MB should suffice for a practice Windows 2008 (R2) server:



We have to select a virtual switch for the virtual server (the virtual switch connects virtual machines among themselves and also with the physical network):



As for storage, I'll create a virtual disk for the server on the physical E: drive of the host server:



We can install the guest operating right now or later - I'll opt for "later":



The following screen summarizes the guest server configuration:





Now I'll attempt to boot from a Windows 2008 R2 DVD (we could also use an .iso file).

In the Action Pane, select the virtual server (vSvr-01-W2K8 in our case), and choose "Start" in the options below the icon.


To see the progress of the installation, click "Connect" as shown here (in the Action pane):

 

No luck! We get an error message:

 


So we have to adjust the settings for the CD/DVD drive.

We have two choices: a virtual drive and a physical drive. The virtual drive is selected by default. Most likely, we would have a set of .iso files for the creation of virtual machines. However, the use of physical media (like a DVD) is possible. So I'll select the Physical CD/DVD drive in the settings of the guest:



Now I'll click Start again.

To see the progress of the installation click "Connect" as we already did above.

This time, the installation begins successfully:



From this point on, the installation process of the guest machine is identical to that of a physical server:



 
***

Hyper-V is a world in itself and there is a multitude of aspects that could be examined. As for me, I may take a look at some of these aspects later. For now, I need to concentrate on Active Directory, Exchange and possibly... vCenter and ESXi (for professional reasons).


No comments:

Post a Comment