diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-06-03 12:04:13 +0000 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-06-03 12:04:13 +0000 |
| commit | 256709d2eb3fd80d768a99964be5caa61effa2a0 (patch) | |
| tree | 05b2352fba70923126836a64b6a0de43902e976a /results/classifier/105/other/1753186 | |
| parent | 2ab14fa96a6c5484b5e4ba8337551bb8dcc79cc5 (diff) | |
| download | emulator-bug-study-256709d2eb3fd80d768a99964be5caa61effa2a0.tar.gz emulator-bug-study-256709d2eb3fd80d768a99964be5caa61effa2a0.zip | |
add new classifier result
Diffstat (limited to 'results/classifier/105/other/1753186')
| -rw-r--r-- | results/classifier/105/other/1753186 | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/results/classifier/105/other/1753186 b/results/classifier/105/other/1753186 new file mode 100644 index 00000000..299bee53 --- /dev/null +++ b/results/classifier/105/other/1753186 @@ -0,0 +1,66 @@ +other: 0.835 +graphic: 0.817 +device: 0.804 +network: 0.762 +semantic: 0.746 +KVM: 0.744 +socket: 0.730 +vnc: 0.702 +instruction: 0.701 +mistranslation: 0.701 +assembly: 0.688 +boot: 0.549 + +qemu-nbd: always first snapshot loaded from VDI images with snapshots + +When mounting a virtual box disk image of a VM with snapshots, always the state of the first snapshot is shown. + +How to reproduce: +1. Create a new VirtualBox VM or use an existing one, while choosing VDI as the disk image format. +2. Create a snapshot of the VM. +3. Modify the file system from within the VM enough that differences to the snapshotted version are apparent. +4. Create another snapshot. +5. Shut down the VM. +6. Mount the partition from the disk image with `qemu-nbd -c /dev/nbd0 /path/to/disk.vdi; mount /dev/nbd0pX /mnt` + +Expected result: The mounted disk image shall represent the latest state of the VM +Actual result: The mounted disk image represents the VM state at the first snapshot + +version information: qemu-nbd-2.11.1(openSUSE Tumbleweed) + +Hi, + +As far as I can tell that's because only the first snapshot is actually stored in the VDI. +(1) I've created a VM with /tmp/foo.vdi as storage +(2) Executed "echo 'snapshot' > /dev/sda" in the guest +(3) Took a snapshot +(4) Executed "echo 'next snapshot' > /dev/sda" in the guest +(5) Took a snapshot +(6) Executed "echo 'active layer' > /dev/sda" in the guest + +$ strings /tmp/foo.vdi +<<< Oracle VM VirtualBox Disk Image >>> +snapshot +$ ls ~/VirtualBox\ VMs/foo/Snapshots +{c9a75c86-6c0d-4aaa-9d24-cbd4456c74fb}.vdi {ce16e224-fa61-4b26-a5c5-21d92062ced7}.vdi +$ strings ~/VirtualBox\ VMs/foo/Snapshots/\{ce16e224-fa61-4b26-a5c5-21d92062ced7\}.vdi +<<< Oracle VM VirtualBox Disk Image >>> +next snapshot +$ strings ~/VirtualBox\ VMs/foo/Snapshots/\{c9a75c86-6c0d-4aaa-9d24-cbd4456c74fb\}.vdi +<<< Oracle VM VirtualBox Disk Image >>> +active layer + +So snapshots in VDI apparently are what qemu calls external snapshots, so they work through backing file links -- and the original file is simply the bottom-most backing file (that is, the oldest snapshot). So the file you'd want to open is {c9a75c86-6c0d-4aaa-9d24-cbd4456c74fb}.vdi. + However: +$ qemu-img info \{ce16e224-fa61-4b26-a5c5-21d92062ced7\}.vdi +qemu-img: Could not open '{ce16e224-fa61-4b26-a5c5-21d92062ced7}.vdi': unsupported VDI image (non-NULL link UUID) + +So qemu doesn't support this now. The current behavior is more or less correct (because the file only contains the data of the oldest snapshot), supporting snapshots would be a feature request. + +Max + +Closing this as WontFix since it works as expected, and keeping it open as wishlist item does not make too much sense. + +The QEMU project normally doesn't implement new features like these external snapshots on demand; they're a lot of work to do. Instead we simply code-review and incorporate such features as and when people decide to write them and submit the patches. So there's not much point in having a 'wishlist' bug in the bug tracker saying "support for feature X would be nice", because it will likely never happen, unless by the coincidence that somebody happened to implement and submit it to us anyway. Sorry for the inconvenience and thanks for your understanding. + + |