For the last few years, I have always had a personal virtual playground for SQL Server setup on my laptop that allowed me to not only learn about new features in SQL Server, but also demonstrate complex topics hands on during presentations. I recently had to rebuild my playground from the ground up and as a part of doing this; I decided that I would blog about all the steps I took to build a completely FREE environment to play with SQL Server, including a virtual iSCSI “SAN” to support failover clustering. I have been using VMware Workstation personally for the last few years as the platform for my playground, but only because I received a free license a few years ago when I spoke about virtualizing SQL Server using ESX at the VMware Open Forum in Orlando, FL. One of the requirements for building this playground is that the virtual machines have to support 64 bit guests, which is not supported by Microsoft Virtual PC but is supported by VMware Workstation. However, as much as I love my copy of VMware Workstation, it isn’t free and you may not have the budget to purchase it as a base platform, so for the purposes of this series I decided to go with VirtualBox, which is a completely free alternative that also supports 64 bit guest VMs.
To get started you are going to have to download and install VirtualBox from their site:
While we are covering downloads, the following additional items will be needed to setup the environment:
Windows Server 2008 R2 with Service Pack 1 Evaluation Edition
SQL Server 2008 R2 Evaluation Edition
SQL Server Denali CTP3
Microsoft iSCSI Software Target 3.3 for Windows Server 2008 R2
VMware ESXi VSphere 4.1 Evaluation
With VirtualBox installed, I start out by building a “base” VM installation that I clone to create all of the other VMs that I need in my playground. By creating a standardized “base” or template VM I save a ton of time in the long term by not having to install an patch Windows Server 2008 R2 a half dozen times, I can do it once and then by using the sysprep functionality in Windows, I can reuse the image for each of my servers. I can also add the basic set of features to the template, for example .NET Framework 3.5.1, Failover Clustering, and Multipath I/O to keep from having to manually add them to my VMs that specifically need them. Some of the VMs that get created from the clone will not need these features specifically, for example the Active Directory Domain Controller we are going to create, but these features don’t impact the ability of the machine to perform as a Domain Controller for the environment.
To get started building the base VM template, create a new VM in VirtualBox (Machine > New) and configure the VM options. For my template, I chose to allocate 1024MB RAM and create a dynamically expanding virtual hard disk that was 30GB in size, using the Windows Server 2008 x64 template for the VM. Once the VM is created, you will need to edit the VMs settings to configure the additional networking, and if appropriate additional vCPUs. For the Networking configuration, I leave NAT enabled for Adapter 1, and then configure internal networking for Adapter 2, 3 and 4 with Adapter 2 as a Internal Network named “Domain Network” and Adapter 3 and 4 on another Internal Network named “iSCSI Network”.
Once the virtual networking has been configured for the VM, the last thing to do before powering the VM on is to set the CD/DVD device to the Windows Server 2008 R2 Evaluation Edition ISO file that was downloaded from Microsoft.
Once the VM boots it will immediately begin running the Windows Server 2008 Setup off the ISO and you will be on your way to setting up the template VM to base the rest of the servers needed in the environment off of. Once Windows Server 2008 R2 is installed, I add the three features I mentioned previously in this post to the VM; .NET Framework 3.5.1, Failover Clustering, and Multipath I/O. Once these have been installed, I run Windows Update to download and apply the most recent updates for Windows to the Server and then allow it to reboot. Once the VM reboots, depending on how anal retentive I intend to be with the environment, I may or may not disable the Windows Firewall, but as a best practice it should be left turned on. After I complete the configuration of the “base” template I want for the OS, it is time to run sysprep and reset the VM image for cloning to create multiple VMs based on its image. Sysprep can be executed from Start > Run. The options for sysprep should be set to “Enter System Out-of-Box Experience (OOBE)” and the checkbox for Generalize should be checked.
Once the VM shuts down it can be used to create clone VMs to build out the necessary infrastructure for the playground. In the next post in this series, we’ll build the VM clones for the environments Active Directory Domain Controller and iSCSI “virtual” SAN using the Windows Server iSCSI Target.
22 thoughts on “Building a Completely Free Playground for SQL Server – (1 of 3) – Downloading the Software and Setting up a Windows Server 2008R2 VM Template”
Just out of curiosity, what hardware are you running on the host?
This is great, thanks!
Thanks Jonathan, this is very helpful. One question for you: Did you install the standard or enterprise version of Windows Server 2008?
Why do we need to download VMWare ESXI as listed above in the required download list if we are going to use VirtualBox?
I see you’re planning to use a Windows system as your storage with the iSCSI target installed.
Did you consider using the Openfiler free NAS software running in a VM and if so is there a specific benefit to using Windows Server instead?
Very cool. I haven’t even thought of virtualizing a iSCSI implementation on my laptop. I can’t wait to give this a try!
Been looking to set up a test environment at home for a while. Thanks Jonathan!
first gotta say, great article. never thought to use VirtualBox. I used to use vmware workstation 6.x but never upgraded so switched to the free vmware server, which I found a pain to use compared to workstation. Also tried hyperv but the lack of usb support put me off.
Anyway back to an issue I have found, this isn’t specific to VirtualBox but all cloned VM’s. If you add the failover clustering before you sysprep all the Microsoft Failover Virtual Adapaters have the same MAC address and IPV6 address. This stops the cluster nodes from being able to join a cluster as validation will fail.
this is mentioned in this KB article – http://support.microsoft.com/kb/969256
I have two laptops being used to build the setup, one is the DELL M6500 which is a Core i7 with 16GB RAM and dual 256GB SSDs in it, the other is a DELL E5420 which is a Sandybridge i5 with 8GB RAM and a single 256GB SSD in it.
I installed the Enterprise Edition of Windows.
You can run ESXi inside a VM to familiarize yourself with VMware ESX and how it works, a blog post coming in the near future.
Yes there is a reason for going with the Microsoft iSCSI Target over Openfiler, and that reason is SCSI-3 Persistent Reservation support which is required for Failover Clustering with Windows Server 2008. As late as July of this year, this is not natively included in Opefiler.
Many thanks for posting such as valuable article. I would advise to add "VirtualBox 4.1.2 Oracle VM VirtualBox Extension Pack All platforms" also in the install list. Especially because that gives you the feature to access USB so you can install few missing things from there as well.
It will help those who does not have 64 bit platform like me. I downloaded 32 bit Windows 2008 evaluation edition. But as per your article, I did not find .NET 3.5 into the list so I got the .NET from Microsoft Web site.
Can’t wait for your 3 rd post. I must say that I am bit desperate for this now. Hope to see that soon.
The iSCSI Target in the next post of the series is only supported on a x64 install of Windows Server 2008 R2, which is why I used that version of Windows for this series. You can still create a playground for SQL using VirtualBox and Windows Server 2008 32-bit, by using third party software like Starwind, but it isn’t going to be the same as this series is showing.
I’m using Core i5 2500K processor but VB tell me next:
"VT-x/AMD-V hardware acceleration has been enabled, but is not operational. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.
Please ensure that you have enabled VT-x/AMD-V properly in the BIOS of your host computer."
So, installation of MS Server 2008 x64 don’t want to start.
Just to let you know even setting the “Reinitialize the MAC address of all network cards” doesn’t reset the MAC address on the MS Failover Cluster Virtual Adapter.
I cover the problem with the Microsoft Failover Clustering Virtual Adapter in post #3 of the series. The failover clustering feature should not have been a part of the base template and actually has to be removed, the server rebooted, and then added back for the setup of the failover cluster to succeed. A shortcut in this post actually turned out to be a problem later, which is something I should have tested completely before writing the series, but I didn’t.
I’m not sure if SQL Server 2008 is available for download anymore from the microsoft site.. Do you think this can be done with 2012? I’m new to virtualization. Thanks.
Hi can you please help me to find windows server 2008 r2 ISO image … i tried using the link you provided but it didnt worked
Once the next version comes out, the evaluation ISO’s for previous versions are removed by Microsoft. You can use the Windows Server 2012 evaluation ISO and build the environment on the latest version still.
Thank you for the information presented here.
I installed VirtualBox on my laptop, but that caused the wireless network adapter to stop working properly.
I ended up having to un-install VirtualBox and uninstall/reinstall the wireless driver to get back the wireless capability.
Any ideas how to get around that?
I had the same issue with VirtualBox on PC. However, I don’t have this issue on Mac OS. My guess was that the VirtualBox’s networking implementations were different on different platforms.
I recommend you try VMware Workstation 10 , which I’ve tried with no issues on PC.
If you use Mac OS X, I recommend VMWare Fusion 7.