]>
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 | |
7be20252 | 7 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
8 | |
9 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1024b | |
7be20252 | 10 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
11 | |
12 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1k | |
7be20252 | 13 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
14 | |
15 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1K | |
7be20252 | 16 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
17 | |
18 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1M | |
7be20252 | 19 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1048576 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
20 | |
21 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1G | |
7be20252 | 22 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1073741824 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
23 | |
24 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1T | |
7be20252 | 25 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1099511627776 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
26 | |
27 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1024.0 | |
7be20252 | 28 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
29 | |
30 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1024.0b | |
7be20252 | 31 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
32 | |
33 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5k | |
7be20252 | 34 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
35 | |
36 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5K | |
7be20252 | 37 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
38 | |
39 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5M | |
7be20252 | 40 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1572864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
41 | |
42 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5G | |
7be20252 | 43 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1610612736 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
44 | |
45 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5T | |
7be20252 | 46 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1649267441664 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 | |
7be20252 | 51 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
52 | |
53 | qemu-img create -f qcow2 -o size=1024b TEST_DIR/t.qcow2 | |
7be20252 | 54 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
55 | |
56 | qemu-img create -f qcow2 -o size=1k TEST_DIR/t.qcow2 | |
7be20252 | 57 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
58 | |
59 | qemu-img create -f qcow2 -o size=1K TEST_DIR/t.qcow2 | |
7be20252 | 60 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
61 | |
62 | qemu-img create -f qcow2 -o size=1M TEST_DIR/t.qcow2 | |
7be20252 | 63 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1048576 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
64 | |
65 | qemu-img create -f qcow2 -o size=1G TEST_DIR/t.qcow2 | |
7be20252 | 66 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1073741824 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
67 | |
68 | qemu-img create -f qcow2 -o size=1T TEST_DIR/t.qcow2 | |
7be20252 | 69 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1099511627776 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
70 | |
71 | qemu-img create -f qcow2 -o size=1024.0 TEST_DIR/t.qcow2 | |
7be20252 | 72 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
73 | |
74 | qemu-img create -f qcow2 -o size=1024.0b TEST_DIR/t.qcow2 | |
7be20252 | 75 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
76 | |
77 | qemu-img create -f qcow2 -o size=1.5k TEST_DIR/t.qcow2 | |
7be20252 | 78 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
79 | |
80 | qemu-img create -f qcow2 -o size=1.5K TEST_DIR/t.qcow2 | |
7be20252 | 81 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1536 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
82 | |
83 | qemu-img create -f qcow2 -o size=1.5M TEST_DIR/t.qcow2 | |
7be20252 | 84 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1572864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
85 | |
86 | qemu-img create -f qcow2 -o size=1.5G TEST_DIR/t.qcow2 | |
7be20252 | 87 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1610612736 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
88 | |
89 | qemu-img create -f qcow2 -o size=1.5T TEST_DIR/t.qcow2 | |
7be20252 | 90 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1649267441664 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 | |
b87ac966 | 95 | qemu-img: Invalid image size specified. Must be between 0 and 9223372036854775807. |
4dc9f9d6 KW |
96 | |
97 | qemu-img create -f qcow2 -o size=-1024 TEST_DIR/t.qcow2 | |
b87ac966 | 98 | qemu-img: TEST_DIR/t.qcow2: Value '-1024' is out of range for parameter 'size' |
4dc9f9d6 KW |
99 | |
100 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 -- -1k | |
cf923b78 EB |
101 | qemu-img: Invalid image size specified. You may use k, M, G, T, P or E suffixes for |
102 | qemu-img: kilobytes, megabytes, gigabytes, terabytes, petabytes and exabytes. | |
4dc9f9d6 KW |
103 | |
104 | qemu-img create -f qcow2 -o size=-1k TEST_DIR/t.qcow2 | |
cf923b78 EB |
105 | qemu-img: TEST_DIR/t.qcow2: Parameter 'size' expects a non-negative number below 2^64 |
106 | Optional suffix k, M, G, T, P or E means kilo-, mega-, giga-, tera-, peta- | |
107 | and exabytes, respectively. | |
4dc9f9d6 KW |
108 | |
109 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 -- 1kilobyte | |
43d589b0 | 110 | qemu-img: Invalid image size specified. You may use k, M, G, T, P or E suffixes for |
5e00984a | 111 | qemu-img: kilobytes, megabytes, gigabytes, terabytes, petabytes and exabytes. |
4dc9f9d6 KW |
112 | |
113 | qemu-img create -f qcow2 -o size=1kilobyte TEST_DIR/t.qcow2 | |
da7e92ca | 114 | qemu-img: TEST_DIR/t.qcow2: Parameter 'size' expects a non-negative number below 2^64 |
9e19ad4e MA |
115 | Optional suffix k, M, G, T, P or E means kilo-, mega-, giga-, tera-, peta- |
116 | and exabytes, respectively. | |
4dc9f9d6 KW |
117 | |
118 | qemu-img create -f qcow2 TEST_DIR/t.qcow2 -- foobar | |
43d589b0 | 119 | qemu-img: Invalid image size specified. You may use k, M, G, T, P or E suffixes for |
5e00984a | 120 | qemu-img: kilobytes, megabytes, gigabytes, terabytes, petabytes and exabytes. |
4dc9f9d6 KW |
121 | |
122 | qemu-img create -f qcow2 -o size=foobar TEST_DIR/t.qcow2 | |
da7e92ca | 123 | qemu-img: TEST_DIR/t.qcow2: Parameter 'size' expects a non-negative number below 2^64 |
9e19ad4e MA |
124 | Optional suffix k, M, G, T, P or E means kilo-, mega-, giga-, tera-, peta- |
125 | and exabytes, respectively. | |
4dc9f9d6 | 126 | |
f6dc1c31 KW |
127 | == 4. Specify size twice (-o and traditional parameter) == |
128 | ||
129 | qemu-img create -f qcow2 -o size=10M TEST_DIR/t.qcow2 20M | |
130 | qemu-img: TEST_DIR/t.qcow2: The image size must be specified only once | |
131 | ||
4dc9f9d6 KW |
132 | == Check correct interpretation of suffixes for cluster size == |
133 | ||
134 | qemu-img create -f qcow2 -o cluster_size=1024 TEST_DIR/t.qcow2 64M | |
7be20252 | 135 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1024 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
136 | |
137 | qemu-img create -f qcow2 -o cluster_size=1024b TEST_DIR/t.qcow2 64M | |
7be20252 | 138 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1024 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
139 | |
140 | qemu-img create -f qcow2 -o cluster_size=1k TEST_DIR/t.qcow2 64M | |
7be20252 | 141 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1024 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
142 | |
143 | qemu-img create -f qcow2 -o cluster_size=1K TEST_DIR/t.qcow2 64M | |
7be20252 | 144 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1024 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
145 | |
146 | qemu-img create -f qcow2 -o cluster_size=1M TEST_DIR/t.qcow2 64M | |
7be20252 | 147 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1048576 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
148 | |
149 | qemu-img create -f qcow2 -o cluster_size=1024.0 TEST_DIR/t.qcow2 64M | |
7be20252 | 150 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1024 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
151 | |
152 | qemu-img create -f qcow2 -o cluster_size=1024.0b TEST_DIR/t.qcow2 64M | |
7be20252 | 153 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1024 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
154 | |
155 | qemu-img create -f qcow2 -o cluster_size=0.5k TEST_DIR/t.qcow2 64M | |
7be20252 | 156 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=512 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
157 | |
158 | qemu-img create -f qcow2 -o cluster_size=0.5K TEST_DIR/t.qcow2 64M | |
7be20252 | 159 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=512 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
160 | |
161 | qemu-img create -f qcow2 -o cluster_size=0.5M TEST_DIR/t.qcow2 64M | |
7be20252 | 162 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=524288 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
163 | |
164 | == Check compat level option == | |
165 | ||
166 | qemu-img create -f qcow2 -o compat=0.10 TEST_DIR/t.qcow2 64M | |
7be20252 | 167 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=0.10 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
168 | |
169 | qemu-img create -f qcow2 -o compat=1.1 TEST_DIR/t.qcow2 64M | |
7be20252 | 170 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=1.1 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
171 | |
172 | qemu-img create -f qcow2 -o compat=0.42 TEST_DIR/t.qcow2 64M | |
7be20252 | 173 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=0.42 lazy_refcounts=off refcount_bits=16 |
ea29331b | 174 | qemu-img: TEST_DIR/t.qcow2: Parameter 'version' does not accept value '0.42' |
4dc9f9d6 KW |
175 | |
176 | qemu-img create -f qcow2 -o compat=foobar TEST_DIR/t.qcow2 64M | |
7be20252 | 177 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=foobar lazy_refcounts=off refcount_bits=16 |
ea29331b | 178 | qemu-img: TEST_DIR/t.qcow2: Parameter 'version' does not accept value 'foobar' |
4dc9f9d6 KW |
179 | |
180 | == Check preallocation option == | |
181 | ||
182 | qemu-img create -f qcow2 -o preallocation=off TEST_DIR/t.qcow2 64M | |
7be20252 | 183 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
184 | |
185 | qemu-img create -f qcow2 -o preallocation=metadata TEST_DIR/t.qcow2 64M | |
7be20252 | 186 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=metadata compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
187 | |
188 | qemu-img create -f qcow2 -o preallocation=1234 TEST_DIR/t.qcow2 64M | |
7be20252 | 189 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=1234 compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
ea29331b | 190 | qemu-img: TEST_DIR/t.qcow2: Parameter 'preallocation' does not accept value '1234' |
4dc9f9d6 KW |
191 | |
192 | == Check encryption option == | |
193 | ||
194 | qemu-img create -f qcow2 -o encryption=off TEST_DIR/t.qcow2 64M | |
7be20252 | 195 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 encryption=off cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 | 196 | |
b25b387f | 197 | qemu-img create -f qcow2 --object secret,id=sec0,data=123456 -o encryption=on,encrypt.key-secret=sec0 TEST_DIR/t.qcow2 64M |
7be20252 | 198 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 encryption=on encrypt.key-secret=sec0 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
199 | |
200 | == Check lazy_refcounts option (only with v3) == | |
201 | ||
202 | qemu-img create -f qcow2 -o compat=1.1,lazy_refcounts=off TEST_DIR/t.qcow2 64M | |
7be20252 | 203 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=1.1 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
204 | |
205 | qemu-img create -f qcow2 -o compat=1.1,lazy_refcounts=on TEST_DIR/t.qcow2 64M | |
7be20252 | 206 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=1.1 lazy_refcounts=on refcount_bits=16 |
4dc9f9d6 KW |
207 | |
208 | qemu-img create -f qcow2 -o compat=0.10,lazy_refcounts=off TEST_DIR/t.qcow2 64M | |
7be20252 | 209 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=0.10 lazy_refcounts=off refcount_bits=16 |
4dc9f9d6 KW |
210 | |
211 | qemu-img create -f qcow2 -o compat=0.10,lazy_refcounts=on TEST_DIR/t.qcow2 64M | |
7be20252 | 212 | Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=0.10 lazy_refcounts=on refcount_bits=16 |
4e2f4418 | 213 | qemu-img: TEST_DIR/t.qcow2: Lazy refcounts only supported with compatibility level 1.1 and above (use version=v3 or greater) |
4dc9f9d6 | 214 | |
975a7bd2 CK |
215 | == Expect error when backing file name is empty string == |
216 | ||
217 | qemu-img create -f qcow2 -b TEST_DIR/t.qcow2 1M | |
218 | qemu-img: TEST_DIR/t.qcow2: Expected backing file name, got empty string | |
219 | ||
4dc9f9d6 | 220 | *** done |