Bug 35581 - Snapshots for domains with more than 4gb ram
Snapshots for domains with more than 4gb ram
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Virtual machines (UVMM)
UCS 3.2
Other Linux
: P5 enhancement (vote)
: UCS 4.1-2-errata
Assigned To: Philipp Hahn
Erik Damrose
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-07 15:34 CEST by Tim Petersen
Modified: 2016-06-02 13:15 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Petersen univentionstaff 2014-08-07 15:34:18 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.
Comment 1 Philipp Hahn univentionstaff 2014-08-18 14:37:09 CEST
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.
Comment 2 Janis Meybohm univentionstaff 2015-01-05 10:13:47 CET
Requested again: 2015010521000109
Comment 3 Tobias Birkefeld univentionstaff 2016-05-26 13:23:50 CEST
Requested again: 2016052621000132
Comment 4 Philipp Hahn univentionstaff 2016-05-27 13:24:22 CEST
$ 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
Comment 5 Erik Damrose univentionstaff 2016-05-30 13:43:09 CEST
OK: Removal of memory check
OK: Create/remove/revert to snapshot with more than 4Gib
OK: yaml
Comment 6 Janek Walkenhorst univentionstaff 2016-06-02 13:15:42 CEST
<http://errata.software-univention.de/ucs/4.1/188.html>