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
|
peripherals: 0.978
debug: 0.978
user-level: 0.977
permissions: 0.974
virtual: 0.972
files: 0.972
register: 0.970
assembly: 0.970
graphic: 0.970
performance: 0.970
device: 0.969
risc-v: 0.966
hypervisor: 0.965
semantic: 0.963
vnc: 0.961
arm: 0.960
mistranslation: 0.960
architecture: 0.959
PID: 0.959
network: 0.958
socket: 0.953
boot: 0.951
KVM: 0.951
kernel: 0.945
x86: 0.945
VMM: 0.945
ppc: 0.944
TCG: 0.943
i386: 0.929
blockdev fixed vhdx trying to reserve space, also misleading error, Could not open file: Invalid argument
Description of problem:
The qemu-storage-daemon/other qemu commands will not start and will choke on requiring vhdx driver for the blockdev layer.
Opening a fixed-virtual-disk like fixed-vhdx should not reserve extra space, and should only overwrite as all blocks are already allocated.
Steps to reproduce:
1. Ensure that a partition size is such that after deciding a fixed-vhdx size, the remainder space after creation of fixed-vhdx is less than the fixed-vhdx.
2. Create a fixed-vhdx file
3. Try to start an nbd server with it
the qemu-storage-daemon will not start
Additional information:
I want to mention that I am testing qemu-storage-daemon under windows/hyperv
So far, I want to report that it has **worked** for rawimg and qcow2-fixed.
See comment of 20220926 https://github.com/cloudbase/wnbd/issues/63#issuecomment-1257148849
The driver parameter ```vhdx``` to the blockdev argument seems to struggle with it.
I wanted to check if the vhdx blockdev driver has the same VHDX-related-bugs as qemu-nbd
- #727 VHDX is corrupted on expansion.
- #806 Fixed VHDX inflates beyond its fixed size when data is copied onto it and also corrupts
Even the the blockdev reference entries seem to have VHDX all over the place
- pg 318 https://readthedocs.org/projects/qemu/downloads/pdf/latest/
- https://www.qemu.org/docs/master/system/qemu-block-drivers.html
- except conspicuously here !! https://www.qemu.org/docs/master/interop/qemu-storage-daemon-qmp-ref.html?highlight=blockdev#qapidoc-265
```
C:\Windows\System32>qemu-storage-daemon --version
qemu-storage-daemon version 7.1.0 (v7.1.0-11925-g4ec481870e-dirty)
C:\Windows\System32>qemu-storage-daemon --blockdev driver=file,node-name=file,filename=H:\gkpics01.vhdx --blockdev driver=vhdx,node-name=vhdx,file=file --nbd-server addr.type=inet,addr.host=127.0.0.1,addr.port=10809 --export type=nbd,id=export,node-name=vhdx,name=gkpics01,writable=on
qemu-storage-daemon: --blockdev driver=vhdx,node-name=vhdx,file=file: Could not open 'H:\gkpics01.vhdx': Invalid argument
C:\Windows\System32>qemu-storage-daemon --blockdev driver=file,node-name=file,filename=H:\gkpics01.vhdx --blockdev driver=vhdx,node-name=vhdx,file=file,subformat=fixed --nbd-server addr.type=inet,addr.host=127.0.0.1,addr.port=10809 --export type=nbd,id=export,node-name=vhdx,name=gkpics01,writable=on
qemu-storage-daemon: --blockdev driver=vhdx,node-name=vhdx,file=file,subformat=fixed: Parameter 'subformat' is unexpected
C:\Windows\System32>dir H:\gkpics01.vhdx
Volume in drive H is CPERF0
Volume Serial Number is F196-DB9E
Directory of H:\
09/29/2022 08:55 PM 99,727,966,208 gkpics01.vhdx
1 File(s) 99,727,966,208 bytes
0 Dir(s) 4,312,399,872 bytes free
```
##
|