Univention Bugzilla – Bug 35581
Snapshots for domains with more than 4gb ram
Last modified: 2016-06-02 13:15:42 CEST
It is not possible to create snapshot for domains with more than 4 gb ram - you'll receive an exception within UMC that this is not allowed. Its possbile with virsh...we should test if this exception is necessary nowadays.
Yes, the qcow2 file format only has a 32bit counter for the size of the RAM image, which limits it to below 4 GiB minus some extra space for extra stuff: I #uint32_t vm_state_size; See Bug #26645 for the original change. The limit can only be worked around by implementing the saving of the state to a separate file by hand doing something like this: virsh suspend $VM virsh save /var/lib/libvirt/.../qemu/$VM/$SNAP.save virsh snapshot-create-as --disk-only $VM $SNAP ... virsh resume $VM with additional code for handling non-atomic errors ... (In reply to Tim Petersen from comment #0) > Its possbile with virsh... No, it's not if you look close enough, as it will fail horrible afterwards.
Requested again: 2015010521000109
Requested again: 2016052621000132
$ git l1 -1 c2c9a46609164a36b477f6cff1d10ed27a6b53fc c2c9a46 qcow2: Allow >4 GB VM state $ git describe --contains c2c9a46609164a36b477f6cff1d10ed27a6b53fc v1.1-rc0~732^2~3 Bug #26645 was fixed for UCS-3.0-1. Since UCS-3.1 we use qemu-1.1.2. So only the check needs to be removed from UVMM. $ qemu-img info /var/lib/libvirt/images/phahn_snap.qcow2 image: /var/lib/libvirt/images/phahn_snap.qcow2 file format: qcow2 virtual size: 50G (53687091200 bytes) disk size: 9.0G cluster_size: 65536 backing file: /var/lib/libvirt/templates/single/UCS/4.1-0_generic-v2_amd64/4.1-0_generic-v2_amd64-0.qcow2 Snapshot list: ID TAG VM SIZE DATE VM CLOCK 1 snap 8.7G 2016-05-27 11:19:56 00:05:59.949 $ ~/src/VIRT/qcow2.py -r12 /var/lib/libvirt/images/phahn_snap.qcow2 000000023d5a0000: Snapshot #0 000000023d5a0000: + vm_state_size=0 B 000000023d5a0028: + vm_state_size=8 GiB r69591 | Bug #35581 uvmm: Remove snapshot limit for RAM < 4 GiB Package: univention-virtual-machine-manager-daemon Version: 5.0.1-10.614.201605271321 Branch: ucs_4.1-0 Scope: errata4.1-2 r69592 | Bug #35581 uvmm: Remove snapshot limit for RAM < 4 GiB YAML univention-virtual-machine-manager-daemon.yaml
OK: Removal of memory check OK: Create/remove/revert to snapshot with more than 4Gib OK: yaml
<http://errata.software-univention.de/ucs/4.1/188.html>