thefrozencoder

Programming and Technology blog

The Hyper-V n00b - Child Partition - OpenBSD 4.4

So far I have really zero issues with installing Windows based OS's (once each one had the latest service pack) as child partition, what about unsupported OS's.  I figured that I would need to install a familiar OS that I have lots of experience with and I would like to work with it some more, especially from the firewall side of things again.  Of course my choice was crystal clear; OpenBSD.  Now I wondered just how well the "virtual hardware" would work, I have installed OpenBSD in Virtual PC which worked pretty well so what do I have to loose?

Since you can mount an ISO to your CD/DVD drive when creating a new virtual machine I downloaded the install44.iso for OpenBSD and selected it and started the VM.  From what I can see the only thing that wasn't supported was the Microsoft VGA adapter.  But since it probably supports the VGA standard it still worked.  So after about 5 minutes of installing and configuring I rejoiced to see the following screen.

Now of course I will need to run further tests but it shows promise.  Adding another NIC and the possibility of having this as my firewall to the internet has some pretty strong advantages.  I only hope that I still have my old config files kicking around for my last firewall but I am sure that I will manage.

Of course things like the shutdown actions in the toolbar do not work and since there are no Integration Services there is no Heartbeat monitor but hey, it's working none the less.  I also noticed that the time was 4 hours out which I am not sure about.  Maybe OpenBSD cannot read the timing from the virtual BIOS or whatever it used/called.  I will have to investigate that one.  Otherwise I can enable the OpenNTPD dameon just to make sure that the time is always in synch.

The Hyper-V n00b - Networking Setup - 2 NICs

In my last post The Hyper-V n00b Experience I gave my experiences with setting up a couple of guest OS's in Hyper-V.  This post will be geared towards how I setup my network configuration for Hyper-V or rather how I changed the mess that I made with the first setup so I decided to start from scratch.  By no means is this a definitive guide as to how to setup multiple NICs for for a VM environment, like the title says I am a n00b at this so take it with a grain of salt.

First thing first; networking in Hyper-V is not as black and white as most might think, there are some changes and when configuring your Hyper-V server for networking for the first time will make some changes to your current network configuration that will make you go hmmmmm.....

Before you do configure networking you check out the following blog posts as they all offer a really good insight and explanation of how it all works.

References

Now my setup has two NIC's involved so while it does not make it any more difficult it does add couple of extra configurations steps to make it correct.  The reason I installed two network cards is not for redundancy but to have one NIC dedicated to the OS and one dedicated to the VM's.  This is not a requirement but it makes making networking changes on the VM side of things way easier if you want to go totally hardcore with your VM environment.

 

In the Begining

So this is what my Network Connections list looks like before I do anything

"Local Area Connection" is the onboard NIC and will be used as the dedicated OS connection to my network

"Local Area Connection 2" is the add-on NIC and will be used as the dedicated VM connection

Personally I always change default names to something more meaningful on any server I setup so I change "Local Area Connection" to "OS Network Connection" and I leave the 2nd alone for now because the meaning will change in a couple more steps.

 

Setup Hyper-V to use a NIC

Next change the Hyper-V settings to use the add-on NIC for it's connection.  Open up the Hyper-V Manager and highlight the server on the left then right click -> and select Virtual Network Manager.  The following dialog box with be visible.

Select External Network and hit the Add button; you will get a dialog box similar to this but I have already filled in some of the options for my configuration.

The virtual network name I used is the same name as the physical NIC according to Windows; I added a "Virtual" prefix to it for more of a readability standpoint.  This name actually maps to the Device Name property in the Network Connections list.  Again I like to have meaning to names.

Connection Type: External uses the physical NIC "Local Area Connection 2" (the Intel Desktop Pro NIC).  Hit the Ok button.

 

So what really happed?

Looking at the Network Connections you can see a new network connection "Local Area Connection" and the device is the Virtual Intel(R) PRO/1000 GT Desktop Adapter, the same one setup in the Virtual Network Manager.  The original "Local Area Connection 2" is now a virtual switch and the "Local Area Connection" is a virtual network adapter that is connected to the virtual switch.  When configuring VM's this will be the virtual network adapter for used to bind to for connectivity.

 

Name change time

 

The new Virtual VM Switch device properties



The Virtual VM Switch (original "Local Area Connection 2") has only the Microsoft Virtual Network Switch Protocol enabled, this is normal.  The physical NIC is now configured as a virtual switch.

 

The new Virtual MV Network Connection Properties



The new network connection or "virtual adapter" for my VM's by default has TCP/IP enabled and obtain IP via DHCP enabled, this is not what you want when running two physical NICs.  What you want to do is disable all of the bindings from the virtual adapter (like in above picture) so that it is basically useless from the host or parent partition standpoint.  Remember the VM's will be linked to the virtual switch which routes through the second physical NIC (Intel desktop).  Removing all of the bindings allows for a straight pass though effect as well not allowing the physical host to use the NIC in any shape or form.  Which is the desirable effect for me since it's not about redundancy.  More about this setup can be read on John Howard's virtualization blog and comments Hyper-V: What are the uses for different types of virtual networks?.

 

