KezNews.com
DownloadsOther NewsForumBlogsWallpapersJokewareSearch

News letter:


Enter Your E-mail:

Windows 7 RTM 7600.16385.090713-1255 HERE !

How to activate Windows 7 RC build 7600, 7264, 7231 and olders


How can I install Windows 7 or Windows Server 2008 R2 to a virtual hard disk (VHD) file?

section: windows, for your questions: KezNews forum, 17.2.2009

    Tip: Click here to update all your PC's outdated drivers

Windows 7 and Server 2008 R2 add the ability for an OS to be installed onto a virtual hard disk (VHD) file to boot physical hardware. To do this, perform the following steps.




  1. Boot from the Windows 7 or Server 2008 R2 media.
  2. Select language options and click Next.
  3. At the Install Now screen, press Shift and F10 simultaneously to open a command prompt window. You'll partition the disks and create your VHD file in this window.
  4. Select the disk and wipe all of its existing content using the following commands.
    diskpart
    list disk
    select disk 0
    clean
  5. Create a 200 MB system partition using the following commands. The Windows 7 and Server 2008 R2 installation procedures normally create this partition automatically.
    create part primary size=200
    format fs=ntfs label="System" quick
    active
  6. Create a partition using the rest of the space on the disk. This partition will hold the VHD files. I call the partition Boot, but you can call whatever makes sense for you. Also, I've used the C drive, but when you boot to the VHD the drive letters will shift. If you assign a different letter, make sure to use the new letter in step 7.
    create part primary
    format fs=ntfs label="Boot" quick
    assign letter=C
  7. Create a VHD file on the C drive. In this example, I've created it as a 25 GB file that is an expandable disk. You can use "type=fixed" instead of "type=expandable" to create a fixed-size VHD. A fixed-size VHD will use space on the physical disk equal to its full size as soon as the VHD is created but will give better performance, so I recommend fixed-size disks for uses other than testing.
    create vdisk file=c:\win7ult.vhd maximum=25000 type=expandable
    select vdisk file=c:\win7ult.vhd
    attach vdisk
    create partition primary
    format fs=ntfs label="Win7Boot" quick
  8. You can now list your volumes with the command
    list vol
    An example list is shown here.

    Click to expand

  9. Exit Diskpart and close the command prompt window by entering the "exit" twice.
  10. Proceed with the installation. When you're asked to select the installation target, choose the VHD partition you created. The installer will warn that you cannot install it on the partition, but you can ignore the warning.

    Click to expand

Installation will now progress as usual. Once installation is finished, you can see that the VHD partition is now the C drive while the partition containing the VHD files is demoted down to the D drive, as shown here. If you look at the contents of the drives, you'll see D contains the VHD file and C, the content of the VHD, looks like a standard drive with a Windows installation. The 200 MB partition you created doesn't have a drive letter and is essentially invisible to the OS.

Click to expand



Booting from a VHD is explained in the following video.

source: windowsitpro.com

  >> Click Here to Run a Free Scan for PC Errors <<

send email Send link 2 friend  |  Permalink
<< previouse article
Microsoft sued over Vista-XP downgrade
next article >>
Start Windows

MORE RELATED ARTICLES:
How to install Windows 7 on a virtual hard disk - VHD || Free Windows Server 2008 R2 Evaluation Installation ISO and VHD for Hyper-V Official Direct Download Links || Windows Server 2008 R2 SCONFIG || Windows 7, Server 2008 R2 released to manufacturing || Microsoft.com moves to Windows Server 2008 R2 beta

Comments(2)

64 bit only?

By Graham on 18.02.2009 - 13:02
i would presume as hyper-v is only available on the 64bit hardware versions of server 2008, that this will also only work on 64bit windows 7 ???

my mistake

By Graham on 19.02.2009 - 05:02
my mistake, dont need hyper-v , this just lets you make a vhd file to boot from with your native pc.


No new comments are allowed for this article.

For your questions use our KezNews Forum