Month: February 2009

Windows Image to Virtual Hard Disk (WIM2VHD) Converter

I had earlier blogged about a script I wrote to capture OS VHDs from WIM files directly. This one got lot of attention as expected. Now, Mike Kolitz released a better version of what I did. He calls it WIM2VHD. Of course, you still need to have Windows 7 and Windows 7 WAIK tools installed on the system you are running this script. Both the scripts use diskpart commands to do the job. To some extent, I knew that some one from MS would do this because they have left traces of running this tool within the public beta builds. On a few installs, you can find WIM2VHD.log on the boot partition. I don’t remember the exact path though. You can download Mike’s script here. Thanks Mike..!

Right click to mount/unmount VHD in Windows 7 or Windows Server 2008 R2

Okay…this is not “yet another update” kinda post. If you thought that way, read the subject again. I had previously posted a tool to mount/unmount VHDs on a Windows Server 2008 system with Hyper-V and it works only if you have Hyper-V role enabled on the system because of its dependency on Hyper-V WMI interfaces. Now, in this post, I am posting a new tool to mount / unmount VHDs by right clicking on a VHD file. This new tool will work on Windows 7 or Windows Server 2008 R2 systems with or without Hyper-V role. This one uses diskpart commands available within this new OS and hence there is no dependency on Hyper-V WMI interfaces. So, you can use this new script only if your system has Windows 7 or Windows Server 2008 R2. Windows Server 2008 R2 provides a way to mount / unmount VHDs from the disk management MMC. But, It takes too many clicks to do that 🙂 and I prefer saving some clicks for more useful stuff. To get the ability to mount / …

Native VHD booting on a physical server

If you have been testing Windows 7 or Windows Server 2008 R2, you must have come across native VHD booting feature. This allows us to boot OS from VHD file residing on the hard drive. You don’t need a Hypervisor to boot from VHD. Windows 7 boot architecure changed a bit to accomodate this. In fact, Windows Server 2008 has the option to boot from a file. But that was with only WIM images. In a previous post, I had written about how you can capture a VHD from OS media. There is also a simple script to generate the VHDs without any manual effort. Now, in this post, let us look at how we can use one such VHDs to multi-boot with existing OS on a physical server. The procedure is straight forward. You just need to add a BCD entry. To do this, 1. At a command-prompt, Run diskpart 2. Within Diskpart, select vdisk file=C:\<VHDNAME>.VHD 3. Attach Vdisk 4. Assign Letter=R (If not already assigned; diskpart usually picks up whatever you had assigned during creation) …