Import KVM qcow2 snapshots into Proxmox

bofh666

Active Member
Apr 5, 2017
7
0
41
41
Hi all,

Preamble:
Proxmox VE 4.4
Storage type Directory
VM disk images type qcow2 imported from KVM+virt-manager
Role Administrator + root in the OS

To make long story short, my aim is to import/convert qcow2 images with some snapshots embedded into Proxmox VM Snapshots view. I've searched through the forum already and didn't find straightforward way, while it should be, according to the docs: https://pve.proxmox.com/wiki/Live_Snapshots.

So, the question is how to make qcow2 snapshots visible in Proxmox web UI? Is it even possible? Did anybody accomplish that?

If there's no straightforward way, Is it possible to:
1. "rewind" snapshots one by one merging it with initial image to get solid image for each;
2. substitute original HDD image of the VM (each VM has only one, luckily) with these images in lineage;
3. taking snapshot via Proxmox web UI of each?

Any help is greatly appreciated!

TIA

Regards,
Alex
 
Hi,

you have to do this manual and edit the vmid.conf.

Copy your config and ad on top the snap name like this

config

[snapname]
config_copy

[snapname2]
config_copy
 
  • Like
Reactions: bofh666
Hi Wolfgang,

Thank you!

Do I understand correctly that snapshots names in square brackets in vmid.conf should be identical to TAGs from output of qemu-img snapshot -l image.qcow2?

I have some characters in TAGs which Proxmox doesn't allow to input in web UI, e.g. '-', '+', ' '. Will they work if I'll put them into vmid.conf? Any suggestions how to convert them to Proxmox suitable format?
 
We do not allow this token.

AFIK you can't rename qcow2 snapshots and also there is no way to convert to an alternative format.
 
Thanks again, Wolfgang.

And is it possible to make snapshots visible and convert their TAGs/names at the same time this way:
1. turn off the VM;
2. manually apply first snapshot to qcow2 image via qemu-img snapshot -a [ID_OR_NAME] in PVE CLI;
3. take snapshot of current VM state immediately via PVE web UI;
4. repeat 2&3 for all snapshots within VM's qcow2(s);
5. revert to desired state (snapshot) of the VM and power the latter up?

Will this work? It's okay for me if original lineage of snapshots will be broken/lost - I just need to manage some independent VM(s) states via Proxmox web GUI, which are not meant to be reverted in exact playback order.

TIA

Regards,
Alex
 
Answering my own question, this works indeed. To achieve my exact goal, I had to remove "parent" strings from /etc/pve/qemu-server/<vmid>.conf after all listed manipulations maunally. And then it performs like a charm!

Hopefully, this thread will be helpful to somebody :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!