Search This Blog

Monday, July 25, 2011

Windows 7 Native Boot from VHD

When I bought my home computer (HP p6330f, Intel i3, 6GB RAM), I wiped the HDD and installed Windows 2008 R2 Enterprise Edition and set it up as a Hyper-V host. My main purpose of installing the server OS is to build a virtual lab environment to try different applications.

For fun staff (like checking e-mail, web sites, watching videos, writing blog articles....), I created Windows 7 VM. But as you know, virtual machines have hardware limitations like, USB device is recognized directly, audio and video driver compatibility issue. My Windows 7 VM doesn't have audio capability either.
The parent OS has also a known limitation in playing mov and mpeg4 format, so I decided to set up the PC so that it boots Windows 7 natively from VHD.
Now my Windows 7 can play audio & video and recognize USB devices natively.

The procedure is very simple but some points you should know.
You need a VHD installed Windows 7 Enterprise or Ultimate. (other editions of Windows 7 don't have this capability). You can create VM and copy a vhd file anywhere in your local drive but the disk must be basic not dynamic and formatted as NTFS.
A VHD can not be saved in a shared folder.

1. Start Command Prompt as an administrator

2. Type the following commands
BCDEDIT /copy {current} /d "Windows 7 (VHD)"
Windows 7 (VHD) is the name that will be listed when the machine boot, so you can choose any name you want.
The ID (9829fe28-ab1e-11e0-b6ba-d34fb3d32885) will be displayed. Use this ID for the next three commands

3. Type the following commands one line at a time.
BCDEDIT /set {9829fe28-ab1e-11e0-b6ba-d34fb3d32885} device vhd=[c:]\VMs\PC1.vhd
BCDEDIT /set {9829fe28-ab1e-11e0-b6ba-d34fb3d32885} osdevice vhd=[c:]\VMs\PC1.vhd
BCDEDIT /set {9829fe28-ab1e-11e0-b6ba-d34fb3d32885} detecthal on vhd=[c:]\VMs\PC1.vhd

[C:]\VMs\PC1.vhd is the path to the vhd file you want to use to boot. Do not miss "[" and "]". You will get an error.

After that you can review the change you just made to Boot Configuration.

4. Reboot PC
Once PC starts, 2 choices, Windows 2008 R2 and Windows 7 (VHD) will be displayed.
Select Windows 7.

In my case, Windows 7 didn't start and went to the next screen asking Start System Recovery or Windows 7 normally. The both options wouldn't work. Windows 7 didn't start because in my PC's BIOS settings SATA controller is set to AHCI while vhd is IDE.
I went into the BIOS settings and change the SATA controller from AHCI to IDE.
Now Windows 7 started as I expected.

5. When I boot to Windows 2008 R2, I had to change the SATA controller settings too. This   time I selected AHCI first but it didn't work (I don't know why). So I selected SCSI. 2008 R2 started.

When Windows 7 started, drivers will be installed and it will reboot again.
After reboot, type the following command.
BCDEDIT /deletevalue {9829fe28-ab1e-11e0-b6ba-d34fb3d32885} detecthal

Friday, July 8, 2011

2008 RDS CAL is Backward Compatible, BUT ...

It can't be installed into 2003 License Server. It has to be installed into 2008 or 2008 R2 License Server.

In 2000 and 2003, as long as I remember, when you purchase the Terminal Service CAL license, you receive the CAL key. That's what I expected but the license for 2008 and 2008R2 is different.
The CAL key will not be provided until you contact Microsoft during the License server configuration.

1. On the Server Manager, click "Add roll" and select "Remote Desktop Services"

2. Select Remote Desktop Licensing

3. If you want to install the license for a forest or a workgroup, check Configure a discovery scope... and select a desirable choice. Otherwise accept the default (Domain).

4. When the Remote Desktop Licensing roll was installed, open RD Licensing Manger from Administrative menu --> Remote Desktop

5. Expand All servers and right-click on the license server

6. Select Active Server. Activate Server Wizard will start.

7. Select Telephone from the Connection method drop down menu.

8. Select the country.

9. Make sure you have the authorization number and license agreement number for the CAL handy. Call the given phone number. The support technician will issue the CAL key and walk you through the rest of the process.

You can run Terminal /RD License service for 120 days without installing a purchased CAL key.