[PVE-User] Snapshots and "Now" not listing in Snapshots GUI

Fabian Gr├╝nbichler f.gruenbichler at proxmox.com
Mon May 22 07:53:48 CEST 2017


On Mon, May 22, 2017 at 08:34:49AM +1000, Lindsay Mathieson wrote:
> I've had this happen several times on the latest pve-nosubcription repo.
> Take a snaphot of a windows vm, which completes successfully and later I
> notice that no snapshots or the "Now" enty are listed in the GUI.
> 
> 
> I eventually tracked it down the snapshot having itself as its own parent. I
> often reuse snapshot names, so possibly the "parent:session" entry was left
> over in the main section?

this should only be possible if you either didn't completely clean up a
failed snapshot deletion, or did an incomplete manual snapshot deletion
yourself.

when you create a snapshot, the following happens:
- lock config, copy most of the current config into the snapshot config
- do volume snapshot(s)
- finalize config, unlock config

the parent of the old "current" state becomes the parent of the new
snapshot in step 1, and the new snapshot becomes the parent of the
"current" state in step 3.

when deleting, a similar process runs:

- lock config
- mark snapshot as deleting
- delete volume snapshot(s)
- rewrite all parent keys referencing the deleted snapshot
- delete snapshot config
- unlock config

now if step 3 fails (e.g., because of a storage failure), the snapshot
will be marked as "delete", but still be referenced in the config. if
you manually clean this situation up, you also need to manually do step
4. if you don't, and just delete the snapshot section in the
configuration and the volume snapshots on the storages, the parent key
points to a non existing snapshot, and if you create another snapshot
with the same name, you get the kind of circular dependency which you
are describing.

> 
> 
> Sample conf file here:
> 
> agent: 1
> boot: cdn
> bootdisk: scsi0
> cores: 4
> ide2: none,media=cdrom
> memory: 4096
> name: Derek-CRM-Dev
> net0: virtio=42:85:0B:97:CD:21,bridge=vmbr0
> ostype: win7
> parent: session
> scsi0: gluster4:204/vm-204-disk-1.qcow2,cache=writeback,size=130559M
> scsihw: virtio-scsi-pci
> sockets: 1
> unused0: LOBVirusBackup:204/vm-204-disk-1.qcow2
> vga: qxl
> 
> [session]
> agent: 1
> boot: cdn
> bootdisk: scsi0
> cores: 4
> ide2: none,media=cdrom
> machine: pc-i440fx-2.7
> memory: 4096
> name: Derek-CRM-Dev
> net0: virtio=42:85:0B:97:CD:21,bridge=vmbr0
> ostype: win7
> *parent: session*
> scsi0: gluster4:204/vm-204-disk-1.qcow2,cache=writeback,size=130559M
> scsihw: virtio-scsi-pci
> snaptime: 1495187328
> sockets: 1
> vga: qxl
> vmstate: gluster4:204/vm-204-state-session.raw
> ~
> ~
> 
> 
> 
> -- 
> Lindsay Mathieson
> 
> _______________________________________________
> pve-user mailing list
> pve-user at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user



More information about the pve-user mailing list