How to properly use clonehd option?
Posted: 12. May 2009, 13:31
Hi all.
I have the windows XP guest, which I've created long-long time ago, with 1.x version of the VBox.
This guest uses differencing hard disk, which I have set to 50Gb. I have created and deleted several snapshots, and now the virtual machine uses about 30Gb more than it should.
The respective part of the VirtualBox.xml looks like this
I am trying to get back these gigabytes without reinstalling windows and all software inside it.
Currently I don't have any saved snapshots.
has already saved me several Gb.
However, the Virtual Media Manager shows that the disk bd6e5cba-054d-4d8a-b7a4-1379735ba295 is not attached to any snapshots and doesn't allow to delete it.
I have searched the internet and found that clonehd can help me.
I tried several variants:
However, all of them produced unusable image.
OS didn't boot from it. If I attach this newly produced image to the existing windows guest as the primary slave, checkdisk founds many many file system errors, fixes them, but OS doesn't boot anyway.
I am using PUEL VirtualBox, version 2.2.2, my host is Ubuntu 8.10, 32-bit, and by guest is Windows XP SP3.
Of course, I have defragmented the guest's hard drive before the operation.
I have the windows XP guest, which I've created long-long time ago, with 1.x version of the VBox.
This guest uses differencing hard disk, which I have set to 50Gb. I have created and deleted several snapshots, and now the virtual machine uses about 30Gb more than it should.
The respective part of the VirtualBox.xml looks like this
Code: Select all
<HardDisks>
<HardDisk uuid="{02bf0d9b-c958-422c-8d85-f097868f4b57}" location="VDI/windoz.vdi" format="VDI" type="Normal">
<HardDisk uuid="{bd6e5cba-054d-4d8a-b7a4-1379735ba295}" location="Machines/windows/Snapshots/{bd6e5cba-054d-4d8a-b7a4-1379735ba295}.vdi" format="VDI">
<HardDisk uuid="{bffa10a7-1898-482d-9e2e-d6fd5405af5b}" location="/home/wl/.VirtualBox/Machines/windows/Snapshots/{bffa10a7-1898-482d-9e2e-d6fd5405af5b}.vdi" format="VDI"/>
</HardDisk>
</HardDisk>
</HardDisks>Currently I don't have any saved snapshots.
Code: Select all
VBoxManage modifyhd windoz.vdi --compactHowever, the Virtual Media Manager shows that the disk bd6e5cba-054d-4d8a-b7a4-1379735ba295 is not attached to any snapshots and doesn't allow to delete it.
I have searched the internet and found that clonehd can help me.
I tried several variants:
Code: Select all
VBoxManage clonehd windoz.vdi windows1.vdi
VBoxManage clonehd bd6e5cba-054d-4d8a-b7a4-1379735ba295 windows1.vdi # not attached .vdi
VBoxManage clonehd bffa10a7-1898-482d-9e2e-d6fd5405af5b windows1.vdi # .vdi, attached to the current state
VBoxManage clonehd ~/.VirtualBox/machines/Snapshots/{bffa10a7-1898-482d-9e2e-d6fd5405af5b}.vdi windows1.vdi # again, current state vdi, but with the full path
OS didn't boot from it. If I attach this newly produced image to the existing windows guest as the primary slave, checkdisk founds many many file system errors, fixes them, but OS doesn't boot anyway.
I am using PUEL VirtualBox, version 2.2.2, my host is Ubuntu 8.10, 32-bit, and by guest is Windows XP SP3.
Of course, I have defragmented the guest's hard drive before the operation.