7
05/12/13 How to Create Windows 8 VHD for Boot to VHD using simple, easy to follow steps - Harold Wong's Blog with Geekie Thoughts and Insights - Site Ho… blogs.technet.com/b/haroldwong/archive/2012/08/18/how-to-create-windows-8-vhd-for-boot-to-vhd-using-simple-easy-to-follow-steps.aspx 1/7 Get System Center 2012 Eval Bits Get Windows Server 2012 Eval How to Create Windows 8 VHD for Boot to VHD using simple, easy to follow steps 37 Harold Wong 18 Aug 2012 8:03 PM I just finished holding a few Windows 8 / Windows Server 2012 Installfests both with IT Pros in mind and with Developers in mind. Time and time again, I got asked the same questions around how to create the VHD that has the Windows 8 installation in it. There are quite a few blog posts out there and so I didn’t create my own, but it became evident to me that the ones most often referenced are very hard to follow and require lots of command line utilities that make it hard for people to duplicate. For that reason, I have decided to create my own blog post with much simpler steps using mostly GUI based tools. The steps I am outlining below can be used to create a Windows 7, Windows 8, Windows Server 2008 R2 or Windows Server 2012 VHD. I have placed the imagex.exe in my drop box folder so feel free to grab them: https://www.dropbox.com/sh/hwtz3hqtz589wgz/ug3YlEj_sb?m In order to perform the steps in my blog, there are a couple of things that you will need to have access to – all of which are free. I will use a deployment utility called ImageX.exe from the Windows Automated Installation kit (WAIK). Also, you will need to have some way to either mount an ISO image or have the DVD or thumb drive with the Windows 8 installation media on it. I happen to use a freeware tool called Magic ISO CD/DVD Manager to mount ISO images. Before I provide the detailed steps, let me just provide an overview of the process. 1. First, I need to be running Windows 7 or higher or Windows Server 2008 R2 or higher in order to perform these steps and have administrative access. 2. I then need to create a VHD file and format it. 3. Mount the ISO of Windows 8 (or have the thumb drive or DVD inserted or just have the source files available). 4. Open a Command Prompt (run as Administrator). 5. Use ImageX to “install” Windows 8 into the VHD. 6. Add the installation of Windows 8 to the boot menu. Now, for the details behind the above 6 steps. I will be providing screen shots of this process from a Windows 7 machine. Create and mount VHD A. To create and mount the VHD, I will use the Computer Management console to access Disk Management. I can start this by running it from the Administrative Tools Group or right click on Computer and choose Manage. B. Once Computer Management console opens, I will click on Disk Management on left pane and wait for the list of drives to refresh. Once the list of drives appear in the middle pane, I will right click Disk Management and select Create VHD.

How to Create Windows 8 VHD for Boot to VHD Using Simple

  • Upload
    nykroy

  • View
    77

  • Download
    1

Embed Size (px)

DESCRIPTION

How to Create Windows 8 VHD for Boot to VHD Using Simple

Citation preview

Page 1: How to Create Windows 8 VHD for Boot to VHD Using Simple

05/12/13 How to Create Windows 8 VHD for Boot to VHD using simple, easy to follow steps - Harold Wong's Blog with Geekie Thoughts and Insights - Site Ho…

blogs.technet.com/b/haroldwong/archive/2012/08/18/how-to-create-windows-8-vhd-for-boot-to-vhd-using-simple-easy-to-follow-steps.aspx 1/7

Get System Center 2012 Eval Bits Get Windows Server 2012 Eval

How to Create Windows 8 VHD for Boot to VHDusing simple, easy to follow steps

37Harold Wong 18 Aug 2012 8:03 PM

I just finished holding a few Windows 8 / Windows Server 2012 Installfests both with IT Pros in mind and with Developers in mind. Timeand time again, I got asked the same questions around how to create the VHD that has the Windows 8 installation in it. There are quitea few blog posts out there and so I didn’t create my own, but it became evident to me that the ones most often referenced are very hardto follow and require lots of command line utilities that make it hard for people to duplicate. For that reason, I have decided to create myown blog post with much simpler steps using mostly GUI based tools. The steps I am outlining below can be used to create a Windows7, Windows 8, Windows Server 2008 R2 or Windows Server 2012 VHD.

I have placed the imagex.exe in my drop box folder so feel free to grab them:https://www.dropbox.com/sh/hwtz3hqtz589wgz/ug3YlEj_sb?m

In order to perform the steps in my blog, there are a couple of things that you will need to have access to – all of which are free. I will usea deployment utility called ImageX.exe from the Windows Automated Installation kit (WAIK). Also, you will need to have some way toeither mount an ISO image or have the DVD or thumb drive with the Windows 8 installation media on it. I happen to use a freeware toolcalled Magic ISO CD/DVD Manager to mount ISO images.

Before I provide the detailed steps, let me just provide an overview of the process.

1. First, I need to be running Windows 7 or higher or Windows Server 2008 R2 or higher in order to perform these steps and haveadministrative access.

2. I then need to create a VHD file and format it.3. Mount the ISO of Windows 8 (or have the thumb drive or DVD inserted or just have the source files available).4. Open a Command Prompt (run as Administrator).5. Use ImageX to “install” Windows 8 into the VHD.6. Add the installation of Windows 8 to the boot menu.

Now, for the details behind the above 6 steps. I will be providing screen shots of this process from a Windows 7 machine.

Create and mount VHD

A. To create and mount the VHD, I will use the Computer Management console to access Disk Management. I can start this byrunning it from the Administrative Tools Group or right click on Computer and choose Manage.

B. Once Computer Management console opens, I will click on Disk Management on left pane and wait for the list of drives torefresh. Once the list of drives appear in the middle pane, I will right click Disk Management and select Create VHD.

Page 2: How to Create Windows 8 VHD for Boot to VHD Using Simple

05/12/13 How to Create Windows 8 VHD for Boot to VHD using simple, easy to follow steps - Harold Wong's Blog with Geekie Thoughts and Insights - Site Ho…

blogs.technet.com/b/haroldwong/archive/2012/08/18/how-to-create-windows-8-vhd-for-boot-to-vhd-using-simple-easy-to-follow-steps.aspx 2/7

C. The Create and Attach VHD Wizard appears. I have to provide a name of the VHD file that I want to create (specify directorylocation), size and type (dynamic or fixed). You can specify the size and type that meets your needs, but keep in mind that thesize of the partition you set is important as you will need that much actual free disk space in order to boot to that VHD. Also thetype determines how much disk space will always be in use. Since I use laptops for most of my work and I don’t have 1 TB laptopdrives, I try to keep the size of all my VHDs that I use for multi-boot purposes to a minimal size. I find that 20 GB partitions isplenty and that dynamically expanding work just fine for my purposes.

D. Once I click OK, the new VHD file is created and automatically mounted and visible in Disk Management. From there I rightclick Disk 2 and select Initialize to Initialize the disk as MBR. After the disk is initialized, I create and format a simple volume.

Page 3: How to Create Windows 8 VHD for Boot to VHD Using Simple

05/12/13 How to Create Windows 8 VHD for Boot to VHD using simple, easy to follow steps - Harold Wong's Blog with Geekie Thoughts and Insights - Site Ho…

blogs.technet.com/b/haroldwong/archive/2012/08/18/how-to-create-windows-8-vhd-for-boot-to-vhd-using-simple-easy-to-follow-steps.aspx 3/7

E. After the disk has been formatted, Windows 7 automatically assigns a drive letter to the volume (in my example, it is F:). Ihave also mounted the ISO of Windows 8 Enterprise 90 Day Eval and it is available as drive E: in my example.

F. I then start a command prompt running as Administrator and go to the directory in which my ImageX.exe is located (makes itsimple and in my case it is C:\Source).G. In the command prompt, I issue the following command: imagex /apply e:\sources\install.wim 1 f:\

I am essentially installing Windows 8 from the install.wim file located in the sources directory of the source files and selecting the1st OS instance in the WIM file and installing it to drive F:\ (VHD file)

Page 4: How to Create Windows 8 VHD for Boot to VHD Using Simple

05/12/13 How to Create Windows 8 VHD for Boot to VHD using simple, easy to follow steps - Harold Wong's Blog with Geekie Thoughts and Insights - Site Ho…

blogs.technet.com/b/haroldwong/archive/2012/08/18/how-to-create-windows-8-vhd-for-boot-to-vhd-using-simple-easy-to-follow-steps.aspx 4/7

H. Once the process completes, I can dismount the VHD and save a copy off for future use or immediately add it to the bootmenu. To dismount the VHD, go to Disk Management and right click Disk 2 and select Detach VHD.

I. Once I make a backup copy of the VHD file for future use, I will go ahead and Mount the VHD again to add that installation tothe boot menu. To do this, I will right click Disk Management and select Attach VHD. The Attach VHD Wizard will start. I caneither browse to the VHD or just type it in the Location field.

Page 5: How to Create Windows 8 VHD for Boot to VHD Using Simple

05/12/13 How to Create Windows 8 VHD for Boot to VHD using simple, easy to follow steps - Harold Wong's Blog with Geekie Thoughts and Insights - Site Ho…

blogs.technet.com/b/haroldwong/archive/2012/08/18/how-to-create-windows-8-vhd-for-boot-to-vhd-using-simple-easy-to-follow-steps.aspx 5/7

