Excerpt From The Road Warriors Survival Guide Part 1 of 2 "The Laptop Build”

As I stated in my welcome post, I work pretty heavily with Microsoft Hyper-V and our Datacenter products. Since my work often takes me into very secure places, it can be quite a challenge to demo things like guest clustering, virtual networking, or other virtualization concepts when you don’t have Internet access to reach a remote lab. Now add the fact that Microsoft, like most corporations, has specific image requirements before you can be considered a good "corporate citizen," and quickly I found myself having to choose between adhering to the corporate image and serving my customers…

So my question became, How can I have a reliable lab on the go and still comply with the latest IT policies? Well, thanks to a group of fellow road warriors, and hours of trying out different configurations, I now have a base framework to be a good corporate citizen and still have a pretty dynamic lab on-the-go. The solution involves dual-booting between my corporate image (Windows 7) and my lab image (Windows 2008 R2). I'm also using boot from VHD to help reduce my dependency on the weakest link in the hardware chain: the hard drive.

In part one I'll cover how you can build your base laptop image, step-by-step. In part two, I add some extra networking steps that will help ensure your lab VMs have internet access over wired and wireless!

Target: Highly flexible laptop configuration for my corporate image and lab on the go

Kill Shot: Dual boot to VHD with lab environment spinning on external disk

 

 

Getting Started – The Boot Options

Look at each choice below and choose the correct boot option based on your desired image.

A. To install from PXE boot (this assumes you have a PXE server in your environment of course)

1) PXE boot and hit F12

2) Select a Win7\Server 2008 R2 install image that does not use OSD wizard ( you need to get to the default windows install screens)

 

B. To install from DVD

1) Verify the BIOS is configured to boot from DVD

2) Boot from DVD and allow files to load until you get to the default windows installation screen

C.      To install from USB

1) Verify the BIOS is configured to boot from USB

2) Boot from USB and allow files to load until you get to the default windows installation screen

 

Create the First Virtual Hard Disk – Windows 7

The first OS installed should be Windows 7, or your corporate image. While there haven’t been any issues noted in installing Server 2008 R2 first, the majority of testing has been done with this configuration.

1) At the Windows Install Screen hit SHIFT+F10

 

  2) Type Diskpart and hit Enter

  3) Type List Disk and hit Enter

  4) Type Select Disk # and hit Enter (where # is number of the disk where you want to create your VHD)

  5) Type Clean and hit Enter (warning, this will remove references to the data on the disk. Only do this if you are creating the first VHD on a new Drive)

  6) Type List Disk and hit Enter (you should see the disk you selected with all of the disk space free)

  7) Type Create part pri and hit Enter

  8) Type format fs=ntfs quick and hit Enter

  9) Type List Vol and hit Enter (you should see a new volume created and selected formatted NTFS)

10) Type Select Volume # (where # is number of the volume where you want to create your VHD)

11) Type Assign and hit Enter

12) Type List Vol and hit Enter (a drive letter should now be assigned to the volume)

13) Type Create vdisk file=”c:\win7.vhd” maximum=40000 type=fixed and hit Enter (drive letter and file path should match your configuration. Drive size is optional but should be set to FIXED in order to support Bitlocker)

14) Type select vdisk file=”c:\win7.vhd” and hit Enter

15) Type Attach Vdisk and hit Enter

16) Type Create part pri and hit Enter

17) Type format fs=ntfs quick and hit Enter

18) Type List vol and hit Enter (you should see the VHD volume without a drive letter)

19) Type List Disk and hit Enter (you should see the VHD disk in addition to your physical disk)

20) Type Exit and hit Enter to end the diskpart utility

21) Type Exit and hit Enter to bring you back to the Windows install (if you reboot before the install you have to hit SHIFT+F10 again to reattach the VHD via diskpart so that it is an option during install)

 

Install the First Operating System – Windows 7

After exiting out of the command window, you should be back at the Windows install screen where you can proceed with installing Windows 7.

NOTE: The next set of steps may vary based on your install media. If you are using a custom install package, you may not see the same set of options during install.

1) Accept License Agreement, select locale, and click Next

2) If prompted, select Custom (Advanced) Install

3) If prompted, select Operating System and click Next

4) Select the Disk that matches the size of the VHD you created and attached in the previous section then click Next

(NOTE: You may see an error that states “Windows cannot be installed to Disk # Partition # ”, you should still be able to proceed.)

 

5) Allow the Windows installation to complete

Create the Second Virtual Hard Disk – Windows Server 2008 R2

Please refer back to the section above on Boot options to select the desired Windows Server 2008 R2 image