Re-Configure existing virtual machines

After this was completed I then had to update my current VM's to use the new network adapter (remember this is a fix for the rushed original setup).  To do this it's as easy as opening up the settings for each VM and change the Network Adapter settings to the new virtual adapter.  When you open up an existing VM you will notice that there is a Connection Error for the adapter, this is normal since I changed the virtual adapter.  This is what my VM settings look like now:

All in all it was a pretty good learning experience and I now have a better understanding of how Hyper-V implements it's networking.  My VM's can now get out on my network and the internet and the separate NIC is dedicated for VM use only.

The Hyper-V n00b Experience

So decided to take my new server for a spin and try out the Hyper-V role.  I have a couple of vhd files (Virtual Hard Drives) kicking around circa Virtual PC days and I figured that I would try and “convert” them to Hyper-V.  I ended up finding several articles that say “you can do this” but you need to do xxx steps to do it.  All I have to say is don’t bother, I found that I spent as much time trying to get a copy of the XP SP3 IE7 testing VM to work as it would doing a fresh install of XP w/SP3 slip-streamed which is what I ended up doing in the end.  There are countless articles on how to setup a Hyper-V VM out there so I will only give you my observations/tips on how I ended up installing some guest OS’s.

In General

  • Mount an ISO rather than use a CD/DVD as your install media, it seems to go faster
  • XP needs SP3 or the Integration Services will not install
  • Vista needs SP1 or the Integration Services will not install (you will get an error "you need a newer verison to continue")
  • Brush up on your Windows keyboard shortcuts
  • If you are RDPing into your server to create VM’s and you connect to the VM using the VM Connection app don’t be surprised if your response time for the guest OS UI is brutal (especially Vista).  Turning off the visuals does help but not as much as you would think
  • Somtimes it seems that you have lost control of the keyboard during an install (or even in the OS), you actually have not the carat | is just not visible, try typing anyway.  This may happen untill you install the Integration Services.

Installing XP w/SP3

  • During the install you will get to the “Windows will now automatically setup your screen resolution” dialog box.  What may happen here is the dialog box goes out of focus leaving you without anyway possible to click on the Ok button.  Why?  Well because you have not installed the Integration Services yet and that means no mouse support and limited keyboard access.  ALT-CTR-TAB does not work (flipping between open windows in the VM) so what do you do?  Well the easies thing to do is just turn off the VM and restart it again.  You will get the “Windows did not shut down properly” prompt but no big deal, just start in Normal Mode.

Installing Vista w/SP1

  • Add the legacy network adapter for the Vista install just in case your network adapter does not work (like mine, an Intel no less) if you are going to access the network when installing
  • Make sure you have a copy of Vista with SP1, trying to update your VM with this will take a long time, especially using windows update and the legacy network adapter.
  • When RDP into host server and using the VM Connection app the response times for the guest OS UI would take at least 10 seconds (or more) for anything to happen from the time you hit the keyboard till the OS responded.  I am not sure what to make of this as my configured VM had 2GB of memory and 2 virtual processors (see my hardware specs).

The weirdness I had with the slow response times in the guest OS using the VM Connection app still baffle me since I cannot figure out why it was like that.  I have run VMs in Virtual PC under a RDP connection in the same manner and the response times (while not stellar) were way better than this.  RDPing into each guest OS it worked like it was installed on an actual physical box, which is probably the whole point of virtualizing in the first place.

All in all both VM’s did get installed and I had a chance to fool around with Hyper-V some.  While I have used Virtual PC and Virtual Server quite a bit in the past, the Hyper-V management console and creating VM’s using it was a vast improvement over the clunky Virtual Server UI.  I can see MS creating trial versions of their products on pre installed vhd’s to be run under Hyper-V in the not to distant future.  It would be a pretty slick way to try out the product without having to waste time installing it if you just want to give it a spin and not worry about configuration.

 

New server setup - Hardware

So I decided a couple of weeks ago to retire my old home server that was doing dual purpose as a file share/media server/testing/everything else including AD server by investing in a real setup, something that I can be proud of.  This is what I decided on for the hardware and some of my thoughts on each piece while installing it.

  • 1 x CoolerMaster CM690 Black ATX Case
  • 1 x XFX GeForce 8200 MB
  • 1 x AMD Phenom X4 9550 CPU
  • 4 x 2096MB PC6400 DDR2 800MHz Dual Channel RAM
  • 1 x Thermaltake TR2-R1 CPU Cooler
  • 2 x Seagate Barracuda 1TB HD
  • 2 x WD Caviar 160GB HD
  • 1 x Ultra X3 ULT40073 600-Watt PSU
  • 1 x Intel Desktop 1000GB Network card

