Showing posts with label VMs. Show all posts
Showing posts with label VMs. Show all posts

Thursday, July 02, 2009

Hyper-V Lab (My Rig) – Part III

In Part I, I discussed my hardware and my general concept of what I was going to build.  Part II discussed adding the Hyper-V Role to a Windows Server 2008 machine to become the host.  Part III will cover some different ways of creating VMs for use in your new Hyper-V host.

As with any hypervisor or VM environment, we need to be able to build fresh images to virtualize.  This is pretty easy with Hyper-V Manager that is installed when you enable the Hyper-V Role.  When you open up Server Manager, under Roles, you will find the newly enabled Hyper-V.

image

When you select the Hyper-V server under Hyper-V Manager, you will see the following panel open up on the right of the console.

image

From here you can modify the General Hyper-V setting along with creating Virtual Networks that the VMs will use.  First, we will take a look at the Hyper-V Settings.

image

image

The first option is where will your Virtual Hard Disks be placed and accessed from.  The option just below that is where will your Virtual Machines be placed and accessed from.  You will see in my example, that I have place Virtual Hard Disks in their own subfolder under my Hyper-V root, but my Virtual Machines are being placed at the Hyper-V root level.  First, when Hyper-V create VMs, it does not create friendly names for the Virtual Machines on disk.  Friendly names are available in the console, but that is not how they are stored.  The filenames created with same information that Hyper-V tracks everything internally and that is through GUIDs.  So, for me, having a simple path to store the Virtual Machines configurations was the way to go.  Each VM get’s its’ own folder created labeled with the GUID along with a configuration file with the same label.

The next four option under User I tend to just leave alone.  You can change them if you want, but I have not found a reason to mess with them yet.  Click OK to save the changes.

Now onto the Virtual Network Manager.

image

image

Under Virtual Networks, select New virtual network and you will see three options; External, Internal, and Private.  External will use the physical network card for access to the network. Internal will allow connections only between the VMs and the VMs to the host.  Private will allow connections between VMs only.  You will see in my example, that I have set up an Internal and an External connection.  I typically use this configuration for enabling network access through a gateway VM in my lab.

There is also an option for stamping a VLAN ID on these segments if you are routing by VLAN.  Click OK to save and close.

Time to build a VM…….

Click on New\Virtual Machine

image

This will open the virtual machine wizard.

image

Click Next.

image

Give the VM a name.  This name is what will be displayed in the console.  If you wish to store the VM somewhere else beside the default location set earlier, check the box and change the location.  Hit Next.

image

Specify how much memory you wish to assign to your VM. Hit Next.

image

Choose the network to use for this VM. Hit Next.

image

Choose a name for the Virtual Disk (or just leave the pre-assigned) and location along with general size.  The disk will dynamically grow up to this size.  Hit Next.

image

Choose if you would like to install the operating system later, from a CD/DVD, ISO image, floppy disk, or network install.  I typically have everything in ISO, so that is what is always use.  Hit Next.

image

The summary screen shows the options you chose.  Hit Finish to create the virtual machine.  The VM is created and you will have a console with your new VM.

image

Here is mine with a few VMs in place and one of them running.

Yeah, I know.  That’s great David, but what if I have some virtual machines from VMWare that I want to load up into Hyper-V.  Not a problem,  VMTookit has created a tool that will take your VMDK files from VMWare and convert them to VHD format that Hyper-V can use.  You can download Vmdk2Vhd from their website.  Place the newly created VHDs into your Virtual Disk folder for Hyper-V.

All that is left is to create a New Virtual Machine using the steps above, but when it comes to selecting a Virtual Hard Disk, select them as below.

image

Point to the newly created VHD and continue on.

TADA! You have just create a new VM that uses your old VMWare image.

Once you have your images in the console, right-click on them and select Start.  Once they start running, right-click on it and select Connect to open up the server console to work with it.

Next time we look at the value of exporting and importing virtual machines in Hyper-V.

Hyper-V Lab (My Rig) – Part II

Now that I have had a chance to get the rig built from Part I and things installed, let me take Part II and step it out.

