Backup Windows partitions as virtual hard disk (VHD)

• windows and virtualization • Comments

Although I prefer Linux as Desktop OS, Gaming on it is still very hard to realize. That’s why I need a Windows installation on my system. Said installation didn’t age well, so I decided to rejuvenate my six year old Windows installation and install Windows 10.

I wanted to have a fresh start and didn’t want to keep anything, but I still wanted to retain my old system and data partition as backup. I decided to use a Virtual Hard Disk (VHD) file as backup format. The advantage of this is that I can easily boot up a VM to compare my old system with my new one. Additionally Windows 7 natively supports mounting VHD, enabling easy access to the files. Thus, I created a step-by-step instruction for later reference.




umount /dev/sda2
ntfsclone -o /mnt/20160220-win_c_drive_ntfsclone.img /dev/sda2

Update 2016-03-18: I removed usage of the -s switch because it makes the resulting VHDs unreadable.

apt-get update && apt-get install --yes virtualbox
VBoxManage convertfromraw /mnt/20160220-win_c_drive_ntfsclone.img \
  /mnt/20160220-win_c_drive_ntfsclone.vhd --format VHD

This process may take some time, but afterwards you have your VHD backup ready to go.

More posts
comments powered by isso