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 1445198 - virt-install cannot create a new image by source/volume path format
Summary: virt-install cannot create a new image by source/volume path format
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.4
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-25 08:56 UTC by zhoujunqin
Modified: 2017-08-01 21:04 UTC (History)
6 users (show)

Fixed In Version: virt-manager-1.4.1-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 21:04:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2072 0 normal SHIPPED_LIVE virt-manager bug fix and enhancement update 2017-08-01 18:36:34 UTC

Description zhoujunqin 2017-04-25 08:56:57 UTC
Description of problem:
virt-install cannot create a new image by source/volume path format

Version-Release number of selected component (if applicable):
virt-install-1.4.1-2.el7.noarch
libvirt-3.2.0-3.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Check --disk supporting option.
# virt-install --disk ?
--disk options:
  address.base
  address.bus
  address.controller
  address.cssid
  address.devno
  address.domain
  address.function
  address.iobase
  address.irq
  address.multifunction
  address.port
  address.reg
  address.slot
  address.ssid
  address.target
  address.type
  address.unit
  backing_format
  backing_store
  boot_order
  bus
  cache
  clearxml
  device
  discard
  driver_name
  driver_type
  error_policy
  format
  io
  path
  pool
  read_bytes_sec
  read_iops_sec
  readonly
  removable
  seclabel[0-9]*.label
  seclabel[0-9]*.model
  seclabel[0-9]*.relabel
  serial
  sgio
  shareable
  size
  source_host_name
  source_host_port
  source_host_socket
  source_host_transport
  source_name
  source_pool <-----
  source_protocol
  source_volume<-----
  sparse
  startup_policy
  target
  total_bytes_sec
  total_iops_sec
  vol
  write_bytes_sec
  write_iops_sec

2. Install a vm with a non-existing image.
# virsh pool-refresh default
Pool default refreshed

# virsh vol-list --pool default
 Name                 Path                                    
------------------------------------------------------------------------------
 rhel6.8.qcow2        /var/lib/libvirt/images/rhel6.8.qcow2   
 rhel6.9.qcow2        /var/lib/libvirt/images/rhel6.9.qcow2   
 rhel7.3.qcow2        /var/lib/libvirt/images/rhel7.3.qcow2   


# virt-install --name demo1 --memory 1024 --connect qemu:///system --disk source_pool=default,source_volume=demo1,size=10000000000 -l http://download.eng.pek2.redhat.com/pub/rhel/released/RHEL-6/6.9/Server/x86_64/os/
ERROR    Error: --disk source_pool=default,source_volume=demo1,size=10000000000: Device type 'disk' requires a path

Actual results:
1) Error message is not clear, in fact i have give a path.
2) virt-install cannot create a new image by source/volume.

Expected results:
Fix it.

Additional info:

Comment 2 Cole Robinson 2017-04-27 19:48:48 UTC
We should report a better error when storage vol lookup fails (like when passed a non-existent volume). I've fixed this upstream now:

commit 7a4acfcd0cd9fa300fbbc0551cd5c20000b8d583
Author: Cole Robinson <crobinso>
Date:   Thu Apr 27 15:44:46 2017 -0400

    devicedisk: Raise proper error on invalid source_volume (bz 1445198)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1445198


But otherwise I don't think we should bother trying to make source_pool/volume parameters work with storage creation, I don't really see the point

Comment 5 zhoujunqin 2017-05-05 06:55:50 UTC
Try to verify this bug with new package version:
virt-manager-1.4.1-3.el7.noarch
virt-manager-common-1.4.1-3.el7.noarch
virt-install-1.4.1-3.el7.noarch

Steps:
Try to install a with a non-existing image using source pool/volume disk path format.(Using default pool)

# virsh pool-refresh default
Pool default refreshed

# virsh vol-list --pool default
 Name                 Path                                    
------------------------------------------------------------------------------
 cachea.img           /var/lib/libvirt/images/cachea.img      
 myVm2raw.img         /var/lib/libvirt/images/myVm2raw.img    
 rhel6.9r.qcow2       /var/lib/libvirt/images/rhel6.9r.qcow2  
 rhel7.3-clone.qcow2  /var/lib/libvirt/images/rhel7.3-clone.qcow2
 rhel7.3.qcow2        /var/lib/libvirt/images/rhel7.3.qcow2   
 test.img             /var/lib/libvirt/images/test.img        
 test.qed             /var/lib/libvirt/images/test.qed        

# virt-install --name demo1 --memory 1024 --connect qemu:///system --disk source_pool=default,source_volume=demo1,size=10000000000 -l http://download.eng.pek2.redhat.com/pub/rhel/released/RHEL-6/6.9/Server/x86_64/os/
ERROR    Error: --disk source_pool=default,source_volume=demo1,size=10000000000: Storage volume not found: no storage vol with matching name 'demo1'

Also tested with non-existing pool:
# virt-install --name demo1 --memory 1024 --connect qemu:///system --disk source_pool=defaultttttttttttttt,source_volume=testztetst,size=10000000000 -l http://download.eng.pek2.redhat.com/pub/rhel/released/RHEL-6/6.9/Server/x86_64/os/
ERROR    Error: --disk source_pool=defaultttttttttttttt,source_volume=testztetst,size=10000000000: Storage pool not found: no storage pool with matching name 'defaultttttttttttttt'

Result:
When install a guest with a non-exiting volume/pool, installation failed with clear error to user, so move this bug from ON_QA to VERIFIED.

Comment 6 errata-xmlrpc 2017-08-01 21:04:33 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/RHBA-2017:2072


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