CoolerMaster CM690 Black ATX Case

  • Tool-less design so everything is pretty much snap in place
  • 5 x 3.5" drive bays are at a right angle to the MB so it’s way easier to get them in and out
    • Each bay has a drive tray that you mount the drive in so you can slide the drive in and out with a little handle, also snaps in place
    • If installing 4 drives at once you may want to take off the opposite case panel (backside of MB) to get the power and SATA wires setup first as it gets a little tight for space back there
  • Has loads of fan mounts even two on the bottom (one for power supply)
  • Power supply is mounted on the bottom of the case and can be mounted upside down
    • This allows for the power supply to suck cool air in from underneath the case and out through the back, thus not using the hot air from the case to help with cooling
    • The internal mounts for the power supply on the case have rubber grommets to help with vibration as well as a foam gasket on the back to give a better seal
    • Does have some mounting issues (see my thoughts on the PSU I purchased)
  • Comes with preinstalled fans:
    • 1 x back of case
    • 1 x on main side panel
    • 1x on front
      • This is one of those coloured light up fans (blue). It’s not that bright and can be replaced with another 120mm fan.
    • Fans are low flow (around 1200rpm and are pretty quiet but look cheap)
  • To install the optical drive you will need to remove the front panel, the manual is useless for this and the panel required a good pull to get it off. Even though I gave it a good yank the plastic clips that hold it in place did not break (something I have done on cheaper cases to easily)
  • The front IO panel (USB, Mic, Headphones, 1934 and eSATA) ports are actually on the top which is kind of cool
  • The feet on the bottom are actually a hard rubber rather than plastic

XFX GeForce 8200 MB

  • MicroATX board with 6 SATA ports
    • Ports 5 & 6 can not be used in SATA mode only RAID
  • LED Display on IO panel for error codes (was never able to find the error code list)
  • Cooling on integrated chipsets was low profile so CPU cooler fit without a hitch
  • Comes with easy setup guide (4 pages), manual would have been better
  • Does support DEP and hardware virtualization assistance (needed for Hyper-V)
  • Has indicator lights for DDR Dual channel setup properly (for newbs)
  • Comes with a way to configure RAID via the BIOS or a Windows control panel like interface (called MediaShield)

AMD Phenom X4 9550 CPU

  • If you have seen one CPU you have seen them all

PC6400 DDR2 800MHz Dual Channel RAM

  • Had heat sinks on them which was cool I guess
  • Same as processor if you seen one stick you have seen them all

Thermaltake TR2-R1 CPU Cooler

  • Great little fan, very quite and keeps the CPU cool
  • Comes with what looks like "silver" thermal paste on the bottom not that white stuff
  • Is a bit high, if you have one of those CPU cone things on the main side panel of your case for the CPU fan to pull air in you may have to take it off.

Seagate Barracuda 7200.11 1TB HD

  • Stayed clear of the 1.5TB drives due to the reports of poor performance
  • Raid 1 configured without a hitch
  • Will be used as the data drive

WD Caviar 160GB HD

  • Solid little drive
  • Raid 1 configured without a hitch
  • Will be used as the system drive

Ultra X3 ULT40073 600-Watt Power Supply

  • Modular cable design with lots of connectors
  • Large 135mm fan (very quiet, low flow)
  • With the case that I bought the 135mm fan on the PSU made mounting it a bit tricky, the mounting grommets on the bottom of the case did not align properly at times. It seemed that one or more of the mounting grommets on the case slipped into the PSU fan screw holes (probably because the fan is not a standard 120mm so the hole is bigger) which caused the PSU to tip from side to side at times.  Once it was screwed into place it seemed fine.

Intel Desktop 1000GB Network card

  • It was either this or a 3com, this was cheaper
  • No worries about drivers with either Intel/3Com for any Windows OS probably the best supported card out there.
  • I will be mapping the VM’s to this card only; the OS gets its own dedicated LAN via the onboard one.

Windows 2008 Install Tip for HP Laptops

If you are going to do a manual install of Windows 2008 and or Vista on any HP laptop you probably want to burn the c:SwSetup folder to a DVD/USB Key before you begin. This folder contains all of the original software installed as well as all of the drivers. Once you have installed the OS you can copy the folder back to your C: drive.

Here is a little trick to make the install process easer, create a text file in the c:SwSetup folder and rename it to install.inf. If you are missing drivers for some of your hardware (audio, network lan and wireless) are the usual MIA drivers. Just use the Update Driver feature and make sure you browse for a location and select the c:SwSetup folder, because the *.inf file is present you can do this. The update driver feature will search all subfolders for *.inf files to find a matching hardware device id and install the drivers for it. I do this so that I don’t have to pick each folder separately.