One thing to note on this build.  I chose to go with a Full Standard installation of Windows Server 2008 R2.  I could have gone with a Core installation, but decided I wanted the GUI.  I will have a Core install in a VM as time permits.

First thing to do is once you have Windows Server 2008 installed, we need to Add a Role from the Initial Configuration Tools screen.

Add Role

When you select this option, the New Role Wizard is launched, which makes this pretty easy.

NewRoleWizardStep1

Click Next.

NewRoleWizardStep2

Select Hyper-V.  You can select other Roles as well, but be careful so that you don’t overload your system.  Remember, you will be loading this thing up with many concurrent VMs running and need to ensure resources for those.

NewRoleWizardStep3

Here you can get some additional information on Hyper-V, but really, who takes the time to read through this stuff.

NewRoleWizardStep4

Now, we need to select a network adapter that Hyper-V will use to virtualize in the VMs.  My machine only has one, so this makes it a no-brainer.

NewRoleWizardStep5

You get a little information screen saying you might need to reboot after install. Blah, Blah, Blah.

NewRoleWizardStep6

Well, sure enough……I need to reboot.

NewRoleWizardContinuedAfterReboot1

After the reboot, the Hyper-V Role installation continues

NewRoleWizardContinuedAfterReboot2

Congratulations! Hyper-V is installed.  You get a little note saying how to add VMs.

Tuesday, June 23, 2009

Hyper-V Lab (My Rig) – Part I

Well, I decided after reading through Andrew Connell’s post about his Hyper-V system build along with Bob Fox’s post about his build for Hyper-V, that I needed to just get on it and build up mine.  For my build, I am taking something of a hybrid approach of these two.

In this first part, I will discuss my planning (why I need the rig and requirements).  As an MCT (Microsoft Certified Trainer), I need to stay on top of the latest technology, especially for those classes I teach.  This is currently Windows Server, Exchange, and Visual Studio courses, along with project management classes.  In the past, I have used MS Virtual Server, MS Virtual PC, and VMWare Workstation to support my lab machines.  I won’t even go into my early days of Ghosting machine images.

I decided I wanted to have a separate machine for my lab environment.  I was getting tired of the dual-boot situation, but booting from a VHD (virtual disk) on my Windows 7 machine was pretty cool.  I decided to look around for a system case that I may have had lying around and use that as the basis for my research.  I found a small micro ATX and a mini ITX case.  The mini ITX case was going to be way to small to support my CPU and memory requirements, so that left me with the micro ATX case.  The power supply was still intact, which is a feat all of its own, since I cannibalize my systems when building other computers.

Now that I had the case, time for some research around my requirements.  Since I would be running 3-4 VMs at a time, I wanted to set aside 1 core per VM.  This is not really required, but more of a practice I have taken on for lab environments.  I also knew that I would need 8-16GB of memory to support the VMs and host OS.  Guess I should mention that I am cheap too, so I had to watch what I was spending.

After much research and toggling between Gigabyte and ASUS micro ATX boards, I finally decided on the ASUS M3A78-CM.  This board sports  (6) SATA ports, support for 8GB of memory and supports AMD Phenom and Phenom II processors.  Why did I chose AMD over Intel? To be honest, it was a price decision.  Both comparable AMD and Intel processors support their own form of virtualization (AMD-V and Intel VT), which is required for the Hyper-V role.  I also went with the AMD Phenom X4 9750.  This is a quad-core processor running at 2.4 or 2.6GHz (I can’t remember exactly)

Anyway, I have decided to go with 4 sticks of 2GB DDR2 for this board to give me a total of 8GB and max it out.  I would have gone with a system board that supports 16GB or 32GB, but the 4GB sticks of memory are just a bit too pricey and by the time that price changes enough for me, I will be ready to upgrade the machine anyway.

I already have the 1TB SATA drive to hold my VMs, so I just need a smaller SATA drive for my OS and applications.  A 160-250GB drive should take care of that.  Next up is to procure the parts, build the system and start the install.  That will be in the next installment of this build.  Stay tuned.