Using the VHD for our SQL Server 2008 HOLs

VHD stands for Virtual Hard Drive.

A VHD is created with/by programs such as Virtual PC, Virtual Server, Hyper-V, etc. and there's a standard format associated with them. If you’re interested in reading more about VHDs, check out: http://en.wikipedia.org/wiki/VHD_(file_format).

To use a VHD you need to have a program installed to "host" it. Think of it as a "guest" machine within a "host" machine. When you "run" the program that hosts the virtual machine you will be starting the "guest" machine within it. This guest machine is effectively isolated – which is great for testing, security, and restricting/limiting certain resources. To be able to do this, the VHD holds a completely installed OS and all other necessary software. This is part of what can make the actual VHD files extremely large. If you're interested in learning more about creating VHDs, check out this TechNet article: Create and Use a Virtual Hard Disk on Windows 7.

NOTE: Alternatively, if you're running Windows 7, you can also ATTACH a VHD natively without any additional software (I love this). I'll plan on writing up another post on this shortly and I'll link back to this! It's a great way for just quickly grabbing the files without any hassle of launching the VPC (and waiting for it to boot) and then copying files out, etc.

Depending on your operating system, there are a variety of recommendations on what to software to use to "host" the virtual machine:

Using the VHD with Windows Virtual PC (on Windows 7)

The remainder of the instructions here are for using and working with this VHD in Windows Virtual PC (Windows 7). Once Windows Virtual PC has been installed, you can "create" a Virtual Machine with only a few easy steps.

Creating the Virtual Machine 

(1) Launch Windows Virtual PC from the Windows Virtual PC group. This will show any already configured "shell" (or configuration) files in your "C:\Users\username\Virtual Machines" directory. These can be named .VMC (for older implementations of Virtual PC) or .VMCX (with new versions). For you, this list might be empty.

(2) To add a new virtual machine, select Create Virtual Machine from the top menu (see above). Next, you need to enter the details for the name and the configuration file for the VPC. The name is just how you plan to later reference the VPC and it can be helpful when you make copies/different versions of a VPC. You can always change this later as well. The location for the "settings" is stored within a VMCX file. Personally, I like to store this in the same location as the VHD.

 

(3) For memory and networking, your setting can vary. For memory, you need at least 1GB with a preference for 1.5GB or even higher, if possible. As for networking, you might want to access links or webpages or other resources so you might find this beneficial. If you want to access hard drives on the host machine, you can do this later (and more easily, IMO) through the Integration Features.

(4) Finally, choose "Use an existing virtual hard disk" to USE your expanded VHD as the "virtual hard disk" for your newly created virtual machine.

Using UNDO disks can be helpful as it allows you to change your VM into a secondary location and later choose (possibly days later) whether or not you want to save or discard those changes. Take a few minutes to read the details provided in the link.

Change the settings of the Virtual Machine 

Now that your virtual machine is setup, you can easily change any of the settings defined when creating the VM. You can do this by right-clicking on the VM or by choosing the Settings option from the menu. 

Starting and logging into your Virtual Machine 

To start the Virtual Machine (the "guest" machine on your "host" machine) use OPEN (again, right-click or from the menu):

This may take a few seconds to start as it's performing a full boot of an operating system (in the case of our HOLs VPC it's Windows 2003 Server). Once loaded, you can login. However, this is IMMEDIATELY where things can get confusing, especially if you've never used a virtual environment like this because the keystrokes aren't as you might be expecting. AND, if you have used earlier versions of Virtual PC Microsoft changed a few of the replacement keystrokes (this drove me CRAZY when I first booted with it!). If this is your first time using a virtual environment that's "hosted" then let me explain why it's necessary first. This can seem confusing but, it really does make sense. Many keyboard keystrokes (like Ctrl+Alt+Del) are tied to the host machine and cannot be changed even when changing window focus because they are OS level keystrokes. Ctrl+Alt+Del is an interrupt combination that's been used over the years to interrupt applications causing problems (and get to task manager, or to reboot when necessary). This keystroke combination is essentially always tied to the HOST – not the GUEST. As a result, you can select from the top menu (there's a button for Ctrl+Alt+Del) OR you can review the keystrokes below and use them.

Keyboard Shortcut [Confusion (IMO)]

Function/Keystroke       Virtual PC 2007        Windows Virtual PC (Win 7)
Logon/Ctrl + Alt + Del          Right-Alt + Del             Ctrl + Alt + End
Full screen toggle              Right-Alt + <Enter>         For full screen: Windows+Up Arrow, To toggle back, use the menu

