I would like to make a VirtualBox .vdi image out of my hard drive.
I’ve found howto’s online that describe doing this by first usind DD to create a .raw image, then using VBoxManage to convert the .raw to a .vdi. SO if my HD is 1 TB, this process (temporarily) requires 2TB of space, to store both the .raw and .vdi.
I only have a bit more than 1TB of free space. Is there a way to create a .vdi image of a hard drive, without first having to create a .raw image?
Solution:
You can directly create an image with VBoxManage convertfromraw
. First unmount the device, then:
VBoxManage convertfromraw /dev/sda MyImage.vdi --format VDI
Replace /dev/sda
with whatever disk or partition you want to clone.
You may need to do this as root to gain access to the device. If so, then you should change ownership of the finished image.