KVM live snapshot

ktecho

Active Member
Jun 6, 2016
49
0
26
44
Hi,

I've readed some posts and forums (proxmox and out of proxmox docs), but I cannot seem to get the answer.

KVM is supposed to have live snapshot, but in all my 4 kvm VMs whenever I create or delete a snapshot, the VM gets completely locked. It doesn't accept connections, ssh drops if I touch any key, etc. I mean, it's not "live" by any means.

I'm using qcow2 and latest proxmox packages. Any clue on what's happening? Do I need to change some config option?

Thanks a lot,

Luis Miguel
 
Make sure you run lates stable version, please post your:

> pveversion -v

and your VM config:

> qm config VMID
 
Code:
root@xxxxxx:~# pveversion -v
proxmox-ve: 4.2-52 (running kernel: 4.4.8-1-pve)
pve-manager: 4.2-5 (running version: 4.2-5/7cf09667)
pve-kernel-4.4.8-1-pve: 4.4.8-52
pve-kernel-2.6.32-45-pve: 2.6.32-174
lvm2: 2.02.116-pve2
corosync-pve: 2.3.5-2
libqb0: 1.0-1
pve-cluster: 4.0-43
qemu-server: 4.0-85
pve-firmware: 1.1-8
libpve-common-perl: 4.0-71
libpve-access-control: 4.0-17
libpve-storage-perl: 4.0-56
pve-libspice-server1: 0.12.8-1
vncterm: 1.2-1
pve-qemu-kvm: 2.6-1
pve-container: 1.0-71
pve-firewall: 2.0-29
pve-ha-manager: 1.0-32
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u2
lxc-pve: 1.1.5-7
lxcfs: 2.0.0-pve2
cgmanager: 0.39-pve1
criu: 1.6.0-1
fence-agents-pve: not correctly installed

Code:
root@xxxxxx:~# qm config 105
agent: 1
balloon: 6144
boot: cdn
bootdisk: virtio0
cores: 4
cpuunits: 2000
machine: pc-i440fx-1.4
memory: 12288
name: BlaBlaBla-Ubuntu
net0: virtio=02:00:00:XX:YY:ZZ,bridge=vmbr0
onboot: 1
ostype: l26
parent: a20160729
scsihw: virtio-scsi-pci
smbios1: uuid=4ea8b4da-799f-46c4-a25a-33cec7b5bff0
sockets: 1
startup: order=1
tablet: 0
virtio0: local:105/vm-105-disk-1.qcow2,format=qcow2,size=50G
 
Last edited:
if you create a kvm live snapshop, the content of the RAM is stored on your storage - during this time, you will see a short freeze.

depending on the amount or RAM and the speed of your local storage this can take some time.

how fast is your local storage?

e.g. test with:

> pveperf /var/lib/vz/
 
Code:
root@nsxxxxxx:~# pveperf /var/lib/vz/
CPU BOGOMIPS:      54398.00
REGEX/SECOND:      1819472
HD SIZE:           1826.54 GB (/dev/mapper/pve-data)
BUFFERED READS:    81.17 MB/sec
AVERAGE SEEK TIME: 14.94 ms
FSYNCS/SECOND:     878.52
DNS EXT:           23.88 ms
DNS INT:           1.99 ms (ip-xx-yy-zz.eu)
 
Thanks, @spirit
I don't know yet if the time the VMs are freezed when I snapshot with vm state is normal. One minute or more for a 8 GB machine is ok?
 
Hi there. I just made a snapshot of my kvm VM without the memory tick and it ran for 4 minutes. In the meanwhile, my VM was frozen.

Any other way to know what's happening?
 
I've expanded the log while my machine is frozen doing a snapshot and I've seen this:

Formatting '/var/lib/vz/images/105/vm-105-state-a20161018.raw', fmt=raw size=26294091776

Is it ok that it says "raw" when my disk is qcow2?
 
I've expanded the log while my machine is frozen doing a snapshot and I've seen this:

Formatting '/var/lib/vz/images/105/vm-105-state-a20161018.raw', fmt=raw size=26294091776

Is it ok that it says "raw" when my disk is qcow2?

that is the RAM dump image (note the "state" in the name), which is always created as raw.
 
Ok, then that's the problem. The time it takes to write the RAM to disk.

But the RAM assigned to that VM is 2 GB to 12 GB. Why does it takes 25 GB?
 
we reserve the configured memory * 2 + 500MB for the driver state. if it takes more than that, the RAM dump is aborted.
 
OK. Do you know any way to speed up the dump of the memory, besides using a server with SSD instead of HDD?
 
either dump to a faster storage, or reduce memory updates during the RAM dump (e.g., by pausing/stopping memory intensive services before starting the snapshot).
 
Hello,
I want to know what is the difference between live snapshots with or without RAM? I saw on this thread what is mean but how affect this two types on rollback ?
The snapshot without the vm state (without of the content of the RAM) it is as good to do a rollback like the other?
 
Hello,
I want to know what is the difference between live snapshots with or without RAM? I saw on this thread what is mean but how affect this two types on rollback ?
The snapshot without the vm state (without of the content of the RAM) it is as good to do a rollback like the other?

snapshotting means taking a snapshot of all the disks/volumes. "with RAM" means that you also save a RAM dump at the same time, which allows you to rollback the complete VM state (including running programs). "without RAM" means only the disk state is rolled back, and the VM has to boot from that old disk state.
 

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!