master
out 107 lines 3.99 KB
Raw
1 QA output created by qcow2-internal-snapshots
2 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
3
4 === Write some data, take a snapshot and overwrite part of it ===
5
6 QEMU X.Y.Z monitor - type 'help' for more information
7 (qemu) qemu-io disk0 "write -P0x11 0 1M"
8 wrote 1048576/1048576 bytes at offset 0
9 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
10 (qemu) savevm snap0
11 (qemu) qemu-io disk0 "write -P0x22 0 512k"
12 wrote 524288/524288 bytes at offset 0
13 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
14 (qemu) quit
15
16 Snapshot list:
17 ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
18 1 snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
19 No errors were found on the image.
20
21 === Verify that loading the snapshot reverts to the old content ===
22
23 QEMU X.Y.Z monitor - type 'help' for more information
24 (qemu) qemu-io disk0 "read -P0x11 0 1M"
25 read 1048576/1048576 bytes at offset 0
26 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
27 (qemu) qemu-io disk0 "write -P0x33 512k 512k"
28 wrote 524288/524288 bytes at offset 524288
29 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
30 (qemu) loadvm snap0
31 (qemu) qemu-io disk0 "read -P0x11 0 1M"
32 read 1048576/1048576 bytes at offset 0
33 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
34 (qemu) qemu-io disk0 "write -P0x33 63k 2k"
35 wrote 2048/2048 bytes at offset 64512
36 2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
37 (qemu) qemu-io disk0 "read -P0x11 0 63k"
38 read 64512/64512 bytes at offset 0
39 63 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
40 (qemu) qemu-io disk0 "read -P0x33 63k 2k"
41 read 2048/2048 bytes at offset 64512
42 2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
43 (qemu) qemu-io disk0 "read -P0x11 65k 63k"
44 read 64512/64512 bytes at offset 66560
45 63 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
46 (qemu) savevm snap1
47 (qemu) quit
48
49 Snapshot list:
50 ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
51 1 snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
52 2 snap1 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
53 No errors were found on the image.
54
55 === qemu-img snapshot can revert to snapshots ===
56
57 read 1048576/1048576 bytes at offset 0
58 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
59 read 64512/64512 bytes at offset 0
60 63 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
61 read 2048/2048 bytes at offset 64512
62 2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
63 read 64512/64512 bytes at offset 66560
64 63 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
65
66 === Deleting snapshots ===
67
68 QEMU X.Y.Z monitor - type 'help' for more information
69 (qemu) delvm snap1
70 (qemu) qemu-io disk0 "read -P0x11 0 63k"
71 read 64512/64512 bytes at offset 0
72 63 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
73 (qemu) qemu-io disk0 "read -P0x33 63k 2k"
74 read 2048/2048 bytes at offset 64512
75 2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
76 (qemu) qemu-io disk0 "read -P0x11 65k 63k"
77 read 64512/64512 bytes at offset 66560
78 63 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
79 (qemu) quit
80
81 Snapshot list:
82 ID TAG VM_SIZE DATE VM_CLOCK ICOUNT
83 1 snap0 SIZE yyyy-mm-dd hh:mm:ss 0000:00:00.000 --
84 No errors were found on the image.
85
86 === Error cases ===
87
88 QEMU X.Y.Z monitor - type 'help' for more information
89 (qemu) QEMU_PROG: Snapshot 'snap1' does not exist in one or more devices
90
91 QEMU X.Y.Z monitor - type 'help' for more information
92 (qemu) loadvm snap1
93 Error: Snapshot 'snap1' does not exist in one or more devices
94 (qemu) quit
95
96 QEMU_PROG: 'incoming' and 'loadvm' options are mutually exclusive
97 QEMU X.Y.Z monitor - type 'help' for more information
98 (qemu) loadvm snap0
99 Error: Device 'disk0' is writable but does not support snapshots
100 (qemu) delvm snap0
101 Error: Device 'disk0' is writable but does not support snapshots
102 (qemu) savevm snap1
103 Error: Device 'disk0' is writable but does not support snapshots
104 (qemu) quit
105
106 QEMU_PROG: 'preconfig' and 'loadvm' options are mutually exclusive
107 *** done