Bug 2026199
Summary: | virt-v2v: error: <disk><driver type="format"> attribute is missing from the libvirt XML | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Xiaodai Wang <xiaodwan> |
Component: | libvirt | Assignee: | Jaroslav Suchanek <jsuchane> |
Status: | CLOSED WONTFIX | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 8.6 | CC: | dyuan, hongzliu, jen, jsuchane, juzhou, kkiwi, lersek, mxie, pkrempa, rjones, tyan, tzheng, virt-maint, vwu, yafu |
Target Milestone: | rc | Keywords: | Automation, TestBlocker |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-11-24 11:26:11 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Xiaodai Wang
2021-11-24 03:33:12 UTC
One thing to note is that none of our vmware test data captured from real vmware instances seem to contain the <driver type=''> attribute for disks at all: E.g. in tests/vmx2xmldata/esx-in-the-wild-8.xml <disk type='file' device='disk'> <source file='[datastore] directory/RHEL7_6.vmdk'/> <target dev='sda' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <source file='[datastore] directory/RHEL7_6_1.vmdk'/> <target dev='sdb' bus='scsi'/> <transient/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> <disk type='file' device='disk'> <source file='[5669422e-699d77db-c144-00e0815e303e] block4/block4.vmdk'/> <target dev='sdc' bus='scsi'/> <address type='drive' controller='0' bus='0' target='0' unit='2'/> </disk> <disk type='file' device='cdrom'> <source file='[692eb778-2d4937fe] CentOS-4.7.ServerCD-x86_64.iso'/> <target dev='sda' bus='sata'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> There is one instance in 'tests/vmx2xmldata/esx-in-the-wild-2.xml' having <driver cache='writethrough'/> but that's it. I don't think this is actually a bug in libvirt, or at least it's a sort of bug but not a test blocker. Below is my analysis from email. --- I don't think this is a libvirt bug actually. In the code we don't expect libvirt to return a type here, and so we substitute "raw" format always: https://github.com/libguestfs/virt-v2v/blob/a3d09f8a7435270e376a53d241ee54c2ebab2b0d/v2v/input_libvirt_vcenter_https.ml#L95 However before we reach this code, we go through parse_libvirt_domain here which gives the error about the missing type/format: https://github.com/libguestfs/virt-v2v/blob/a3d09f8a7435270e376a53d241ee54c2ebab2b0d/v2v/parse_libvirt_xml.ml#L270 So this needs another fix in virt-v2v 1.44. I think we can keep the same bug (bug 2025769) for the extra fix. Since QEMU requires the attribute, if libvirt can provide it, then other applications using libvirt will not have to handle it by themselves. I'm not sure about it. That's an argument in favour of providing it. The next issue is whether libvirt can determine the format. In Peter's example (comment 4) there are VMDK files (type="vmdk"), and an ISO (probably type="raw"). However the underlying VMX file doesn't expose the format. It may be possible to guess based on file extension or the .deviceType field. Note that virt-v2v will always want to replace this with "raw" because we actually use either the -flat.vmdk file (really a raw file) or VDDK (exposes raw blocks), so having libvirt provide the true type doesn't really help us. ok, I see, thanks. so I think this bug could be closed as WONT_FIX and use bug 2025769 to track the issue. Closing based on previous comments, please reopen if there is anything libvirt should fixed. Thanks. |