blob: e473d8d6c08e52ef977078fcd7664e9f32e2732d (
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
|
graphic: 0.735
semantic: 0.628
VMM: 0.618
PID: 0.587
permissions: 0.586
debug: 0.586
performance: 0.574
hypervisor: 0.568
x86: 0.558
architecture: 0.549
TCG: 0.544
ppc: 0.534
risc-v: 0.530
files: 0.529
i386: 0.524
arm: 0.522
virtual: 0.522
network: 0.515
KVM: 0.513
device: 0.511
peripherals: 0.492
vnc: 0.485
assembly: 0.483
socket: 0.479
kernel: 0.474
register: 0.463
boot: 0.458
mistranslation: 0.346
user-level: 0.342
empty vmdk disk created by qemu-img cann't import to vmware ESXi or Workstation
Description of problem:
qemu-img create empty vmdk file, and can't import to vmware workstation or ESXi. the ovftool
fail. the log:
> ```
> 2024-08-23T11:19:32.335+08:00 verbose OVFTool[4088548] [Originator@6876 sub=Default] Opening disk target empty-disk2.vmdk
> 2024-08-23T11:19:32.335+08:00 error OVFTool[4088548] [Originator@6876 sub=Default] Error on read, error: -1
> 2024-08-23T11:19:32.336+08:00 verbose OVFTool[4088187] [Originator@6876 sub=Default] Exception thrown: N5boost16exception_detail10clone_implINS_17unknown_exceptionEEE(std::exception)
> 2024-08-23T11:19:32.337+08:00 verbose OVFTool[4088187] [Originator@6876 sub=Default] Backtrace:
> --> [backtrace begin] product: VMware Workstation, version: e.x.p, build: build-15722219, tag: OVFTool, cpu: x86_64, os: linux, buildType: release
> --> backtrace[00] libvmacore.so[0x003DD716]
> --> backtrace[01] libvmacore.so[0x001CF8DF]: Vmacore::System::Stacktrace::CaptureWork(unsigned int)
> --> backtrace[02] libvmacore.so[0x001B6EA9]: Vmacore::System::SystemFactory::CreateQuickBacktrace(Vmacore::Ref<Vmacore::System::Backtrace>&)
> --> backtrace[03] libvmacore.so[0x0016CF2E]: Vmacore::Throwable::Throwable(std::string&&)
> --> backtrace[04] ovftool.bin[0x001C1F38]
> --> backtrace[05] ovftool.bin[0x002008D5]
> --> backtrace[06] ovftool.bin[0x00129EF0]
> --> backtrace[07] libc.so.6[0x00044E50]
> --> backtrace[08] libc.so.6[0x00044EFC]
> --> backtrace[09] ovftool.bin[0x00132D21]
> --> [backtrace end]
> ```
the log file:
[test.log](/uploads/174db2ace468bd9f0ec3ab14de524217/test.log)
Steps to reproduce:
1. create empty vmdk file
./qemu-img create -f vmdk -o adapter_type=lsilogic,subformat=streamOptimized empty.vmdk 1G
2. add empty file info to ovf file
<File ovf:href="empty.vmdk" ovf:id="file2"/>
3. import it to vmware workstation
Additional information:
If i write some data to empty vmdk file, it can import successfully. The reson: qemu only write metadata for empty vmdk file, but the ovftool need read more data and it cann't read more.
we can write one sector zero data after the metadata, ovftool work well.
I submitted the patch:
https://patchew.org/QEMU/20240822105237.777-1-luzhipeng@cestc.cn/
|