3

I'll often have to switch OSes and hypervisors back and forth soon.

The main use case will mostly be converting from Windows to Linux and from VirtualBox (.vdi), VMWare Workstation (.vmdk) and Hyper-V (.vhd) to QEMU (.qcow2). Though I'll sometimes have to go the other way around, but I'm also willing to try QEMU on Windows (is it still experimental on Windows?).

Those VM files often do have 10+ snapshots themselves, which I also restore to previous states back and forth. And to make things more spicy, some of them do even have sub branches.

 

Now, despite my websearch-fu, all I could find on the web is about losing any snapshot that were made on those files, or only having the last one merged. But there has to be a way of not losing any of the snapshots or have at the very least a very tedious way of doing things right, which I'm willing to endure.

I did also think about using .ova files to convert VM files to .qcow2 as a middle step, but again, there's nothing telling me that it'll keep every snapshot ever made.

 

Now, because of compression, .qcow2 tends to be slow. But what wasn't an issue when creating new .qcow2 files from a create command line, now is since it looks like there's no way of telling the converting process to disable compression. There must be a way to prevent compression for converting too.

I'm also aware that QEMU still can't take snapshots of UEFI-based VMs, but as long as I still can have a .qcow2 version of the VM files and all their snapshots, it's fine.

 

So, that's the question: How to convert a .vhd, .vdi or .vmdk that has snapshots to .qcow2 and vice-versa without losing any snapshots?

1 Answer 1

2

You can try using virt-v2v. It might support conversion with snapshots.

https://libguestfs.org/virt-v2v.1.html

https://bugzilla.redhat.com/show_bug.cgi?id=1172425

I've never tried it myself, but you can test it. As another option, you can try using StarWind V2V converter. It supports converting Live VMs, so it might do some consolidation during the conversion. https://www.starwindsoftware.com/starwind-v2v-converter

In any case, I prefer to consolidate all snapshots before conversions. I have backups, which I can use to restore to a certain point.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .