summary refs log tree commit diff stats
path: root/gitlab/issues/target_missing/host_missing/accel_missing/2772.toml
blob: bbdfebbe72ab27974b9f4fbc602a26887c698c3f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
id = 2772
title = "qemu-img map command omits `offset` key in output for encrypted qcow2 files"
state = "opened"
created_at = "2025-01-10T13:58:47.576Z"
closed_at = "n/a"
labels = []
url = "https://gitlab.com/qemu-project/qemu/-/issues/2772"
host-os = "RHEL 8.10"
host-arch = "x86_64"
qemu-version = "qemu-img version 6.2.0 (qemu-kvm-6.2.0-53.module+el8.10.0+22375+ea5e8167.2)"
guest-os = "n/a"
guest-arch = "n/a"
description = """We use the `qemu-img map` command to retrieve metadata information from a qcow2 image. It functions as expected for non-encrypted qcow2 images. However, when the same command is executed on an encrypted qcow2 image, the output omits the `offset` key, which is critical for subsequent processing in our workflow."""
reproduce = """1. Run qemu-img map on the encrypted incremental qcow2:
Command:

```
 qemu-img map --object secret,id=sec0,data=trilio --output json -U --image-opts driver=qcow2,file.filename=incremental.qcow2,encrypt.format=luks,encrypt.key-secret=sec0
```
**Observed Output:** The command executes but does not include the offset key in the JSON output.
For example:
```
[{ "start": 32191217664, "length": 65536, "depth": 1, "present": true, "zero": false, "data": true},
{ "start": 32191283200, "length": 2031616, "depth": 1, "present": false, "zero": true, "data": false},
{ "start": 32193314816, "length": 65536, "depth": 1, "present": true, "zero": false, "data": true},
{ "start": 32193380352, "length": 2031616, "depth": 1, "present": false, "zero": true, "data": false},
{ "start": 32195411968, "length": 65536, "depth": 1, "present": true, "zero": false, "data": true},
{ "start": 32195477504, "length": 2031616, "depth": 1, "present": false, "zero": true, "data": false},
{ "start": 32197509120, "length": 65536, "depth": 1, "present": true, "zero": false, "data": true},
{ "start": 32197574656, "length": 2031616, "depth": 1, "present": false, "zero": true, "data": false},
{ "start": 32199606272, "length": 65536, "depth": 1, "present": true, "zero": false, "data": true},
{ "start": 32199671808, "length": 2031616, "depth": 1, "present": false, "zero": true, "data": false},
{ "start": 32201703424, "length": 65536, "depth": 1, "present": true, "zero": false, "data": true},
{ "start": 32201768960, "length": 2031616, "depth": 1, "present": false, "zero": true, "data": false},
{ "start": 32203800576, "length": 65536, "depth": 1, "present": true, "zero": false, "data": true},
{ "start": 32203866112, "length": 2031616, "depth": 1, "present": false, "zero": true, "data": false},
{ "start": 32205897728, "length": 65536, "depth": 1, "present": true, "zero": false, "data": true},
{ "start": 32205963264, "length": 2031616, "depth": 1, "present": false, "zero": true, "data": false},
{ "start": 32207994880, "length": 65536, "depth": 1, "present": true, "zero": false, "data": true},
{ "start": 32208060416, "length": 2031616, "depth": 1, "present": false, "zero": true, "data": false},
{ "start": 32210092032, "length": 65536, "depth": 1, "present": true, "zero": false, "data": true},
{ "start": 32210157568, "length": 2031616, "depth": 1, "present": false, "zero": true, "data": false},
{ "start": 32212189184, "length": 65536, "depth": 1, "present": true, "zero": false, "data": true}]
```

2. Decrypt the same encrypted incremental qcow2 image and re-run the qemu-img map command:
**Decryption command:**
```
qemu-img convert -t writeback --object secret,id=sec0,data=trilio -O qcow2 --image-opts driver=qcow2,encrypt.key-secret=sec0,file.filename=incremental.qcow2 decrypt.qcow2
```
3. Run qemu-img map on the decrypted image:
**Command:**
```
qemu-img map --output json -U decrypt.qcow2 
```
Here, we don't need to pass the encryption key as we have already decrypted the qcow2.

**Observed Output:** The JSON output includes the offset key as expected. Example:
```
[{ "start": 0, "length": 106954752, "depth": 0, "present": false, "zero": true, "data": false},
{ "start": 106954752, "length": 2097152, "depth": 0, "present": true, "zero": false, "data": true, "offset": 327680},
{ "start": 109051904, "length": 786432000, "depth": 0, "present": false, "zero": true, "data": false},
{ "start": 895483904, "length": 2097152, "depth": 0, "present": true, "zero": false, "data": true, "offset": 2490368},
{ "start": 897581056, "length": 1866924032, "depth": 0, "present": false, "zero": true, "data": false},
{ "start": 2764505088, "length": 1638400, "depth": 0, "present": true, "zero": false, "data": true, "offset": 4653056},
{ "start": 2766143488, "length": 402587648, "depth": 0, "present": false, "zero": true, "data": false},
{ "start": 3168731136, "length": 2162688, "depth": 0, "present": true, "zero": false, "data": true, "offset": 6291456},
{ "start": 3170893824, "length": 140443648, "depth": 0, "present": false, "zero": true, "data": false},
{ "start": 3311337472, "length": 54394880, "depth": 0, "present": true, "zero": false, "data": true, "offset": 8519680},
{ "start": 3365732352, "length": 2056388608, "depth": 0, "present": false, "zero": true, "data": false},
{ "start": 5422120960, "length": 1114112, "depth": 0, "present": true, "zero": false, "data": true, "offset": 62980096},
{ "start": 5423235072, "length": 4128768, "depth": 0, "present": false, "zero": true, "data": false},
{ "start": 5427363840, "length": 2162688, "depth": 0, "present": true, "zero": false, "data": true, "offset": 64094208},
{ "start": 5429526528, "length": 469696512, "depth": 0, "present": false, "zero": true, "data": false},
{ "start": 5899223040, "length": 2162688, "depth": 0, "present": true, "zero": false, "data": true, "offset": 66256896},
{ "start": 5901385728, "length": 90112000, "depth": 0, "present": false, "zero": true, "data": false},
{ "start": 5991497728, "length": 1638400, "depth": 0, "present": true, "zero": false, "data": true, "offset": 68485120},
{ "start": 5993136128, "length": 2086600704, "depth": 0, "present": false, "zero": true, "data": false},
{ "start": 8079736832, "length": 2686976, "depth": 0, "present": true, "zero": false, "data": true, "offset": 70189056},
{ "start": 8082423808, "length": 24129830912, "depth": 0, "present": false, "zero": true, "data": false}]
```

The missing `offset` key in the output of the `qemu-img map` command for encrypted qcow2 images disrupts downstream processes that rely on this metadata."""
additional = "n/a"