|
![]() |
#1 |
Banned
|
http://thesqlpro.com/2012/09/17/runn...rd-drives-vhd/
First method. Second method: A lazier way is to download an already existing VHD HERE. Third Method: A great way to do it if you can’t create a VHD using Hyper-V (because you have Windows 7 like I do!) then you can use Virtual Box to do it. It’s simple, just make sure you select VHD for the hard-drive file type when you are creating your hard drive. Once you install the OS using virtual box you can attach that VHD file and use it with native boot. ***Side note for MCTs and those with access to Microsoft’s courseware on VHDs: You can just download them and skip the steps for creating them ![]() Make sure you run command prompt as Administrator. Do this by going to the start menu type in cmd, but don’t press enter press CRTL+SHIFT+ENTER. Press yes at the pop-up dialog. Another way to do this is by right clicking the icon and selecting “Run as Administrator.” Commands that you need to run under command prompt are in this blue color. Step 1 – Backup! Obviously.You can name the backup whatever you want and store it wherever you want. bcdedit /Export c:\bcd_backup Step 2 – basically makes a copy of your default profile which we will edit later. You can name the profile whatever you like, I chose to name mine Test Addition. bcdedit /copy {default} /d “Test Addition” Step 3 – take a note of the GUID that is created! It should look something crazy like this: {123f8871-1993-19e1-4e64-bgg8e7aff7b9}. You can copy it from the command prompt window by right clicking, selecting mark, selecting the text and then right clicking again. Step 4 – edit the entry for the new record you created using the GUID and keep the curly braces { } around it. After the vhd= put the path that you have the VHD stored at. Make sure you have the proper drive letter between the square brackets [ ]. I used my local path in the example below. bcdedit /set {YOUR GUID HERE} device vhd=[S:]\MCTVHD\Base10A-WS08R2-HV.vhd then run bcdedit /set {YOUR GUID HERE} osdevice vhd=[S:]\MCTVHD\Base10A-WS08R2-HV.vhd As a side note, if you use directories with spaces in the name to store the VHD you need to put the path in quotes; see example below. EXAMPLE: bcdedit /set {762f8074-1393-11e1-8e64-bdd8e7cdf7b9} osdevice vhd=[S:]“\MCT Classes\Microsoft Learning\623XB\Drives\623XB-MIA-DC\Virtual Hard Disks\Base10A-WS08R2-HV.vhd” Step 5 – Verify that the new boot record is there and that the path is correct. bcdedit If you mess anything up, you can always run the following command to remove the record you added: bcdedit /delete {Your GUID} Now all you have to do is restart your computer and select your OS from the boot-up menu (it will have the name you gave it). Next step, install SQL Server on your new OS and have fun! Or, you can start creating some VMs using Hyper-V and put SQL Server on there. —————————Special Instructions for MCTs looking to use existing VHDs————————— If you are a MCT and have access to the course ware VHDs then you don’t need to create anything. Use the BASE images (for example Base10A-WS08R2-HV.vhd) as your boot-up device for native boot. That is what I did in my example above. Then make a second copy of the base VHD somewhere else. Load up your Windows 2008R2 OS. The next steps are easy, just follow the instructions for creating the VMs using Hyper-V; it is a pdf file named something like 6231B_hvs.pdf. Once you have the OS loaded, you can copy the additional course ware VMs on to the local C drive of your new OS (which is actually your VHD file that you booted from). So essentially your native boot OS will be using the Base VHD and then you will use a copy of it to start up your lab. That way when you follow the instructions to setup the VMs you have all files where they need to be for things to work. Please note, your Base VHD may have a different name. I’m using the SQL Server Course 6231 Base VHD as an example. |
|