And, now for the password… you can find our SQL Server 2008 SP1 HOLs VPC password in your the lab manual as well as in the 1stReadMe.txt file in the root of your DVD. For someone out there though, you might have lost the DVD, deleted the lab manuals and well… just WANT TO KNOW the password. It's expecting a US Keyboard and the password is Pass@word1. If your HOST machine is not using a US Keyboard, remember that your GUEST is. You will need to remember this as you type your password (especially the @ sign). For example, if you're on a UK Keyboard then "shift+2" is actually " (double-quotes). As a result, you still need to type shift+2 when typing in the password (as if you are on a US keyboard). Once you get into the VPC you can change your keyboard setting and save it. In fact, feel free to change the administrator password, if you'd like!

At this point, you're in. The HOLs VPC has 20 formal labs and dozens of samples/demo scripts for learning the many features of SQL Server 2008. Time to start having fun! Check out the LabManuals subdirectory and go from there.

Have fun!
Kimberly

 

 

5 thoughts on “Using the VHD for our SQL Server 2008 HOLs

  1. I was wondering how to get Virtual PC installed on my desktop without doing the stupid XP mode…thanks.

    Downside to Virtual PC that I just found can’t install anything 64-bit :( booooo! boooo! that means I can’t play with SharePoint 2010, it requires 64-bit OS. Again boooO! boooo!

  2. Yeah, the link for Windows Virtual PC seems to looks like you need XP mode but there’s an option where you "click to download JUST Windows Virtual PC" and the it exposes a one step download process instead of a 3 step process for XP mode + Window Virtual PC + XP mode Virtual PC updates. Seems crazy and I fell victim to that the first time I went there too. Here are the EXACT steps (maybe I’ll go update the blog post to be more detailed?).

    Go to: http://www.microsoft.com/windows/virtual-pc/download.aspx
    Then, click on: "Don’t need XP Mode and want VPC only? Download Windows Virtual PC without Windows XP Mode."
    Then, Select your edition of Windows 7 and desired language for installation

    You should ONLY a download button for Windows Virtual PC (no XP mode!!).

    Now, as for the 64bit stuff. I’m just the messenger here but yes, you are correct. Unfortunately Window Virtual PC does not support a 64bit OS. Having said that, you might want to consider VirtualBox. (yes, I just recommended an Oracle product: http://www.virtualbox.org. And, yes, it is also FREE…)

    Cheers,
    kt

  3. On my Win7 x86 installation I’ve found that VMWare is way faster than VP2007. I could actually almost not believe how much faster it was.

    VMware Server ( http://www.vmware.com/download/server/getserver.html )can create and run virtual machines, and VMWare Player ( http://www.vmware.com/go/downloadplayer/ ) can run cirtual machines – useful if you want a small installation to [i]quickly[/i] start using a VM. Both are free :-)

    Thanks,
    Andrew

  4. Hey there Andrew – Did you try Windows Virtual PC (instead of VP2007)? That should be even better… in fact, I didn’t even think that VP2007 would install/work?

    Here’s a feature comparison (although not much of one because it only lists new stuff): http://www.microsoft.com/windows/virtual-pc/features/compare.aspx.

    And, of course, the best information that I found was on Wikipedia here: http://en.wikipedia.org/wiki/Virtual_PC_2007. There’s a great supported/unsupported chart on it and it does list Virtual PC 2007 as unsupported on Windows 7 but with virtually all functionality. So, I guess it does work. From another post a few compalined about video drivers and even thought that VP2007 had better support.

    But, back to the speed. I don’t think that any virtualization host that uses a vhd on top of another OS – without direct hardware access will perform really well. However, I’ve been pretty pleased with Windows Virtual PC when I run it on a really beefy machine and give it a lot of memory. You might want to consider Hyper-V and Windows Server 2008 R2.

    Cheers and thanks!
    kt

Leave a Reply

Your email address will not be published. Required fields are marked *

Other articles

Wow! Wow! Wow! THANK YOU!

I announced my retirement from SQL/tech here and your comments on my blog, on LinkedIn, and on Facebook were overwhelming and humbling! I’m so touched

Explore

Imagine feeling confident enough to handle whatever your database throws at you.

With training and consulting from SQLskills, you’ll be able to solve big problems, elevate your team’s capacity, and take control of your data career.