I'm trying to clone Windows Server 2008 from a physical 1TB HDD to a VM with smaller HDD (160GB) in proxmox (KVM). This can't be done with Clonzilla's disk-to-disk mode, so I resized the partition using Windows Server's built-in tool, rebooted the physical server to ensure that it still works, used fdisk
to prepare the target partition, then cloned the source partition to the VM.
When I tried to boot the VM, it stucks at this line:
Booting from Hard Disk ...
I realized that I didn't clone the boot record along with the partition, so I cloned it using dd if=/dev/sda of=mbr.bak bs=512 count=1
in the physical machine, and dd if=mbr.bak of=/dev/sda bs=512 count=1
in the VM, used fdisk
to prepare the target partition, then cloned the partition again. However, when I boot the VM, it stuck at these lines instead:
A disk read error occured
Press Ctrl+Alt+Del to restart
I booted from a Windows 2008 CD and choosed repair, the CD found my OS partition with these info:
Operating System: Microsoft Windows Server 2008
Partition Size: 0 MB
Location: (Unknown) Local Disk
Then I opened the command line and tried these commands with no success:
bootrec.exe /fixmbr
& Restartbootrec.exe /fixboot
& Restartbootrec.exe /rebuildbcd
& Typed Y to add C:\Windows to boot list & Restart
The VM still boots with the same error, so I booted into the CD again. However, this time the CD found my OS partition with these info instead:
Operating System: Windows Server (R) 2008 Standard
Partition Size: 163838 MB
Location: (C:) Local Disk
And I can't proceed to the repair menu anymore. When I choose the OS partition, an error popup appears with this message:
This version of System Recovery Options is not compatible with the version of Windows you are trying to repair. Try using a recovery disc that is compatible with this version of Windows.
Please help me with booting this poor VM up.
I'm not sure if this is the right way to migrate an OS to a smaller disk, if you have a smarter way of doing this, please point me in the right direction.
Thank you.
PS. Excuse my poor English, I didn't mean to be rude in anyway.