If you have played with the new VHD feature in windows 7 or windows 2008 then you know just how cool of a feature this is. However the problem is that when you reboot your machine you find that when it comes back up all your VHD files are no longer attached? Here is what I did to get around the issue.
select vdisk file="c:\path to vhd files\myvhddrive.vhd" attach vdisk I named my script file diskpartscript.txt and placed it in the same folder as my VHD files.
Create a scheduled task that will automatically run when your machine starts up.
Related posts
Comments
DotNetKicks.com said:
Automatically attaching VHD files in Windows 7 and Windows 2008 You've been kicked (a good thing) - Trackback from DotNetKicks.com
Oscar said:
That's a clever trick. I just wish we didn't have to do these kinds of things and just keep the VHDs mounted at boot, like a network drive. But Thanks for posting this workaround.
jscott said:
Agreed, hopefully MS will enhange the VHD support so that one day we can define in disk manager that a VHD should persist after reboots.
Add comment