For whatever combination of reasons, I haven't had any good luck in cloning Windows XP installations to a new, larger drive. It just has never worked for me until today (sort of). I want to document my success in copying a Win XP Pro installation from a 10gb VirtualBox VDI to a 30gb VirtualBox VDI. It's not the same as moving Windows to a 'real' disk, but it's better than anything else I've been able to do so far.
- Create the new, bigger hdd (vdi file) in VirtualBox. I did this as part of creating a whole new Virtual Machine.
- Attach the 'old' vdi file/disk as another hard drive in the new virtual machine.
- Also attach a downloaded gparted .iso file as the virtual cd/dvd drive.
- Boot the device (to gparted)
- Open a shell, and issue a 'sudo dd if=/dev/sda of=/dev/sdb' command, assuming /dev/sda is the old vdi, and /dev/sdb is the new one
- Wait for a long time (about 35 minutes for a 10gb, nearly full, partition)
- Shut down the virtual machine, disconnect the 'old' hard drive/vdi and remove the .iso file from the virtual cd/dvd drive
- Boot the machine and confirm that it starts properly, then shut it down again
- Re-attach the gparted .iso dvd, and boot to it
- From gparted, resize the partition on your new vdi file to take up all the space on the drive
- Shut down, remove the .iso from the dvd/cd drive, and reboot
- Watch/hope as Windows XP disk checker verifies your hard drive (it's checking because the disk size has changed)
That's it. I hope it wasn't a fluke!Resources: http://mylinuxramblings.wordpress.com/2011/05/20/mini-how-to-cloning-hard-disks-which-fail-using-clonezilla/I needed that one; Clonezilla failed to copy the disk (and the partition) despite multiple attempts, and following other recipes that claim success doing it that way.http://forums.virtualbox.org/viewtopic.php?p=65211#p65211Looks good, and lots of kudos from others about their success in doing it that way.
FAQ and article with resources regarding resizing disks in general