Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

To speed up my testing, I need to prepare a disk with some files, do some operations on disk (modify files, create new files...), and return back to clean state (before doing operations) quickly. I know about VHD files which can be mounted with "undo support", but I cannot find how to use this in Windows 7.

I wouldn't mind some other options too. My disk will not fit into the memory, so RAM disk is not an option. Booting virtual machines and doing snapshots is not an option too.

I am using Windows 7 (RC).

share|improve this question

Mounting a VHD in Windows 7

  • Click on the Orb
  • Right click on My Computer and Select Manage
  • Select Disk Management under Storage
  • Right Click on Disk Management
  • Choose between Create VHD and Attach VHD

Using Windows Virtual PC

In Virtual PC you can use differential disks and there is a complete how to available a t Seven Forums entitled How to Create Differencing Disks in Windows Virtual PC.

share|improve this answer
I don't want to install OS there, I just need to mount this virtual disk as separate drive (letter). I'll take a look at VirtPc to see if I can then use created diff disk in win7 or not. Thanks for pointer. – Peter Štibraný Sep 7 '09 at 20:17
Looks like the same is possible using diskpart: – Peter Štibraný Sep 7 '09 at 20:19
No need to. Updated my question with the steps to mount a VHD in Windows 7. – BinaryMisfit Sep 7 '09 at 20:23
It's possible to create differencing disk using diskpart. This option isn't available via Disk Management :-( – Peter Štibraný Sep 7 '09 at 20:29
up vote 1 down vote accepted

Ok, here is answer based on

create vdisk file="d:\temp\diff.vhd" parent="d:\temp\main.vhd"
attach vdisk

At this point, virtual disk "diff.vhd" is attached to the system as new drive. It if differencing disk with "main.vhd" as a parent. When done with testing, I can simply do:

detach vdisk
create vdisk file="d:\temp\diff1.vhd" parent="d:\temp\main.vhd"
attach vdisk

And have clean state of "main.vhd" again.

This works in Windows 7.

share|improve this answer

Backup the VHD, do your 'operations' and then restore the VHD from the backup. Voilá, 'clean state' again.

If you're using your VHD with VirtualBox you can take a snapshot anytime you want.

enter image description here

share|improve this answer
:-) It's not so quick with large vhd files though. – Peter Štibraný Sep 7 '09 at 20:13
+1 for simplicity, often underrated. I like Peters own answer better though. – Henk Sep 7 '09 at 21:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .