Geoff N. Hiten Blog

SQL Server thoughts, observations, and comments

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.

Legacy Comments


DBATAG
2011-07-15
re: Virtual Lab (part 1)
Even I am looking for buy a new laptop / PC, you views has really helped me on deciding, what to do for ???


Dell is still cheap, do you suggest looking for that option or should I blindly go with lenovo W520

Brent Ozar
2011-07-16
re: Virtual Lab (part 1)
"I needed a platform that works, not one I constantly have to work on. Sometimes you have really do get what you pay for."

It's just a matter of time before you're using an Apple MacBook, man. :-D Welcome to the easy way.

Adam Machanic
2011-07-17
re: Virtual Lab (part 1)
Hmm, I've been running VirtualBox for quite some time now (a year, maybe more), and have never had to edit any XML files. Perhaps you have requirements that are just a bit beyond the norm?

I did have some lockup problems with some of the earlier 4.0.x builds. Hoping those have gone away at this point.

David Bermingham
2011-07-18
re: Virtual Lab (part 1)
I agree Geoff, for a laptop environement VMware Workstation seems to be the best solution for me as well. I've also used VMware Player on occasion when I found myself without my primary laptop and for free it seems like a great alternative for personal use. I would highly recommend it for students looking to build a test lab for free.

http://www.vmware.com/products/player/faqs.html

J Burnett
2011-07-18
re: Virtual Lab (part 1)
Geoff, thanks for posting about your experience with VBox - it's pretty familiar to mine. I find that it's ok as long as I'm using *nix guests, but, like you, I have to use VMWare Workstation when it really counts. I've cross-posted at http://AltaModaTech.com/blogs/?p=390

Bharat Dudhawad
2011-08-08
re: Virtual Lab (part 1)
please help me how to create a virtual computer lab using win server 2003(win 2k3)using screenshot.