Home » Questions » Computers [ Ask a new question ]

Virtual disk with "undo support" for testing?

Virtual disk with "undo support" for testing?

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.

Asked by: Guest | Views: 65
Total answers/comments: 2
Guest [Entry]

"Ok, here is answer based on http://www.cchsu.com/art-en/2009/07/11/128/

diskpart
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:

diskpart
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."
Guest [Entry]

"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."