J. The VHD will be mounted and will be assigned a drive letter by the system. In my case, it is drive F: again.K. Go back to the Administrative Command Prompt and type the following command to add the installation to the Boot Menu:

bcdboot F:\windows

L. Once the command finishes, you will now have the new Windows 8 entry in your boot menu.

The first time you boot to this installation, Windows 8 will detect your devices and install the appropriate drives and then reboot. Uponreboot, you will configure the computer name and a user account like you normally would on a new Windows 8 installation.

If you no longer want to have this option in your boot menu, use MSCONFIG (boot tab) to delete the unwanted entry.

Hopefully, this simple and easy to follow guide will help you to successfully create and boot to your own installations of Windows 8 (orWindows Server 2012).

Harold Wong

Comments

Page 6: How to Create Windows 8 VHD for Boot to VHD Using Simple

05/12/13 How to Create Windows 8 VHD for Boot to VHD using simple, easy to follow steps - Harold Wong's Blog with Geekie Thoughts and Insights - Site Ho…

blogs.technet.com/b/haroldwong/archive/2012/08/18/how-to-create-windows-8-vhd-for-boot-to-vhd-using-simple-easy-to-follow-steps.aspx 6/7

Doug Spindler

19 Aug 2012 9:54 AM

Harold - This is great. Thanks for posting.

Ed

20 Aug 2012 8:00 AM

Thanks.

Oh, your files at http://aka.ms/hwitcampfiles are offline [or otherwise].

Harold Wong

20 Aug 2012 11:22 AM

Ed, I'm not sure what you mean by offline. They are live and fully accessible. There should be 5 files in the folder.

Harold

swapnil prajapati

21 Aug 2012 10:47 AM

Thanks for post, it is very usefull

Ken

23 Aug 2012 9:15 AM

Wouldn't it be possible to take these vhd files and use them as templates for imaging, or do they need to be converted to wimfiles first?

lama

28 Aug 2012 4:54 PM

Harold,

I am getting an error.

Error (509)

This account's public links are generating too much traffic and have been temporarily disabled!

Thanks

Harold Wong

28 Aug 2012 8:26 PM

1. Issue with Dropbox and Error 509: I have contacted Dropbox to resolve this issue. Please be patient while I work throughthis.

2. You cannot use the VHD as imaging templates. You also can't convert a VHD to a WIM.

Harold

Knuckle-Dragger

6 Sep 2012 2:28 AM

Thanks, I'll pass on the 8 GB VM's but the knowledge is good to have.

Aaron Perrault

7 Sep 2012 6:42 AM

Page 7: How to Create Windows 8 VHD for Boot to VHD Using Simple

05/12/13 How to Create Windows 8 VHD for Boot to VHD using simple, easy to follow steps - Harold Wong's Blog with Geekie Thoughts and Insights - Site Ho…

blogs.technet.com/b/haroldwong/archive/2012/08/18/how-to-create-windows-8-vhd-for-boot-to-vhd-using-simple-easy-to-follow-steps.aspx 7/7

1 2 3

Harold

Are these also VHDs that I can mount and use in Windows 7 Virtual PC? I have created the new VMCX file, mounted the VHDin disk manager, but when i try and power these devices on, I get an error. It says Encountered an error when attempting to useone of its virtual hard disks.

Thanks

Aaron

Harold Wong

7 Sep 2012 6:57 AM

Aaron,

Normally, you would be able to use VHDs created in this fashion in Windows 7 Virtual PC. The reason the ones I created don'twork is that I installed 64 bit Operating Systems in these VHDs and Windows 7 Virtual PC does not emulate 64 bit hardware -only 32 bit. Windows Server 2008 R2 and Windows Server 2012 only come in 64 bit so those cannot be run in Windows 7Virtual PC. If you use the Windows 8 VHD to boot from, you can enable Hyper-V and create 64 bit VMs and use the two ServerVHDs in your VMs.

Harold

thomas

7 Sep 2012 4:11 PM

files at http://aka.ms/hwitcampfiles not available...

Harold Wong

7 Sep 2012 4:16 PM

Thomas,

Sorry about the error. It seems Dropbox has not fixed the issue with bandwidth utiliziation on my account. I am working tocorrect this. If you are not able to download in th enext few days, I will have the files on a thumb drive at the event.

Harold

Mustafa Hanif

20 Sep 2012 2:01 PM

thanks for the tutorial

serian

1 Oct 2012 11:25 PM

thanx for the guide but when i use bcdboot to create a start for a vhd image, at restart the boot menù change to windows 7style. :(

Peter

4 Oct 2012 11:52 AM

Everything looks good with the attached VHD and the volume is there but it goes away when I restart. I get a boot errorbecause it can't find e:\windows.... The e volume isn't there. How do I make the e volume stick so it's there after restarting?