Virtual disk to disk image issue

This is for discussing general topics about how to use VirtualBox.
Post Reply
Samuel Yun
Posts: 2
Joined: 30. Nov 2018, 17:06

Virtual disk to disk image issue

Post by Samuel Yun »

Hello,

My goal is to convert my current virtual machine into a disk image so that I can use this on a physical machine.

I can convert the virtual disk file into a raw image disk file using the VboxManage command: VBoxManage clonehd fullpath/myvm.vdi myvm.img --format raw. However, this causes a issue where the raw image disk file ends up being over 100GB (Because the vm machine has a disk capacity set to 100GB).

Is there a way to compress this image file or convert it so that the end result of the raw image is not so large?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual disk to disk image issue

Post by mpack »

Run your favorite disk imaging backup app inside the VM. Good imaging apps will only backup sectors used by files, and skip page files etc. Restore the backup onto a physical PC in the normal way.

It's a pity you didn't mention the guest OS. For Windows I would choose Macrium Reflect Free Edition.
Samuel Yun
Posts: 2
Joined: 30. Nov 2018, 17:06

Re: Virtual disk to disk image issue

Post by Samuel Yun »

Hi mpack,

Thank you for the response I will look for disk imaging backup for my guest OS. My guest OS is Ubuntu 14.04 Server.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Virtual disk to disk image issue

Post by mpack »

Actually, I just checked and Macrium claims to be able to back up Linux partitions (EXTx) too. Obviously I have never used this feature, but it's good software so I'm confident it will work. Since I believe the app is Windows only I assume you would have to boot the VM from the Macrium CD in order to make the backup.

https://www.macrium.com/reflectfree

I have no connection to Macrium btw, it's just what I've been successfully using for the last couple of years after my previous favorite increasingly turned to bloatware in my opinion.
wheats1971
Posts: 1
Joined: 19. Dec 2018, 18:51

Re: Virtual disk to disk image issue

Post by wheats1971 »

I can confirm that Macrium does back up (and more importantly, correctly restores) Linux partitions. At least on a dual-boot (Win 10 Pro / Debian Stretch) setup. Used it both P2V and V2P
Post Reply