RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1677608 - Libvirt cannot get disk info of the guest with sata disk installed on VMware
Summary: Libvirt cannot get disk info of the guest with sata disk installed on VMware
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Michal Privoznik
QA Contact: Vera
URL:
Whiteboard:
Depends On: 1883588
Blocks: 1679376
TreeView+ depends on / blocked
 
Reported: 2019-02-15 10:57 UTC by liuzi
Modified: 2022-05-10 13:25 UTC (History)
11 users (show)

Fixed In Version: libvirt-7.8.0-1.module+el8.6.0+12978+7d7a0321
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1679376 (view as bug list)
Environment:
Last Closed: 2022-05-10 13:18:34 UTC
Type: Bug
Target Upstream Version: 6.9.0
Embargoed:


Attachments (Terms of Use)
screenshot1 (48.21 KB, image/png)
2019-02-15 11:00 UTC, liuzi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-55658 0 None None None 2022-05-09 03:38:12 UTC
Red Hat Product Errata RHSA-2022:1759 0 None None None 2022-05-10 13:20:07 UTC

Description liuzi 2019-02-15 10:57:57 UTC
Description of problem:
Libvirt cannot get disk info of the guest with sata disk installed on VMware

Version-Release number of selected component (if applicable):
libvirt-4.5.0-21.module+el8+2777+e17f6250.x86_64
qemu-kvm-2.12.0-61.module+el8+2786+5afd5ae3.x86_64

How reproducible:
100%

Steps to reproduce:
1.Prepare a guest with sata disk on ESX6.5 and make sure the guest can boot normally,pls refer to screenshot 1

2. Check the guest's xml info
# virsh -c vpx://root.73.141/data/10.73.196.89/?no_verify=1 dumpxml esx6.5-rhel7.6-sata
Enter root's password for 10.73.73.141:
<domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'>
  <name>esx6.5-rhel7.6-sata</name>
  <uuid>422c3051-9921-378a-b991-d9ec680abd3e</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <shares>1000</shares>
  </cputune>
  <os>
    <type arch='x86_64'>hvm</type>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <interface type='bridge'>
      <mac address='00:50:56:ac:94:8c'/>
      <source bridge='VM Network'/>
      <model type='vmxnet3'/>
    </interface>
    <video>
      <model type='vmvga' vram='8192' primary='yes'/>
    </video>
  </devices>
  <vmware:datacenterpath>data</vmware:datacenterpath>
  <vmware:moref>vm-663</vmware:moref>
</domain>

Actual results:
As above description

Expected results:
Libvirt can get disk info of the guest with sata disk installed on VMware

Additional info:
1.The bug can reproduce on rhel7

Comment 1 liuzi 2019-02-15 11:00:03 UTC
Created attachment 1535116 [details]
screenshot1

Comment 3 Pino Toscano 2020-10-14 09:46:56 UTC
Fixed upstream for libvirt 6.9.0:

commit 2214fe90442c0f66359e5def3c3033bae0c60102 (HEAD -> master, origin/master, origin/HEAD)
Author: Pino Toscano <ptoscano>
Date:   Mon Oct 12 17:06:59 2020 +0200

    vmx: start parsing SATA disks
    
    Always reverse-engineering VMX files, attempt to support SATA disks in
    guests, and their controllers.
    
    The esx-in-the-wild-10 test case is taken from RHBZ#1883588, while the
    result of esx-in-the-wild-8 is updated with SATA disks.
    
    Fixes (hopefully):
    https://bugzilla.redhat.com/show_bug.cgi?id=1677608
    https://bugzilla.redhat.com/show_bug.cgi?id=1883588
    
    Signed-off-by: Pino Toscano <ptoscano>
    Reviewed-by: Michal Privoznik <mprivozn>

 src/vmx/vmx.c                                    | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-10.vmx | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-10.xml |  36 ++++++++++++++++++++++++++++++++++++
 tests/vmx2xmldata/vmx2xml-esx-in-the-wild-8.xml  |   6 ++++++
 tests/vmx2xmltest.c                              |   1 +
 5 files changed, 282 insertions(+)

commit 18a1dd57cd32493ce1124f2f1400811ccc9815b7
Author: Pino Toscano <ptoscano>
Date:   Mon Oct 12 13:33:45 2020 +0200

    vmx: expand the disk array
    
    Account for the possible SATA disks too, which means 120 potential
    disks.
    
    This means the size of the array triples, however that is unavoidable
    with the current way of reading disks.
    
    Signed-off-by: Pino Toscano <ptoscano>
    Reviewed-by: Michal Privoznik <mprivozn>

 src/vmx/vmx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

commit 11e61489ff6a7e03ed47629c6561228e5d4c09bb
Author: Pino Toscano <ptoscano>
Date:   Mon Oct 12 13:25:25 2020 +0200

    vmx: shortcut 'cdrom-image' as CD-ROM earlier
    
    Add it to the list of 'deviceType' values ignored for disks.
    
    Signed-off-by: Pino Toscano <ptoscano>
    Reviewed-by: Michal Privoznik <mprivozn>

 src/vmx/vmx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

commit b23ee6394a34a9e3c0301dcdc8c65fb92b0f4e0c
Author: Pino Toscano <ptoscano>
Date:   Mon Oct 12 13:16:24 2020 +0200

    vmx: hide private helpers
    
    Move all the private helpers for parsing and formatting of domain
    elements as private static functions in vmx.c, to avoid using them
    directly.
    
    Signed-off-by: Pino Toscano <ptoscano>
    Reviewed-by: Michal Privoznik <mprivozn>

 src/libvirt_vmx.syms | 12 ------------
 src/vmx/vmx.c        | 62 ++++++++++++++++++++++++++++++++++++++++++++++----------------
 src/vmx/vmx.h        | 44 --------------------------------------------
 3 files changed, 46 insertions(+), 72 deletions(-)

Comment 11 Vera 2021-10-26 07:03:53 UTC
Verified with the following version:

libvirt-7.8.0-1.module+el8.6.0+12978+7d7a0321.x86_64
qemu-kvm-6.1.0-4.module+el8.6.0+13039+4b81a1dc.x86_64

# virsh -c vpx://root.73.141/data/10.73.196.89/?no_verify=1 dumpxml Auto-esx6.5-rhel7.6-sata
Enter root's password for 10.73.73.141: 
<domain type='vmware' xmlns:vmware='http://libvirt.org/schemas/domain/vmware/1.0'>
  <name>Auto-esx6.5-rhel7.6-sata</name>
  <uuid>422c3051-9921-378a-b991-d9ec680abd3e</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>2097152</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <shares>1000</shares>
  </cputune>
  <os>
    <type arch='x86_64'>hvm</type>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <disk type='file' device='disk'>
      <source file='[esx6.5-function] esx6.5-rhel7.6-sata/esx6.5-rhel7.6-sata.vmdk'/>
      <target dev='sda' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='sata' index='0'/>
    <interface type='bridge'>
      <mac address='00:50:56:ac:94:8c' type='generated'/>
      <source bridge='VM Network'/>
      <model type='vmxnet3'/>
    </interface>
    <video>
      <model type='vmvga' vram='8192' primary='yes'/>
    </video>
  </devices>
  <vmware:datacenterpath>data</vmware:datacenterpath>
  <vmware:moref>vm-2079</vmware:moref>
</domain>


The disk info shows in this fixed version.

Moving state to Verified.

Comment 13 errata-xmlrpc 2022-05-10 13:18:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:1759


Note You need to log in before you can comment on or make changes to this bug.