Bug 1571759 - Create Volume on ESX local storage via virsh failed while use new libvirt
Summary: Create Volume on ESX local storage via virsh failed while use new libvirt
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Meina Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-25 11:36 UTC by liangz
Modified: 2018-10-30 09:57 UTC (History)
8 users (show)

Fixed In Version: libvirt-4.5.0-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 09:55:31 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3113 None None None 2018-10-30 09:57:51 UTC

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@datto.com>
AuthorDate: Mon May 23 17:31:57 2016 -0400
Commit:     Michal Privoznik <mprivozn@redhat.com>
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


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