The first OS, Windows 7, should already be installed. Now we will create the second VHD to install Windows Server 2008 R2. Once you have followed the boot process described earlier in this document, based on your desired image, proceed with the steps below.

 

1) At the Windows Install Screen hit SHIFT+F10

 

  2) Type Diskpart and hit Enter

  3) Type List Disk and hit Enter

  4) Type Select Disk # and hit Enter (where # is number of the disk where you want to create your VHD)

  5) Type List Disk and hit Enter (you should see the disk you selected, free space may show 0G available)

  6) Type List Vol and hit Enter (note the drive letter assigned to the volume where you want to create the VHD)

  7) Type Select Volume # and hit Enter (where # is number of the volume where you want to create your VHD)

  8) Type Create vdisk file=”c:\Srv2K8R2.vhd” maximum=40000 type=fixed and hit Enter (Drive letter and file path should match your configuration. Drive size is optional but should be set to FIXED in order to support Bitlocker. Under some testing, the Server 2008 R2 image blue screened when not set to fixed after enabling Bitlocker.)

  9) Type select vdisk file=”c:\ Srv2K8R2.vhd” and hit Enter

10) Type Attach Vdisk and hit Enter

11) Type Create part pri and hit Enter

12) Type format fs=ntfs quick and hit Enter

13) Type List vol and hit Enter (you should see the VHD volume without a drive letter)

14) Type List Disk and hit Enter (you should see the VHD disk in addition to your physical disk)

15) Type Exit and hit Enter to leave the diskpart utility

16) Type Exit and hit Enter to bring you back to the Windows install (if you reboot before the install you have to hit SHIFT+F10 again to reattach the VHD so that it is an option during install)

 

Install the Second Operating System – Windows Server 2008 R2

After exiting out of the command window, you should be back at the default windows install screen where you can proceed with installing Windows Server 2008 R2.

NOTE: The next set of steps may vary based on your install media. If you are using a custom install package, you may not see the same set of options during install.

1) Select Locale and click Next

2) Select Operating System and click Next  

3) Check License agreement and choose Custom Install

4) Select the Disk that matches the size of the VHD you created and attached and click Next (NOTE: You may see an error that “Windows cannot be installed to Disk # Partition # ”, you should still be able to proceed.)

 5) Allow the Windows installation to complete

Enable Bitlocker for Windows 7 and Verify TPM (optional)

In order for your machine to pass network security health scans, connect remotely via VPN, or connect remotely via direct access, your corporate environment may require you to have Bitlocker, with TPM, enabled. Follow the steps below to enable Bitlocker.

You must be connected to your corporate network (remotely or internally) to enable certain Bitlocker features. This is required if you have, or your administrator has, decided to store the Recovery Key in Active Directory. Given the nature of this build, it is HIGHLY RECOMMENDED that you keep your recovery key readily available

1. Open Control Panel>All Control Panel Items>Bitlocker Drive Encryption

2. Click “Turn on Bitlocker” and follow the wizard to configure Bitlocker

 

Enabling Bitlocker will take a while; the time is proportional to the virtual disk size.

 

Enable Desktop Experience and Wireless LAN Services for Windows Server 2008 R2

There are several additional features that can be installed to provide more productive functionality while running Windows Server 2008 R2 in your lab environment. Two examples are Desktop Experience and Wireless LAN Services. To enable these features, follow the steps below.

 

Note: You will likely need to install wireless drivers to complete the following steps. (Hint: if you cant find Server 2008 R2 drivers, try the x64 WIndows 7 drivers)

1. Open Server Manager and click on Features

2. Click Add Features

3. Select Desktop Experience and Wireless LAN Services (if any prerequisites are needed, you will be prompted to install these also.)

4. Click Next and confirm installation items

5. Click Install and when the installation is complete, click Close and Yes to reboot.

 

 

Enable Hyper-V for Windows Server 2008 R2

If you chose to enable Bitlocker on your Windows 7 machine, once it is completed, you can now enable Hyper-V. Ideally, you want to have an additional drive large and fast enough, to hold and run your VHDs. For optimum performance you can add an additional drive if you have an extra bay or use a USB 3.0 port. The external drive allows you to have multiple environments without the limitation or performance hit of storing VHDs inside of VHDs. To install Hyper-V, follow the steps below.

 

1. Open Server Manager and click on Roles

2. Click Add Roles

3. Click Next on the Before You Begin screen (if not skipped) and then select the Hyper-V server role

4. Follow prompts to complete Hyper-V installation

 

Articles and Authors Referenced to Create this Document

My journey to find the exact solution that worked for me was aided by the efforts of many others. I definitely want to give credit to the resources that help me pull it together.