I am creating a disk for a Windows 7 VM on a Linux (CentOS 6.3) host.
If I create a .vdi file in VirtualBox (Linux version 4.2.6) and attach it to my Windows 7 VM, I can format it as NTFS, mount, and use the disk fine.
Then I can shut down the vm and use
Quote:
VBoxManage modifyhd <diskname>.vdi --resize <new size in mb>
|
and when booted, see a second. larger disk in Windows 7 that I have to extend the NTFS partion to cover so the extra space is used. That's norrmal.
HOWEVER, if I create my .vdi file from an
existing NTFS hard disk using the
Quote:
dd if=$WinDevice | VBoxManage convertfromraw stdin $Bytes windows.vdi
|
technique mentioned in the comments here
http://superuser.com/questions/25066...ical-partition (as well as a couple of other places I found), the resulting .vdi disk can be used, but NOT successfully resized! (Note, the author mentions being usure if you should suck up the disk i.e. /dev/sda, or your desired source partiion, i.e. /dev/sda1 . I tried it both ways).
I get varying results.
After resizing, booting the VM in gparted, it always sees the second disk as one, larger NTFS volume that it cannot work with. Windows sometimes sees the original, smaller disk in Explorer, while seeing a larger NTFS volume in Disk Management, the size of which cannot be changed, larger or smaller. So at best I lose the extra space.
If I resize the .vdi really large (I tried 1.9TB), Windows 7 doesn't see any disk in Explorer at all, and Disk Management sees multiple, unusable partitions. Again, gparted just sees one larger NTFS partition that it cannot work with.
What I need to do is convert a 1TB physical disk with over 600gb of small data files and folders into a .vdi file, then resize that to 1.9TB (we forsee filling up 1TB all too soon), then convert that into a Split2G .vmdk file (since you can't resize a .vmdk format file directly) for easier backup of the Windows disk from the Linux host.
Copying the data any standard way takes so incredibly long that making a same size .vdi first, then copying the data inside the VM to a second, exisiting, larger .vmdk is highly impractical. That's why I need to get resizing of the converted .vdi working, but I can't see how.
Any ideas for how to get resizing a .vdi made from a physical disk to work?