Tuesday, February 25, 2014

CREATING A VMDK FROM YOUR PHYSICAL WIN7 INSTLN

I have a dual boot system with Ubuntu12.04 and Windows 7. Presently, I am using Grub2 to choose the OS to boot into.

Since I mostly operate in Ubuntu, I decided to give up my Windows 7 installation entirely by moving it from physical installation to a VM. . After all when I need Windows and I donot need to reboot and I can freeze / unfreeze the system in a short time.

So essentially I installed Ubuntu12.04 as my base system and installed VirtualBox in it. Now I created a VM from my physical Win7 install and I use it in the Virtual Box. The steps to do it are as follows:-

(a)    Download and install VMware-converter-en-5.5.0-1362012.exe from the
internet, on the win7.

(b)    Create a vmdk image of the win7 system and save it in an external HDD.

(c)    Create  a VM inside the Virtual Box and choose to create it from - Use an
existing Virtual Hard Drive File.

There is yet another way to accomplish this task :-

(a)   Download and install  in the windows partition, Disk2vhd.exe from the sysinternals suite.

(b)   Create a .vhd image of your live system. But the important thing is the external HDD where you store this image must be NTFS partition , otherwise you will always get insufficient disk space error! which ofcourse is not a correct prompt for the error. There is yet another problem, the .vhd image will also carry your Grub installation, and inside the VM this will always give a grub rescue prompt. Just proceed to next step and remove the Grub installation from the .vhd file and reinstate the mbr using a Win7 System Restore disk.

(c)   Start VirtualBox and create a new VM. Reboot the virtual machine and Select CD/DVD as boot option. Boot from Recovery Disk, log in when prompted
Select command line as utility and execute the following commands:

       Bootrec.exe /FixMbr
    Bootrec.exe /FixBoot
    Bootrec.exe /RebuildBcd


(the intention here is to get rid of grub( which was in the dual boot original system) in the VM,  otherwise you'd be getting grub rescue at boot)

(d)  Reboot Virtual Machine and use it.

Thanks !

No comments:

Post a Comment