Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Virtual Hard Disk - Create and Attach VHD


Virtual Hard Disk - Create and Attach VHD

How to Create and Attach a Virtual Hard Disk in Windows 7
Published by Brink
17 Nov 2008
Published by

How to Create and Attach a Virtual Hard Disk in Windows 7

information   Information
A Virtual Hard Disk is a created VHD file on your hard drive that acts as a separate hard drive disk in Computer. This will show you how to create and attach (mount), or only attach (mount) an existing, a VHD in Windows 7.

Special thanks to Steven (dmex) for pointing out this new feature in Windows 7.

Tip   Tip
You can also use a VHD file created from such programs as Windows Virtual PC.

warning   Warning
The VHD is only attached for the current session. When you restart the computer, any attached VHD files you have will no longer be attached and appear in Computer. You will have to reattach any VHD file to have it display back in the Computer window again until the next restart.

If you disable the Disk Defragmenter service, then you will get the error below when you try to do anything in Disk Management. If you get this error, then make sure that the Disk Defragmenter service is set to only Manual.

Name:  Error.jpg
Views: 30226
Size:  29.2 KB


EXAMPLE: New Virtual Hard Disk (VHD) in Computer
-computer.jpg
Here's How:
1. Open the Control Panel (icons view).
A) Click on the Administrative Tools icon, and click on Computer Management.

B) Go to step 3.
OR

2. Open the Start Menu.
A) In the Search box, type compmgmt.msc and press Enter.
3. If prompted by UAC, click on Yes, then do either step 4 or 5 below.

4. To Attach an Existing VHD File
NOTE: This is for a detached VHD file that you had already created in step 5 below, or from an existing VHD file.
A) In the left pane, right click on Disk Management, and click on Attach VHD. (See screenshot below)
NOTE: You can also click on Disk Management, Action on the menu bar, and Attach VHD.
Name:  Attach-1.jpg
Views: 45390
Size:  87.3 KB
B) Click on the Browse button. (See screenshot below)
Name:  Attach-2.jpg
Views: 44329
Size:  40.7 KB
C) Navigate to the VHD file location and select it, then click on the Open button. (See screenshot below)
Name:  Attach-3.jpg
Views: 44396
Size:  71.7 KB
D) If you want the VHD to be read-only, then check the box, otherwise leave it unchecked. Click on OK. (See screenshot below)
Name:  Attach-4.jpg
Views: 44133
Size:  47.0 KB
E) If the existing VHD file is unallocated, go to step 6. (See screenshot below step 6A)
WARNING: Be sure to create a backup copy of the VHD file first to be safe in case of data loss.

F) If the existing VHD file is allocated, go to step 8. (See screenshot below step 8)
5. To Create and Attach a New Virtual Hard Disk (VHD file)
A) In the left pane, right click on Disk Management, and click on Create VHD. (See screenshot below)
NOTE: You can also click on Disk Management, Action on the menu bar, and Create VHD.
Name:  Create-1.jpg
Views: 44287
Size:  82.3 KB
B) Click on the Browse button. (See screenshot below)
Name:  Create-2.jpg
Views: 44062
Size:  97.1 KB
C) Navigate to the location you would like to store the new VHD file, type in a name for the VHD file, and click on Save. (See screenshot below)
Name:  Create-3.jpg
Views: 43906
Size:  64.0 KB
D) Type in the maximum size you want the Virtual Hard Disk to be, and select the size to be MB, GB, or TB (1024 MB = 1 GB, 1024 GB = 1 TB). (See screenshot below)

E) Select (dot) if you want the new VHD size to be Dynamic or Fixed, and click on OK. (See screenshot below)
Name:  Create-4.jpg
Views: 44127
Size:  107.7 KB

F) Continue to step 6.
6. To Initialize the Virtual Hard Disk
A) Right click on the new unallocated VHD Disk # and click on Initialize Disk. (See screenshot below)
-disk_management-1.jpg
B) Select (check) the Disk # from above for the new VHD. Select (dot) if you want the new VHD to have a MBR (Master Boot Record) or GPT (GUID Partition Table) partition, and click on OK. (See screenshot below)
Name:  Initialize.jpg
Views: 44317
Size:  73.4 KB
C) Continue to step 7.
7. To Create a New Simple Volume in the VHD
A) Right click on the new unallocated VHD and click on New Simple Volume. (See screenshot below)
-disk_management-2.jpg
B) Click on the Next button. (See screenshot below)
Name:  New_Simple_Volume-1.jpg
Views: 43959
Size:  75.3 KB
C) Type in how much of the maximum disk space (step 5D) you want for the size of this VHD partition, and click on Next. (See screenshot below)
NOTE: If you do not use the maximum space, then you will have a second unallocated VHD partition left with the remaining available disk space.
Name:  New_Simple_Volume-2.jpg
Views: 44077
Size:  60.2 KB
D) Select the file system (NTFS or FAT32) you want the VHD partition to be. (See screenshot below)

E) Type in a name for the VHD to be displayed in Computer. (See screenshot below)

