Bug 1571759

Summary: Create Volume on ESX local storage via virsh failed while use new libvirt
Product: Red Hat Enterprise Linux 7 Reporter: liangz <zhouliang0806>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED ERRATA QA Contact: Meina Li <meili>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.4CC: dyuan, fjin, jsuchane, lizhu, lmen, marcos.souza.org, tzheng, xuzhang
Target Milestone: rcKeywords: Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-4.5.0-5.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 09:55:31 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 liangz 2018-04-25 11:36:16 UTC
Description of problem:
Upgrade the libvirt client to libvirt-3.2.0-14.el7.x86_64, and execute " vol-create-as" will got error "error: internal error: Could not create volume: InvalidArgument - A specified parameter was not correct. lsilogic"

Version-Release number of selected component (if applicable):
libvirt-3.2.0-14.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. virsh -c esx://${esx_host}/?no_verify=1
2. vol-create-as local-fscbrx350s8 manualtest/manualtest.vmdk 100M --format vmdk


Actual results:
Failed
error: Failed to create vol xenrtmanualtest1/xenrtmanualtest1.vmdk
error: internal error: Could not create volume: InvalidArgument - A specified parameter was not correct.
lsilogic


Expected results:
Can create volume success on local storage.

Additional info:
If use libvirt 1.2.16, this works.

Comment 2 liangz 2018-04-25 12:48:41 UTC
Add the version details here.

virsh # version
Compiled against library: libvirt 3.2.0
Using library: libvirt 3.2.0
Using API: ESX 3.2.0
Running hypervisor: ESX 5.5.0

Comment 3 Jaroslav Suchanek 2018-04-27 07:30:23 UTC
Regression due to this?

commit 77298458d027db4d3e082213355e2d792f65158d
Author:     Dawid Zamirski <dzamirski>
AuthorDate: Mon May 23 17:31:57 2016 -0400
Commit:     Michal Privoznik <mprivozn>
CommitDate: Wed May 25 16:49:49 2016 +0200

    esx: use lsilogic adapter type in vol create.
    
    ESX will refuse to attach VMDKS that have buslogic adatper type to 64bit
    VMs whereas lsilogic works fine both 32bit and 64bit VMs.

Comment 4 liangz 2018-05-02 12:51:38 UTC
If rool back this commit 77298458d027db4d3e082213355e2d792f65158d.
I verify locally, it still failed.

virsh # vol-create-as datastore1 xenrtmanualtest1/xenrtmanualtest1.vmdk 100M --format vmdk
error: Failed to create vol xenrtmanualtest1/xenrtmanualtest1.vmdk
error: internal error: Could not create volume: InvalidArgument - A specified parameter was not correct: buslogic

Hi experts, please help to take a look at this issue.

Many thanks.

Comment 5 liangz 2018-05-07 07:00:23 UTC
Seems Jaroslav's guess is correct.
When I roll back commit. It works fine. My last comment, misspell the word "busLogic"

Comment 6 Marcos Paulo 2018-07-24 15:38:46 UTC
A patch solving this problem was posted a few minutes ago:
https://www.redhat.com/archives/libvir-list/2018-July/msg01592.html

Comment 9 Meina Li 2018-08-10 09:19:53 UTC
Verified on libvirt-4.5.0-6.el7.x86_64

Test steps:
1. Connect an esx host.

# virsh -c esx://${esx_host}/?no_verify=1

2. Check pool and create volume for this pool.

virsh # pool-list --all
 Name                 State      Autostart 
-------------------------------------------
 datastore1(2)        active     yes       
 esx6.7               active     yes

virsh # vol-create-as datastore1(2) manualtest/manualtest.vmdk 100M --format vmdk
Vol manualtest/manualtest.vmdk created

virsh # vol-list datastore1(2)
 Name                 Path                                    
------------------------------------------------------------------------------
 manualtest/manualtest.vmdk [datastore1(2)] manualtest/manualtest.vmdk

3. Check vol-dumpxml and vol-info for this volume.

virsh # vol-dumpxml manualtest/manualtest.vmdk datastore1(2)
<volume type='file'>
  <name>manualtest/manualtest.vmdk</name>
  <key>6000c29c-c0b1-06e8-7f7f-69665cbc7a32</key>
  <source>
  </source>
  <capacity unit='bytes'>104857600</capacity>
  <allocation unit='bytes'>104857600</allocation>
  <target>
    <path>[datastore1(2)] manualtest/manualtest.vmdk</path>
    <format type='vmdk'/>
  </target>
</volume>

virsh # vol-info manualtest/manualtest.vmdk datastore1(2)
Name:           manualtest/manualtest.vmdk
Type:           file
Capacity:       100.00 MiB
Allocation:     100.00 MiB

The results is expected and move this bug to be verified.

Comment 11 errata-xmlrpc 2018-10-30 09:55:31 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, 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-2018:3113