I wanted to run Windows Server 2008 R2 in a dual boot configuration on my Windows 7 RTM laptop – so that I can demonstrate Windows Server 2008 R2 features to partners when required.
This gave me an opportunity to use the new “Boot from VHD” feature on Windows 7 and Windows Server 2008 R2. Essentially, I would have Windows 7 on my laptop on one partition on the raw disk. The remaining space on the RAW disk (in my case 15 GB) will be allocated to a partition containing a VHD (Virtual Hard Disk) file, that can be mounted to boot the computer off the VHD file. I will be installing Windows Server 2008 R2 on this VHD file.
Here’s how I went about doing it.
Since I did not have any unallocated space on my hard drive, I used the “shrink” option on drive C in Windows 7 (Computer Management) to get some free space – and got 15 GB unallocated as seen in the above screenshot.
Next, I popped in the Windows Server 2008 R2 DVD.
At the Welcome screen above, I press SHIFT+10 to launch the WinPE console.
Once you get the WinPE console, use DISKPART to prepare a partition for the Windows Server 2008 R2 VHD:
- Type ‘DISKPART’ to launch the utility
- Type ‘LIST DISK’ to see the list of physical disks in your machine.
- Type ‘SEL DISK 0’ assuming you have only 1 physical disk installed
- Type ‘CREATE PARTITION PRIMARY’ to create a primary partition out of the free space
- Type ‘FORMAT FS=NTFS QUICK’ to quick-format the new partition on NTFS format
- Type ‘LIST VOL’ and look at what you’ve done
. Notice the asterisk next to the new partition (in my case, it’s Volume 3). - Type ‘ASSIGN’ to assign the next available drive letter to the selected partition.
- Type ‘LIST VOL’ again to see what drive letter was assigned (in my case, it’s E)
- Now for the magic: ‘CREATE VDISK FILE=E:\FILENAME.VHD MAXIMUM=15000 TYPE=EXPANDABLE’ – this creates a dynamically expandable VHD file filename.vhd on the new volume with a maximum size of 15000 MB. Keep the maximum size lesser than the size of the partition.
- Notice that once you finish this command, Windows 7 detects virtual hardware “Microsoft VHD HBA” and installs it.
- Type ‘SELECT VDISK FILE=E:\filename.vhd’
- Type ‘ATTACH VDISK’ to attach the VHD disk.
- Type ‘CREATE PARTITION PRIMARY’ to create a primary partition inside the VHD.
- Quick format the partition on NTFS by issuing the ‘FORMAT FS=NTFS QUICK’ command
- Assign a drive letter V: on this volume ‘ASSIGN LETTER=V:’
- LIST VOL to see what you’ve achieved.
- Volume 1 and 2 were pre-existing Windows 7 volumes
- Volume 3 (E:) is the disk that we created to store the VHD file
- Volume 4 (V:) is the virtual disk inside the virtual machine (uses space on E:)
Type EXIT DISKPART to close the utility and close the WinPE session.
Next, continue with the Windows Server 2008 R2 installation from Windows 7. Do not choose the upgrade option, choose the New Installation option.
Choose to install Windows on the partition you just created.
When installation is complete, and you restart your computer, a boot loader menu appears, where you can choose to boot Windows 7 or Windows Server 2008 R2.
RSS Feed
Twitter
Shijaz Under Uncategorized
Tags: 

Was Wins 7 already installed on your laptop before installing Sr2008?
Thank you.
Yes. Windows 7 was installed.
32 bit i'm assuming?
No, 64 bit all the way!
64bit version of Windows 7 Ultimate and Windows Server 2008 R2 of course is 64 bit.
Let’s say that I have some virtual machines (created in a Win. Server 2008 R2 Hyper-V) stored in the partition of Windows 7.
I want to know if I’m gonna be able to see and use these virtual machines from the VHD partition running 2008 R2, as well as the rest of the files from the W7 partition
Thanks
In the last step, should i install windows 2008 server in E or V.
V:
Quick question… Does anything special need to be done to allow booting from a VHD? When I’ve tried this, the installation will nto allow me to install on the vhd because it is not bootable. Any ideas? Thanks for you help!
That’s strange… Make sure you followed the steps correctly.
i did all that went to install and i get a error not enoth temp memory (533mb needed) i free’d up 102gbs for this windows server 2008 install i have more than enoth space 100gb on c drive 300gb on d
its only 1 hdd 500gb would you happen to know why its coming up with this probem
using windows 7 64bit pro
want to install duel boot windows server 2008 64bit
this computer does not have enough space for temporary files. windows installation needs at least 535 megabytes (MB) of space on any partition for temporary files. to install windows, free enough space and restart the installation
error code 0×80070103
i dont understand the problem when i have put 102gb for it to install on