I decided to create a vm image of one of the windows desktops using the following commands in ubuntu live cd. /dev/sda is the windows drive to backup. /dev/sdb is the extra drive to store the image.
$ dd if=/dev/zero of=tempzero.tmp bs=32k $ rm tempzero.tmp
Unmounted /dev/sda1 and on /dev/sdb1
$ dd conv=sparse if=/dev/sda bs=32k | gzip > backup.img.gz
Then restored the image in vmware player. The provisioned hard disk size was set to 510G (actualy physical disk was 500G (actually 468.5G))
Restored the image to the hard disk using (i know we could have piped but I encountered out of disk error when using pipe)
$ gunzip backup.img.gz $ dd if=backup.img of=/dev/sda bs=32k $ sync $ ntfsfix /dev/sda1
Upon booting in the vm I get the following chkdisk error. What mistake did I make?
Checking file system on C: The type of the file system is NTFS. One of your disks needs to be checked for consistency. You may cancel the disk check, but it is strongly recommended that you continue. Windows will now check the disk. Cleaning up minor inconsistencies on the drive. Cleaning up 797 unused index entries from index $SII of file 0x9. Cleaning up 797 unused index entries from index $SDH of file 0x9. Cleaning up 797 unused security descriptors. CHKDSK is verifying Usn Journal... Usn Journal verification completed. CHKDSK discovered free space marked as allocated in the master file table (MFT) bitmap. Windows has made corrections to the file system. 488375968 KB total disk space. 101373272 KB in 700645 files. 281608 KB in 41598 indexes. 0 KB in bad sectors. 1242632 KB in use by the system. 65536 KB occupied by the log file. 385478456 KB available on disk. 4096 bytes in each allocation unit. 122093992 total allocation units on disk. 96369614 allocation units available on disk.