{"id":481,"date":"2011-02-10T11:00:00","date_gmt":"2011-02-10T11:00:00","guid":{"rendered":"\/blogs\/kimberly\/post\/VHD_Online_Reference_Guide.aspx"},"modified":"2013-09-16T17:17:41","modified_gmt":"2013-09-17T00:17:41","slug":"using-the-vhd-for-our-sql-server-2008-hols","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/using-the-vhd-for-our-sql-server-2008-hols\/","title":{"rendered":"Using the VHD for our SQL Server 2008 HOLs"},"content":{"rendered":"<p>\nVHD stands for <strong><u>V<\/u>irtual <u>H<\/u>ard <u>D<\/u>rive<\/strong>.\n<\/p>\n<p>\nA VHD is created with\/by programs such as Virtual PC, Virtual Server, Hyper-V, etc. and there&#39;s a standard format associated with them. If you&#8217;re interested in reading more about VHDs, check out: <a href=\"http:\/\/en.wikipedia.org\/wiki\/VHD_(file_format)\">http:\/\/en.wikipedia.org\/wiki\/VHD_(file_format)<\/a>.\n<\/p>\n<p>\nTo use a VHD you need to have a program installed to &quot;host&quot; it. Think of it as a &quot;guest&quot; machine&nbsp;within a &quot;host&quot; machine. When you &quot;run&quot; the program that hosts the virtual machine you will be starting the &quot;guest&quot; machine within it. This guest machine is effectively isolated &#8211; 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&nbsp;all other necessary software. This is part of what can make the actual VHD files extremely large. If you&#39;re interested in learning more about creating VHDs, check out this TechNet article: <a href=\"http:\/\/technet.microsoft.com\/en-us\/magazine\/ee872416.aspx\" target=\"_blank\">Create and Use a Virtual Hard Disk on Windows 7<\/a>.\n<\/p>\n<blockquote>\n<p>\n\t<strong>NOTE:<\/strong> Alternatively, if you&#39;re running Windows 7, you can also ATTACH a VHD natively without any additional software (I love this). I&#39;ll plan on writing up another post on this shortly and I&#39;ll link back to this! It&#39;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.\n\t<\/p>\n<\/blockquote>\n<p>\nDepending on your operating system, there are a variety of recommendations on what to software to use to &quot;host&quot; the virtual machine:\n<\/p>\n<ul>\n<li>\n<div align=\"left\">\n\tIf you&#39;re using Windows XP or Windows Vista &#8211; use Microsoft Virtual PC 2007. It is available for a free download here: <a href=\"http:\/\/www.microsoft.com\/windows\/virtual-pc\/support\/virtual-pc-2007.aspx\">http:\/\/www.microsoft.com\/windows\/virtual-pc\/support\/virtual-pc-2007.aspx<\/a>\n\t<\/div>\n<\/li>\n<li>\n<div align=\"left\">\n\tIf you&#39;re using Windows Server 2003 &#8211; use Microsoft Virtual Server 2005 (or, VPC 2007 but technically, Virtual Server is recommended on a server OS. In fact, it even throws an error that you&#39;re not on a supported OS but it works well. In fact, I prefer Virtual PC on machines with lower resouces). Virtual Server 2005 is available for a few download here: <a href=\"http:\/\/technet.microsoft.com\/en-us\/virtualization\/bb545897.aspx\">http:\/\/technet.microsoft.com\/en-us\/virtualserver\/bb676679.aspx#EYC<\/a> .\n\t<\/div>\n<\/li>\n<li>\n<div align=\"left\">\n\tIf you&#39;re using Windows 7 &#8211; you need Windows Virtual PC. This can be installed by clicking on this link: <a href=\"http:\/\/www.microsoft.com\/windows\/virtual-pc\/download.aspx\">http:\/\/www.microsoft.com\/windows\/virtual-pc\/download.aspx<\/a>. You do NOT need XP Mode.\n\t<\/div>\n<\/li>\n<li>\n<div align=\"left\">\n\tIf you&#39;re using Windows 2008 &#8211; you can use Virtual Sever 2005 (or, again, VPC 2007).\n\t<\/div>\n<\/li>\n<li>\n<div align=\"left\">\n<div align=\"left\">\n\tIf you&#39;re using Windows 2008 R2 &#8211; you need to enable the hypervisor role in order to use Hyper-V. The VHD will need to be converted to use with the hypervisor. Here&#39;s a link to help you convert the VHD: <a href=\"http:\/\/blogs.msdn.com\/b\/skaufman\/archive\/2012\/01\/18\/can-you-move-a-virtual-machine-from-virtualpc-to-hyper-v.aspx\" class=\"broken_link\">Can you move a Virtual Machine from VirtualPC to Hyper-V?<\/a>.\n\t<\/div>\n<\/p><\/div>\n<\/li>\n<li>\n<div align=\"left\">\n\tFinally, there are third party programs that can be used to host your VHD, such as <a href=\"http:\/\/en.wikipedia.org\/wiki\/VirtualBox\" target=\"_blank\">Oracle VirtualBox<\/a> and <a href=\"http:\/\/www.vmware.com\/products\/workstation\/\" target=\"_blank\" class=\"broken_link\">VMWare Workstation<\/a>. You&#39;re on your own with these. :) However, I have successfully used this VHD with VMWare.\n\t<\/div>\n<\/li>\n<\/ul>\n<p>\n<strong><u><font size=\"4\">Using the VHD with Windows Virtual PC (on Windows 7)<\/u><\/strong>\n<\/p>\n<p>\nThe 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 &quot;create&quot; a Virtual Machine with only a few easy steps.\n<\/p>\n<p>\n<font face=\"arial black,avant garde\" size=\"3\">Creating the Virtual Machine&nbsp;\n<\/p>\n<p>\n<font face=\"arial black,avant garde\" size=\"3\">(1) Launch <strong><u>Windows Virtual PC <\/u><\/strong>from the Windows Virtual PC group. This will show any already configured &quot;shell&quot; (or configuration) files in your &quot;<font face=\"courier new,courier\">C:\\Users\\<strong><em>username<\/em><\/strong>\\Virtual Machines&quot; directory. These can be named .VMC (for older implementations of Virtual PC) or .VMCX (with new versions). For you, this list might be empty.\n<\/p>\n<div style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-content\/uploads\/2011\/2\/slide1.jpg\" alt=\"\" \/>\n<\/div>\n<p>\n<font face=\"Arial Black\" size=\"3\">(2) To add a new virtual machine, select <strong>Create Virtual Machine<\/strong> 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 &quot;settings&quot; is stored within a VMCX file. Personally, I like to store this in the same location as the VHD.\n<\/p>\n<p><div style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-content\/uploads\/2011\/2\/slide2.jpg\" alt=\"\" \/>\n<\/div>\n<p>&nbsp;\n<\/p>\n<p>\n<font face=\"Arial Black\" size=\"3\">(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.\n<\/p>\n<p><div style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-content\/uploads\/2011\/2\/slide3.jpg\" alt=\"\" \/>\n<\/div>\n<\/p>\n<p>\n<font face=\"Arial Black\" size=\"3\">(4) Finally, choose &quot;Use an <u>e<\/u>xisting virtual hard disk&quot; to USE your expanded VHD as the &quot;virtual hard disk&quot; for your newly created virtual machine.\n<\/p>\n<p>\nUsing 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.\n<\/p>\n<p><div style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-content\/uploads\/2011\/2\/slide4.jpg\" alt=\"\" \/>\n<\/div>\n<\/p>\n<p>\n<font face=\"arial black,avant garde\" size=\"3\">Change the settings of the Virtual Machine&nbsp;\n<\/p>\n<p>\nNow that your virtual machine is setup, you can easily change any of&nbsp;the settings defined when creating the VM. You can do this by right-clicking on the VM or by choosing the <strong>Settings <\/strong>option from the menu.&nbsp;\n<\/p>\n<p><div style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-content\/uploads\/2011\/2\/slide5.jpg\" alt=\"\" \/>\n<\/div>\n<\/p>\n<p>\n<font face=\"arial black,avant garde\" size=\"3\">Starting and logging into your Virtual Machine&nbsp;\n<\/p>\n<p>\nTo start the Virtual Machine (the &quot;guest&quot; machine on your &quot;host&quot; machine) use OPEN (again, right-click or from the menu):\n<\/p>\n<p><div style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-content\/uploads\/2011\/2\/slide6.jpg\" alt=\"\" \/>\n<\/div>\n<\/p>\n<p>\nThis may take a few seconds to start as it&#39;s&nbsp;performing a full&nbsp;boot of an operating system (in the case of our HOLs VPC it&#39;s&nbsp;Windows 2003 Server). Once loaded, you can login. However, this is IMMEDIATELY where things can get confusing, especially if you&#39;ve&nbsp;never used a virtual environment like this because the keystrokes aren&#39;t as you might be expecting. AND, if you have used earlier versions of Virtual PC&nbsp;Microsoft <em>changed <\/em>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&#39;s &quot;hosted&quot; then let me explain why it&#39;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&#39;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 &#8211; not the GUEST. As a result, you can select from the top menu (there&#39;s a button for Ctrl+Alt+Del) OR you can review the keystrokes below and use them.\n<\/p>\n<\/p>\n<p><div style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-content\/uploads\/2011\/2\/slide7v3.jpg\" alt=\"\" \/>\n<\/div>\n<\/p>\n<p>\n<strong>Keyboard Shortcut [Confusion (IMO)] <\/strong>\n<\/p>\n<p>\n<font face=\"courier new,courier\"><strong>Function\/Keystroke&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Virtual PC 2007&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Windows Virtual PC (Win 7)<br \/>\n<\/strong>Logon\/Ctrl + Alt + Del&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right-Alt + Del&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ctrl + Alt + End<br \/>\nFull screen toggle&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right-Alt + &lt;Enter&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For full screen: Windows+Up Arrow, To toggle back, use the menu\n<\/p>\n<\/p>\n<p>\nAnd, now for the password&#8230; you can find our SQL Server 2008 SP1 HOLs VPC password in your the lab manual as well as in the <font face=\"courier new,courier\">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&#8230; just WANT TO KNOW the password. It&#39;s expecting a US Keyboard and the password is <font face=\"courier new,courier\">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&#39;re on a UK Keyboard then &quot;shift+2&quot; is actually &quot; (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&#39;d like!\n<\/p>\n<div style=\"text-align: center\">\n<img decoding=\"async\" src=\"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-content\/uploads\/2011\/2\/slide8.jpg\" alt=\"\" \/>\n<\/div>\n<p>\nAt this point, you&#39;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.\n<\/p>\n<p>\nHave fun!<br \/>\nKimberly\n<\/p>\n<p>\n&nbsp;\n<\/p>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>VHD stands for Virtual Hard Drive. A VHD is created with\/by programs such as Virtual PC, Virtual Server, Hyper-V, etc. and there&#39;s a standard format associated with them. If you&#8217;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 &quot;host&quot; it. Think of [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,35,44],"tags":[],"class_list":["post-481","post","type-post","status-publish","format-standard","hentry","category-hols-dvd","category-immersion-events","category-master-immersion-events"],"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/posts\/481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/comments?post=481"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/posts\/481\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/media?parent=481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/categories?post=481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/kimberly\/wp-json\/wp\/v2\/tags?post=481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}