With CLUE as (Select * from Random_Thought ORDER BY Common_Sense DESC)

SQL Server thoughts, observations, and comments
posts - 52, comments - 79, trackbacks - 0

Friday, July 15, 2011

Virtual Lab (part 1)



No, not that kind of Virtual Lab.  I mean a virtualization based laboratory so you can experiment with test systems.  While there are many uses and configurations for a virtual lab, my primary configuration is a laptop based environment because I am often at client sites that do not allow outbound access to remote systems for security reasons so I need something I can take with me.  Therefore, this series will focus on building out that type of environment.

The first requirement is a laptop with a LOT of CPU and Memory capacity.  8GB is the minimum I consider useful for a VM host.  16GB is better.  I use a Lenovo W510 (current model is the W520).  Most multi-core processors have hardware virtualization extensions so anything except the lightest netbook technically can do virtualization.

Disk space is also a big need. I use this to store my extra VMs, only without the pretty pattern on the case.  I wish I had the resources to afford a large SSD, but we all deal with an imperfect world.

So, now that we have a good hardware platform, we need to choose a virtualization platform.  Virtual PC is pretty much out since it does not support 64-bit guests.  This totally eliminates current-generation Server Operating Systems. 

Hyper-V is a possibility.  I experimented with “boot from VHD” to dual-boot my laptop without losing my regular OS.  It works very well, but I found myself reluctant to “disconnect” myself from my regular work platform in order to work on my virtual lab environment.  I wanted something that would run concurrently with my other workstation applications.  For my home lab, I use a dedicated Hyper-V box.

I used to use VMLite.  VMLite is based on the open source 3.x version of VirtualBox.  The big problem with VMLite is that it only supports 3 concurrent operating VMs.  And yes, this can become a problem in environments that are even moderately complex such as a SharePoint server with a SQL Cluster.  That takes a minimum of four VMs.

Next up was VirtualBox without the VMLite wrapper.  The cool thing is that VirtualBox can read and write VDI, VHD, and VMDK files (the three major types of virtual disk files). VirtualBox used to have a Media Manager where you registered virtual disks.   One goal for version 4.x was to remove this and have virtual disks registered to specific VMs, making each VM self-contained.  Great idea.  Terrible implementation. 

If you build a system using VHD files and differencing disks, VirtualBox registers and displays the BASE disk instead of the Differencing disk in the VM.  It registers the disk by a UUID instead of the disk path.  technically, the xml config file is supposed to contain both path and UUID information.  This becomes important later.  If the BASE disk is already registered in any VM, it won’t actually write any disk path information into the VM configuration file.  Since they removed the explicit “register this disk” commands from Media Manager and the command line tool vboxmanage.exe, you can’t fix this without editing the undocumented XML VM configuration files directly.  The frustrating part is that there are elements to fix this within the code, but they are intentionally blocked.  You can’t create a differencing disk of any type without creating a VM snapshot and the “clone VM” functionality is pathetic.  You can’t force a VM to register a disk and write the path to the configuration file.  You can’t get VirtualBox to create a VHD differencing disk.

Manually create a differencing disk using DISKPART.exe, wrap it in a VM, and it works great… right up until you exit VirtualBox.  Start up VirtualBox and it can’t find the disk anymore and the VM is marked “Inaccessable”.  Create a new VM, add the disk, refresh the original VM and it is back.  Right up until the next time you close VirtualBox.  A lot of investigation led me to see that VirtualBox does not write the path information for VHD files inot the VM correctly, especially if they share a common base disk without a corresponding VM snapshot. #FAIL

Don’t get me started on their idea of “community” support .  Read the forums and you will see typical open source arrogance towards anyone who isn’t a Linux guru, even when asking on the Windows forums.  Makes me appreciate the SQL community that much more.

That leaves us with the big dog; VMWare workstation.  I finally broke down and loaded it up.  It only works with VMDK files, but the management functions are feature complete.  It isn’t as fast as VirtualBox, but I needed a platform that works, not one I constantly have to work on.  Sometimes you have really do get what you pay for.

posted @ Friday, July 15, 2011 8:21 PM | Feedback (6) |

Powered by:
Powered By Subtext Powered By ASP.NET