F) Check the Perform a quick format box, and click on Next. (See screenshot below)
Name:  New_Simple_Volume-3.jpg
Views: 43764
Size:  85.8 KB
G) Click on the Finish button. (See screenshot below)
Name:  New_Simple_Volume-4.jpg
Views: 43851
Size:  108.1 KB
8. The VHD is now attached and ready to access like a HDD. (see screenshot below)
-disk_management-3.jpg
That's it,
Shawn







17 Nov 2008   #1
Mark

Windows 7 Ultimate Vista Ultimate x64
 
 

At first glance when you see Windows 7 it doesn't look allot different from Vista, But when you start to dig a little you start to see all of extra hidden features and this is only a Pre Beta, so it will more than likely have many more features with the final release.

Nice work Shawn.


My System SpecsSystem Spec
17 Nov 2008   #2
Brink
Microsoft MVP

64-bit Windows 10 build 10074
 
 

I can't wait to see what other features Windows 7 may have either.

Thank you Mr GRiM.
My System SpecsSystem Spec
11 Apr 2009   #3
son110

windows 7
 
 

My English is not good

Please help, after 4e ->error
-untitled.png

thanks you!
And, why did admin band my Ip 118.71.66.77?


My System SpecsSystem Spec
.


11 Apr 2009   #4
Orbital Shark

 
 

Excellent work as always Shawn. I noticed this option a couple of days ago & thought to myself 'I wonder if there's a tutorial on it yet' & 'Wouldn't it be great to write 1?'. Guess you're just 3 steps ahead of every1 LOL
My System SpecsSystem Spec
11 Apr 2009   #5
son110

windows 7
 
 

Thank you very much, can you help more?
My English is not good

My System SpecsSystem Spec
11 Apr 2009   #6
Brink
Microsoft MVP

64-bit Windows 10 build 10074
 
 

Hello Son,

It looks like you mave some group policy setting set preventing you from doing this. Are you part of a domain?

If needed, this can help with translations.
Google Translate
My System SpecsSystem Spec
11 Apr 2009   #7
Brink
Microsoft MVP

64-bit Windows 10 build 10074
 
 

Quote   Quote: Originally Posted by Orbital Shark View Post
Excellent work as always Shawn. I noticed this option a couple of days ago & thought to myself 'I wonder if there's a tutorial on it yet' & 'Wouldn't it be great to write 1?'. Guess you're just 3 steps ahead of every1 LOL
LOL, thank you.
My System SpecsSystem Spec
11 Apr 2009   #8
son110

windows 7
 
 

Thank you! Do you have any software to fix the error?
My System SpecsSystem Spec
11 Apr 2009   #9
Brink
Microsoft MVP

64-bit Windows 10 build 10074
 
 

Do you have enough free space on the selected drive to create the VHD on?
My System SpecsSystem Spec
Comment

 Virtual Hard Disk - Create and Attach VHD




Tutorial Tools





Similar help and support threads
Windows 7 Tutorial Category
Host disk is running out of room, can't shrink virtual hard disk?
Hi Everyone, I have a challenge with resizing a virtual disk - here are a few details before I plunge into the challenge at hand; 1). The HOST O/S is Windows 7 x64 2). The GUEST O/S is Windows XP 3). The Desktop Virtualization software is VMware Workstation 8 Background - originally when...
Virtualization
attach a Virtual Hard Disk to install XP?
Does anyone know if there is a way to open the Command Prompt during Windows XP installation (booted from CD) and find a way to attach a Virtual Hard Disk so you could install XP on it (just like with Windows 7 and 8)?
Virtualization
Virtual XP won't attach scanner it sees.
I run Win 7 64 bit with Virtual XP. I loaded HP 5400C software into Virtual XP. I attached Scanner and was able to scan/print and scan/pdf. ie everything worked as it should. A week later Virtual XP requested I run 7 updates. Since 7 updates the Virtual XP sees the scanner. When I request "attach"...
Virtualization
Virtual Hard Drive VHD File - Create and Start with at Boot
How to Create a Windows 7 VHD at Boot to Start with from Boot This will show you how to create a Windows 7 VHD file at boot on an existing installed OS's (ex: Vista or Windows 7) C: hard disk or partition to be able to natively boot from the Windows 7 VHD at startup in the Windows Boot Manager....
Tutorials
Windows Virtual PC: "Cannot attach the virtual hard disk ..." error
Hi: Got a new Win7 Enterprise 64 bit machine, found that it did not come with virtual PC. Downloaded the critical patch Windows6.1-KB958559-x64-RefreshPkg.msu and installed it. Windows Virtual PC shows up in my Start Menu. Good so far. I go through the steps to create a virtual machine and use...
Virtualization
Virtual Hard Disk
I've always trusted the information from here, and now I'm going to hit again with another question in references to Virtual Hard Disk. Problem: Santa Claus (My wife) got me COD 4 for my computer (per my list). Great game and the one drawn back I've found with it (along with several games) is...
Virtualization

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 00:03.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App