A little while ago I wrote about how impressed I was with boot from VHD in Windows 7. This morning I was trying to convince Mike that using this technique with a base Windows 7 VHD and differencing disks would be a great way to get VS2010 Beta1 and Beta2 (when it arrives) installed on his machine.
He wanted to know if he could just create a VHD from his existing install ie snapshot his native Windows 7 installation to VHD. That had me foxed although we talked about whether or not Windows Backup might be a possibility.
Then, as if by magic, I came across Disk2vhd which does exactly that – “create virtual hard disks copies of the physical disks that are attached … Another potential use is to allow you to move a physical installation of Windows 7 to a “boot from VHD” configuration.” Bingo!
Direct download link is here.
Mike, a word of caution about the Disk2Vhd utility you mentioned. On the download page, it says that you can't snapshot a physical machine and then use it to boot from VHD on the same machine...
Note: do not attach to VHDs on the same system on which you created them if you plan on booting from them. If you do so, Windows will assign the VHD a new disk signature to avoid a collision with the signature of the VHD’s source disk. Windows references disks in the boot configuration database (BCD) by disk signature, so when that happens Windows booted in a VM will fail to locate the boot disk.
If you, or the SysInternals guys know of a workaround for this, let me know!
Hi James. Yes, MikeT, Barry Dorrans and I had a discussion about this as it is ambiguous. Barry interpreted it as you have whereas Mike and I interpret it differently :).
Our interpretation is you shouldn't create a VHD from a specific Windows install and then *attach* it to that system if you later want to boot from it. (There's an option in Windows7 to attach a VHD as if it were just another drive). It's okay to boot it on the same machine but if you attach it, Windows changes this disk signature to avoid a conflict. The boot manager then has a different signature stored than the one your VHD now has so it wont be able to find it.
On the Disk2Vhd page I think there is an image of a VHD system running on the same system it was created on which seems to suggest our interpretation is correct but I haven't tested it to confirm.
All the best
Mike, whilst the screen shot on the download page shows a VHD running on the same machine it was created on, this was running inside Virtual PC. I think the notes on the download page warns against trying to run the VHD as a boot device...if I interpret it correctly.
Has MikeT had a go at this yet? It sounds like what he wants to do is what I want to do...
Hmm - you're right. I should have looked at it more closely. MikeT has a problem with Disk2vhd erroring on his machine and was in communication with Bryce about it but I don't think it's resolved. I created a VHD successfully but subsequently deleted it without trying to boot from it (as I already have a bootable Win7 VHD).
I'll find out for you one way or the other...
I've had no response from emailing the internal sysinternals alias so I played about a bit with it today. I can't get any of the VHDs I create with Disk2vhd to work as a native boot VHD on the same system (I haven't tried them on any other system TBH). It looks like it can't be done.
I get an error on startup - "The configuration for an element within the object is invalid in the boot configuration data store." and the VHD boot loader entry is not available for selection. That said, all other OS choices are there and have worked fine so I've not seen any "damage" as such. Of course, YMMV.
Mike, thanks for getting back to me. I'm not going to risk it, I'll stick with a physical Win7 system for now and look into the VHD option at some future point, perhaps if I ever need to rebuild the machine.
I still haven't given up. I'll let you know if I get it working. Of course this is just about Disk2vhd VHDs - I'd definitely recommend native boot from VHD as a great option. You just can't use Disk2vhd as a shortcut to creating the VHD at this stage. Mike