Need a Server? Build it in the cloud for free

       

Part 1 – Build a Windows Server 2008 R2 SP1 Cloud Foundation Test Lab in Less Than an Hour (includes sysprep images)

Overview:

In this series we will teach you how to setup a cleanly installed Windows Server 2008 R2 SP1 machine to run Hyper-V. We will create a new virtual machine and make that machine a domain controller. Then we will make the host a member of the newly created domain. Upon completing this Test Lab Setup, you will have your cloud foundation built. The next logical step to build out your cloud is to install and configure System Center (download from http://aka.ms/lab). Installing System Center can take many hours so it is beyond the scope of this series.

Many people have told me they have lots of problems with BCDEdit. Others have told me they are afraid to do it for fear of making a mistake. To simplify the process I have created a batch file that takes a few parameters to “install” the boot to VHD into BCDEdit for you. It is a batch file that requires only one parameter and that is the full path and file name of the .VHD file. It has two other optional parameters to set the Menu Description and to set this entry to be the default. See below for the syntax and examples.

Assumptions:

  • Your hardware meets the requirements to run Windows Server 2008 R2 SP1 with Hyper-V See Hyper-V Role-Identifying Hardware Requirements for more details  If you need to download Windows Server 2008 R2 SP1, you can get it from http://aka.ms/lab
  • You already have Windows 7 or higher running on your computer
  • Network drivers are installed and working
  • You have a sysprep image (see below for downloads)
  • You have downloaded the script to install the VHD in your Boot Configuration Data

This article assumes you already have a VHD.  See below for links to downloads.  If you prefer to make your own see Native Boot To VHD Part I of IV – Overviewwhich is a four part video series to learn how to create a boot to VHD.

If you make a mistake while “playing” with BCDEdit see Server 2008 R2 or Windows 7 System Will NOT Boot After Making Changes To Boot Manager Using BCDEdit.

If you have a bootable VHD all you need to do is download the attached .TXT file and save it as a .CMD file. I recommend you save it to the location where you put your BOOT2VHD.VHD file. Open an Administrative command box and launch the program with the proper parameters.

Start | type cmd | CTRL-SHIFT-ENTER | Accept UAC prompt

navigate to the place you put the downloaded command file and execute the command file with the proper parameters.

NOTE: You must run the command from an elevated command prompt.
Syntax: AutoBootVHD-BCD.cmd (VHD_FileName_AND_Path) [BootMenuDescription] [-d]
BootMenuDescription is optional and defaults to “Boot2VHD”
-d is optional and will make this entry the default boot option
Ex: AutoBootVHD-BCD D:\bootvhd\Boot2008R2.vhd My_Boot_To_VHD –d
If you have a path or description with spaces put quotes around it
Ex: AutoBootVHD-BCD “D:\My VHds\Win 2008 R2.vhd” “My Boot2Vhd” –d
Written by Dan Stolts ITProGuru no warranties, Use at your own risk

Example (not case sensitive):

  • If your VHD file is named Win7UltSP1.VHD and you have it stored at c:\Boot2VHD\
  • You want to set the boot menu description to “Windows 7 SP1 Boot2VHD” you would execute the following from an elevated command prompt…
c:
cd \boot2vhd
AutoBootVHD-BCD.cmd c:\boot2VHD\Win7UltSP1.VHD “Windows 7 SP1 Boot2VHD”

Download the Script Here… (provided in .cmd, txt and .zip)

Once you run the commend, reboot and you should see the new boot option menu. Boot to the new system and finish the Windows installation (admin password, etc)

Stay tuned for upcoming parts to complete this exercise  – Hope to get it posted today or Monday.

Assumptions:

  • You are currently running windows 7 or later
  • Have network drivers already downloaded and available
  • Have downloaded or created sysprep image(s) (the images below are made with Evaluation software which means you cannotadd a key to extend them.  If you will be using in production, please make your own sysprep images)
  • d. Have downloaded AutoBootVHD-BCD files – AutoBootVHD-BCD download link (tiny) These are simple text files (DOS batch file) so you can easily see what is happening

Related Articles:

Coming Soon:

  • Part 4 – Build a Windows Server 2008 R2 SP1 Cloud Foundation Test Lab in Less Than an Hour–Setup Networking and Misc (rename computer, user settings)
  • Part 5 – Build a Windows Server 2008 R2 SP1 Cloud Foundation Test Lab in Less Than an Hour–Create Virtual Machine
  • Part 6 – Build a Windows Server 2008 R2 SP1 Cloud Foundation Test Lab in Less Than an Hour–DC Promo Guest
  • Part 7 – Build a Windows Server 2008 R2 SP1 Cloud Foundation Test Lab in Less Than an Hour–DC Promo Guest
  • Part 8 – Build a Windows Server 2008 R2 SP1 Cloud Foundation Test Lab in Less Than an Hour–Install SCVMM 2012
  • Part 9 – Build a Windows Server 2008 R2 SP1 Cloud Foundation Test Lab in Less Than an Hour–Remove Boot Configuration Data (uninstall lab)
  • Part 10 BONUS – Build a Windows Server 2008 R2 SP1 Cloud Foundation Test Lab in Less Than an Hour–Windows Server “8” Foundation

This entry was posted in Cloud and tagged , , , , , , by Dan Stolts ITProGuru. Bookmark the permalink.

About Dan Stolts ITProGuru

Dan Stolts (The "ITProGuru") is a technology expert who is a master of systems management and security. He is proficient in many Microsoft products especially in the server area (Windows Server, System Center, Exchange, SharePoint, Virtualization, Etc) and holds many certifications including MCT, MCITP, MCSE, TS, etc. Dan is currently specializing in System Management and Security and is also very passionate about virtualization technologies. Dan is and has been a very active member of the community. He is president of Boston User Groups, Founder of Virtualization Group Boston, Founder of North East Leaders and serves on many IT Community group boards. He is in the process of writing his first book on building technology communities. He is a believer in social networking and can be reached on twitter @ITProGuru. He has participated in many non-technology community groups such as: Rotary Club, Lions Club, local Chambers of Commerce and is a mentor for the local high schools. Dan is an enthusiastic advocate of technology and is passionate about helping others. Dan's lifelong passion has been and continues to be to help and teach others!

One thought on “Part 1 – Build a Windows Server 2008 R2 SP1 Cloud Foundation Test Lab in Less Than an Hour (includes sysprep images)

  1. I attended the Private Cloud Hands on Lab in NYC and it was great. I am now trying to setup my own private cloud lab using the
    documentation but have an issue with virtua networking. I was hoping someone can assist me my email is above.

    Thank You
    John

Leave a Reply