]>
Commit | Line | Data |
---|---|---|
4dc9f9d6 KW |
1 | QA output created by 049 |
2 | === Check correct interpretation of suffixes for image size === | |
3 | ||
4 | == 1. Traditional size parameter == | |
5 | ||
6 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1024 | |
06d05fa7 | 7 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1024 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
8 | |
9 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1024b | |
06d05fa7 | 10 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1024 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
11 | |
12 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1k | |
06d05fa7 | 13 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1024 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
14 | |
15 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1K | |
06d05fa7 | 16 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1024 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
17 | |
18 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1M | |
06d05fa7 | 19 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1048576 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
20 | |
21 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1G | |
06d05fa7 | 22 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
23 | |
24 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1T | |
06d05fa7 | 25 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1099511627776 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
26 | |
27 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1024.0 | |
06d05fa7 | 28 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1024 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
29 | |
30 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1024.0b | |
06d05fa7 | 31 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1024 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
32 | |
33 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5k | |
06d05fa7 | 34 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1536 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
35 | |
36 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5K | |
06d05fa7 | 37 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1536 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
38 | |
39 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5M | |
06d05fa7 | 40 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1572864 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
41 | |
42 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5G | |
06d05fa7 | 43 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1610612736 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
44 | |
45 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5T | |
06d05fa7 | 46 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1649267441664 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
47 | |
48 | == 2. Specifying size via -o == | |
49 | ||
50 | qemu-img create -f qcow2 -o size=1024 TEST_DIR/t.qcow2 | |
06d05fa7 | 51 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1024 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
52 | |
53 | qemu-img create -f qcow2 -o size=1024b TEST_DIR/t.qcow2 | |
06d05fa7 | 54 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1024 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
55 | |
56 | qemu-img create -f qcow2 -o size=1k TEST_DIR/t.qcow2 | |
06d05fa7 | 57 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1024 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
58 | |
59 | qemu-img create -f qcow2 -o size=1K TEST_DIR/t.qcow2 | |
06d05fa7 | 60 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1024 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
61 | |
62 | qemu-img create -f qcow2 -o size=1M TEST_DIR/t.qcow2 | |
06d05fa7 | 63 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1048576 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
64 | |
65 | qemu-img create -f qcow2 -o size=1G TEST_DIR/t.qcow2 | |
06d05fa7 | 66 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
67 | |
68 | qemu-img create -f qcow2 -o size=1T TEST_DIR/t.qcow2 | |
06d05fa7 | 69 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1099511627776 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
70 | |
71 | qemu-img create -f qcow2 -o size=1024.0 TEST_DIR/t.qcow2 | |
06d05fa7 | 72 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1024 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
73 | |
74 | qemu-img create -f qcow2 -o size=1024.0b TEST_DIR/t.qcow2 | |
06d05fa7 | 75 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1024 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
76 | |
77 | qemu-img create -f qcow2 -o size=1.5k TEST_DIR/t.qcow2 | |
06d05fa7 | 78 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1536 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
79 | |
80 | qemu-img create -f qcow2 -o size=1.5K TEST_DIR/t.qcow2 | |
06d05fa7 | 81 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1536 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
82 | |
83 | qemu-img create -f qcow2 -o size=1.5M TEST_DIR/t.qcow2 | |
06d05fa7 | 84 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1572864 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
85 | |
86 | qemu-img create -f qcow2 -o size=1.5G TEST_DIR/t.qcow2 | |
06d05fa7 | 87 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1610612736 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
88 | |
89 | qemu-img create -f qcow2 -o size=1.5T TEST_DIR/t.qcow2 | |
06d05fa7 | 90 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1649267441664 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
91 | |
92 | == 3. Invalid sizes == | |
93 | ||
94 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 -- -1024 | |
95 | qemu-img: Image size must be less than 8 EiB! | |
96 | ||
97 | qemu-img create -f qcow2 -o size=-1024 TEST_DIR/t.qcow2 | |
21278992 BT |
98 | qemu-img: Parameter 'size' expects a non-negative number below 2^64 |
99 | qemu-img: TEST_DIR/t.qcow2: Invalid options for file format 'qcow2' | |
4dc9f9d6 KW |
100 | |
101 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 -- -1k | |
102 | qemu-img: Image size must be less than 8 EiB! | |
103 | ||
104 | qemu-img create -f qcow2 -o size=-1k TEST_DIR/t.qcow2 | |
21278992 BT |
105 | qemu-img: Parameter 'size' expects a non-negative number below 2^64 |
106 | qemu-img: TEST_DIR/t.qcow2: Invalid options for file format 'qcow2' | |
4dc9f9d6 KW |
107 | |
108 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 -- 1kilobyte | |
7486458c | 109 | qemu-img: Invalid image size specified! You may use k, M, G, T, P or E suffixes for |
5e00984a | 110 | qemu-img: kilobytes, megabytes, gigabytes, terabytes, petabytes and exabytes. |
4dc9f9d6 KW |
111 | |
112 | qemu-img create -f qcow2 -o size=1kilobyte TEST_DIR/t.qcow2 | |
06d05fa7 | 113 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=1024 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
114 | |
115 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 -- foobar | |
7486458c | 116 | qemu-img: Invalid image size specified! You may use k, M, G, T, P or E suffixes for |
5e00984a | 117 | qemu-img: kilobytes, megabytes, gigabytes, terabytes, petabytes and exabytes. |
4dc9f9d6 KW |
118 | |
119 | qemu-img create -f qcow2 -o size=foobar TEST_DIR/t.qcow2 | |
120 | qemu-img: Parameter 'size' expects a size | |
552bb52c | 121 | You may use k, M, G or T suffixes for kilobytes, megabytes, gigabytes and terabytes. |
83d0521a | 122 | qemu-img: TEST_DIR/t.qcow2: Invalid options for file format 'qcow2' |
4dc9f9d6 KW |
123 | |
124 | == Check correct interpretation of suffixes for cluster size == | |
125 | ||
126 | qemu-img create -f qcow2 -o cluster_size=1024 TEST_DIR/t.qcow2 64M | |
06d05fa7 | 127 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
128 | |
129 | qemu-img create -f qcow2 -o cluster_size=1024b TEST_DIR/t.qcow2 64M | |
06d05fa7 | 130 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
131 | |
132 | qemu-img create -f qcow2 -o cluster_size=1k TEST_DIR/t.qcow2 64M | |
06d05fa7 | 133 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
134 | |
135 | qemu-img create -f qcow2 -o cluster_size=1K TEST_DIR/t.qcow2 64M | |
06d05fa7 | 136 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
137 | |
138 | qemu-img create -f qcow2 -o cluster_size=1M TEST_DIR/t.qcow2 64M | |
06d05fa7 | 139 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=1048576 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
140 | |
141 | qemu-img create -f qcow2 -o cluster_size=1024.0 TEST_DIR/t.qcow2 64M | |
06d05fa7 | 142 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
143 | |
144 | qemu-img create -f qcow2 -o cluster_size=1024.0b TEST_DIR/t.qcow2 64M | |
06d05fa7 | 145 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
146 | |
147 | qemu-img create -f qcow2 -o cluster_size=0.5k TEST_DIR/t.qcow2 64M | |
06d05fa7 | 148 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=512 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
149 | |
150 | qemu-img create -f qcow2 -o cluster_size=0.5K TEST_DIR/t.qcow2 64M | |
06d05fa7 | 151 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=512 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
152 | |
153 | qemu-img create -f qcow2 -o cluster_size=0.5M TEST_DIR/t.qcow2 64M | |
06d05fa7 | 154 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=524288 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
155 | |
156 | == Check compat level option == | |
157 | ||
158 | qemu-img create -f qcow2 -o compat=0.10 TEST_DIR/t.qcow2 64M | |
fe646693 | 159 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 compat=0.10 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
160 | |
161 | qemu-img create -f qcow2 -o compat=1.1 TEST_DIR/t.qcow2 64M | |
fe646693 | 162 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 compat=1.1 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
163 | |
164 | qemu-img create -f qcow2 -o compat=0.42 TEST_DIR/t.qcow2 64M | |
2c78857b | 165 | qemu-img: TEST_DIR/t.qcow2: Invalid compatibility level: '0.42' |
fe646693 | 166 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 compat=0.42 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
167 | |
168 | qemu-img create -f qcow2 -o compat=foobar TEST_DIR/t.qcow2 64M | |
2c78857b | 169 | qemu-img: TEST_DIR/t.qcow2: Invalid compatibility level: 'foobar' |
fe646693 | 170 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 compat=foobar encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
171 | |
172 | == Check preallocation option == | |
173 | ||
174 | qemu-img create -f qcow2 -o preallocation=off TEST_DIR/t.qcow2 64M | |
fe646693 | 175 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=65536 preallocation=off lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
176 | |
177 | qemu-img create -f qcow2 -o preallocation=metadata TEST_DIR/t.qcow2 64M | |
fe646693 | 178 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=65536 preallocation=metadata lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
179 | |
180 | qemu-img create -f qcow2 -o preallocation=1234 TEST_DIR/t.qcow2 64M | |
ffeaac9b | 181 | qemu-img: TEST_DIR/t.qcow2: invalid parameter value: 1234 |
fe646693 | 182 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=65536 preallocation=1234 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
183 | |
184 | == Check encryption option == | |
185 | ||
186 | qemu-img create -f qcow2 -o encryption=off TEST_DIR/t.qcow2 64M | |
06d05fa7 | 187 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
188 | |
189 | qemu-img create -f qcow2 -o encryption=on TEST_DIR/t.qcow2 64M | |
06d05fa7 | 190 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 encryption=on cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
191 | |
192 | == Check lazy_refcounts option (only with v3) == | |
193 | ||
194 | qemu-img create -f qcow2 -o compat=1.1,lazy_refcounts=off TEST_DIR/t.qcow2 64M | |
fe646693 | 195 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 compat=1.1 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
196 | |
197 | qemu-img create -f qcow2 -o compat=1.1,lazy_refcounts=on TEST_DIR/t.qcow2 64M | |
fe646693 | 198 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 compat=1.1 encryption=off cluster_size=65536 lazy_refcounts=on refcount_bits=16 |
4dc9f9d6 KW |
199 | |
200 | qemu-img create -f qcow2 -o compat=0.10,lazy_refcounts=off TEST_DIR/t.qcow2 64M | |
fe646693 | 201 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 compat=0.10 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
202 | |
203 | qemu-img create -f qcow2 -o compat=0.10,lazy_refcounts=on TEST_DIR/t.qcow2 64M | |
2c78857b | 204 | qemu-img: TEST_DIR/t.qcow2: Lazy refcounts only supported with compatibility level 1.1 and above (use compat=1.1 or greater) |
fe646693 | 205 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 size=67108864 compat=0.10 encryption=off cluster_size=65536 lazy_refcounts=on refcount_bits=16 |
4dc9f9d6 KW |
206 | |
207 | *** done |