Bug 1570593 - The auto-generated volume's name is incorrect if pool type is disk
Summary: The auto-generated volume's name is incorrect if pool type is disk
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: virt-manager
Version: ---
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-23 09:56 UTC by Xiaodai Wang
Modified: 2019-06-15 01:06 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-15 01:06:27 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)
virt-manager debug log (7.43 KB, text/plain)
2018-04-23 09:58 UTC, Xiaodai Wang
no flags Details

Description Xiaodai Wang 2018-04-23 09:56:47 UTC
Description of problem:
The auto-generated volume's name is incorrect if pool type is disk

Version-Release number of selected component (if applicable):
virt-manager-1.4.3-3.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. create a disk pool
2. Run below command and set '--disk pool=diskpool,size=0.5'.
virt-install --name test --memory 1024 --disk pool=diskpool,size=0.5  -l http://download.eng.pek2.redhat.com/pub/rhel/rel-eng/RHEL-7.5-20180221.0/compose/Server/x86_64/os/ --debug --check all=off

Actual results:
[Mon, 23 Apr 2018 17:49:09 virt-install 8100] DEBUG (storage:816) Creating storage volume 'test' with xml:
<volume>
  <name>test</name>
  <capacity>536870912</capacity>
  <allocation>0</allocation>
</volume>

[Mon, 23 Apr 2018 17:49:09 virt-install 8100] DEBUG (storage:847) Using vol create flags=0
[Mon, 23 Apr 2018 17:49:09 virt-install 8100] DEBUG (storage:857) Error creating storage volume
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtinst/storage.py", line 848, in install
    vol = self.pool.createXML(xml, createflags)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3185, in createXML
    if ret is None:raise libvirtError('virStorageVolCreateXML() failed', pool=self)
libvirtError: invalid argument: invalid partition name 'test', expected 'sdb1'

Expected results:
The guest should be installed successfully.

Additional info:

Comment 1 Xiaodai Wang 2018-04-23 09:58:44 UTC
Created attachment 1425627 [details]
virt-manager debug log

Comment 4 Cole Robinson 2019-06-15 01:06:27 UTC
Thanks for the report. Unfortunately trying to actually handle creating appropriately named and formatted storage volumes for every pool type is a giant pain in the butt. Especially a case like this where libvirt already knows what the correct answer is, but the XML parser forces us to specify a name, so there's presently no option to ask libvirt 'please just create the right volume and give us the correct name'.

In my experience very few people use libvirt to manage their disk partitions, and if they do it's just for enumerating existing partitions, not creating new ones. So while this is definitely a bug, in the absence of a report from an actual customer I think we should just defer this, it's not worth prioritizing. Closing as DEFERRED


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