'qemu-img snapshot' allows new snapshot to be created with the name of an existing snapshot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Expired
|
Undecided
|
Unassigned | ||
qemu (Ubuntu) |
Expired
|
Low
|
Unassigned |
Bug Description
qemu-img _may_ be working as designed, but it feels like this could be a bug. I'd certainly prefer to only allow unique snapshot names (unless maybe something like a "--force-
If this really is correct behaviour, it should be documented as qemu-img(1) currently specifies no details whatsoever regarding expected behaviour or valid snapshot names.
$ qemu-img snapshot -l image.cow
$ qemu-img snapshot -c foo image.cow
$ qemu-img snapshot -l image.cow
Snapshot list:
ID TAG VM SIZE DATE VM CLOCK
1 foo 0 2014-11-26 08:30:53 00:00:00.000
$ qemu-img snapshot -c foo image.cow
$ qemu-img snapshot -l image.cow
Snapshot list:
ID TAG VM SIZE DATE VM CLOCK
1 foo 0 2014-11-26 08:30:53 00:00:00.000
2 foo 0 2014-11-26 08:30:58 00:00:00.000
$ qemu-img snapshot -c foo image.cow
$ qemu-img snapshot -l image.cow
Snapshot list:
ID TAG VM SIZE DATE VM CLOCK
1 foo 0 2014-11-26 08:30:53 00:00:00.000
2 foo 0 2014-11-26 08:30:58 00:00:00.000
3 foo 0 2014-11-26 08:31:00 00:00:00.000
$ qemu-img snapshot -d foo image.cow
$ qemu-img snapshot -l image.cow
Snapshot list:
ID TAG VM SIZE DATE VM CLOCK
2 foo 0 2014-11-26 08:30:58 00:00:00.000
3 foo 0 2014-11-26 08:31:00 00:00:00.000
$ qemu-img snapshot -d foo image.cow
$ qemu-img snapshot -l image.cow
Snapshot list:
ID TAG VM SIZE DATE VM CLOCK
3 foo 0 2014-11-26 08:31:00 00:00:00.000
$ qemu-img snapshot -d foo image.cow
$ qemu-img snapshot -l image.cow
$
Note also how snapshot deletion works in reverse order - the oldest snapshot with a given name is deleted first.
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: qemu-utils 2.1+dfsg-4ubuntu9
ProcVersionSign
Uname: Linux 3.16.0-25-generic x86_64
ApportVersion: 2.14.7-0ubuntu10
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Nov 26 08:28:16 2014
InstallationDate: Installed on 2014-04-11 (228 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Daily amd64 (20140409)
KvmCmdLine:
COMMAND STAT EUID RUID PID PPID %CPU COMMAND
kvm-irqfd-clean S< 0 0 719 2 0.0 [kvm-irqfd-clean]
MachineType: LENOVO 20AQCTO1WW
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: qemu
UpgradeStatus: Upgraded to vivid on 2014-05-08 (201 days ago)
dmi.bios.date: 02/10/2014
dmi.bios.vendor: LENOVO
dmi.bios.version: GJET71WW (2.21 )
dmi.board.
dmi.board.name: 20AQCTO1WW
dmi.board.vendor: LENOVO
dmi.board.version: 0B98405 STD
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.name: 20AQCTO1WW
dmi.product.
dmi.sys.vendor: LENOVO
Changed in qemu (Ubuntu): | |
importance: | Undecided → Low |
status: | New → Triaged |
I'd agree that at least the last part - removing the oldest snapshot first - seems like a bug.