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 1366241 - Install guest failed when "-c URI" was specified
Summary: Install guest failed when "-c URI" was specified
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.3
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: 2016-08-11 11:10 UTC by Xiaodai Wang
Modified: 2017-08-01 21:02 UTC (History)
2 users (show)

Fixed In Version: virt-manager-1.4.1-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 21:02:03 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 Xiaodai Wang 2016-08-11 11:10:18 UTC
Description of problem:
Install guest failed when "-c URI" was specified

Version-Release number of selected component (if applicable):
virt-install-1.4.0-1.el7.noarch

How reproducible:
100%

Steps to Reproduce:

1. Check man page of virt-install by "man virt-install" and find "-c URI" is supported.

CONNECTING TO LIBVIRT
       -c URI
       --connect URI
           Connect to a non-default hypervisor. If this isn't specified, libvirt will try and choose the most suitable default.

2. Install a guest with "-c URI" and "--cdrom" option.

# virt-install --name test --memory 1024 -c qemu:///system --disk /var/lib/libvirt/images/test.img,size=3 --cdrom /tmp/testdir/ubuntu-15.10-server-amd64.iso --debug
[Thu, 11 Aug 2016 18:05:04 virt-install 6221] DEBUG (cli:258) Launched with command line: /usr/share/virt-manager/virt-install --name test --memory 1024 -c qemu:///system --disk /var/lib/libvirt/images/test.img,size=3 --cdrom /tmp/testdir/ubuntu-15.10-server-amd64.iso --debug
[Thu, 11 Aug 2016 18:05:04 virt-install 6221] DEBUG (cli:307)   File "/usr/share/virt-manager/virt-install", line 996, in <module>
    sys.exit(main())
  File "/usr/share/virt-manager/virt-install", line 968, in main
    check_cdrom_option_error(options)
  File "/usr/share/virt-manager/virt-install", line 85, in check_cdrom_option_error
    fail("Cannot specify both -c and --cdrom")
  File "/usr/share/virt-manager/virtinst/cli.py", line 307, in fail
    logging.debug("".join(traceback.format_stack()))

[Thu, 11 Aug 2016 18:05:04 virt-install 6221] ERROR (cli:308) Cannot specify both -c and --cdrom

3. Install a guest with "-c URI" and "--location".
# virt-install --name test --memory 1024 -c qemu:///system --disk /var/lib/libvirt/images/test.img,size=3 -l http://download.eng.pek2.redhat.com/pub/rhel/rel-eng/RHEL-7.3-20160729.1/compose/Server/x86_64/os/ --debug

[Thu, 11 Aug 2016 19:01:01 virt-install 8092] ERROR (cli:308) -c specified with what looks like a URI. Did you mean to use --connect? If not, use --cdrom instead

Actual results:
as steps.

Expected results:
The guest should be installed successfully if "-c URI" supported and The doc should be updated if not supported.

Additional info:

Comment 2 Pavel Hrdina 2017-01-18 08:51:25 UTC
Upstream commit:

commit 888fcf7aec832a8421e00abe9392aa22a7782a80
Author: Pavel Hrdina <phrdina>
Date:   Wed Jan 18 09:42:25 2017 +0100

    man/virt-install: remove -c as short for --connect

Comment 4 zhoujunqin 2017-03-15 09:09:39 UTC
I can reproduce this bug with package:
virt-manager-1.4.0-2.el7.noarch
virt-install-1.4.0-2.el7.noarch
virt-manager-common-1.4.0-2.el7.noarch

Then try to verify this bug with new build:
virt-manager-1.4.1-1.el7.noarch
virt-install-1.4.1-1.el7.noarch
virt-manager-common-1.4.1-1.el7.noarch
libvirt-3.1.0-2.el7.x86_64

Steps:
1. Check virt-install manual page.
1.1 remove -c as short for --connect
CONNECTING TO LIBVIRT
       --connect URI
           Connect to a non-default hypervisor. If this isn't specified, libvirt will try and choose the most suitable default.


1.2 add -c as short for --cdrom
INSTALLATION OPTIONS
       -c OPTIONS
       --cdrom OPTIONS
           File or device used as a virtual CD-ROM device.  It can be path to an ISO image, or to a CDROM device. It can also be a
           URL from which to fetch/access a minimal boot ISO image. The URLs take the same format as described for the "--location"
           argument. If a cdrom has been specified via the "--disk" option, and neither "--cdrom" nor any other install option is
           specified, the "--disk" cdrom is used as the install media.

2. Check virt-install command line:
2.1 
# virt-install --name test --memory 1024 -c qemu:///system --disk /var/lib/libvirt/images/test.img,size=3 --cdrom /root/Downloads/RHEL-6.8-20160414.0-Server-x86_64-dvd1.iso  
ERROR    Cannot specify both -c and --cdrom

2.2 
# virt-install --name test --memory 1024 -c qemu:///system --disk /var/lib/libvirt/images/test.img,size=3 -l http://download.eng.pek2.redhat.com/pub/rhel/rel-eng/RHEL-7.3-20160729.1/compose/Server/x86_64/os/ 
ERROR    -c specified with what looks like a URI. Did you mean to use --connect? If not, use --cdrom instead

Hi Pavel, i used "-c qemu:///system" in above 2 command, but with different combination with "--cdrom" and "-l", i'm not sure why get such different error prompt to user, thanks.

Comment 5 Pavel Hrdina 2017-03-21 14:30:04 UTC
(In reply to zhoujunqin from comment #4)
> I can reproduce this bug with package:
> virt-manager-1.4.0-2.el7.noarch
> virt-install-1.4.0-2.el7.noarch
> virt-manager-common-1.4.0-2.el7.noarch
> 
> Then try to verify this bug with new build:
> virt-manager-1.4.1-1.el7.noarch
> virt-install-1.4.1-1.el7.noarch
> virt-manager-common-1.4.1-1.el7.noarch
> libvirt-3.1.0-2.el7.x86_64
> 
> Steps:
> 1. Check virt-install manual page.
> 1.1 remove -c as short for --connect
> CONNECTING TO LIBVIRT
>        --connect URI
>            Connect to a non-default hypervisor. If this isn't specified,
> libvirt will try and choose the most suitable default.
> 
> 
> 1.2 add -c as short for --cdrom
> INSTALLATION OPTIONS
>        -c OPTIONS
>        --cdrom OPTIONS
>            File or device used as a virtual CD-ROM device.  It can be path
> to an ISO image, or to a CDROM device. It can also be a
>            URL from which to fetch/access a minimal boot ISO image. The URLs
> take the same format as described for the "--location"
>            argument. If a cdrom has been specified via the "--disk" option,
> and neither "--cdrom" nor any other install option is
>            specified, the "--disk" cdrom is used as the install media.
> 
> 2. Check virt-install command line:
> 2.1 
> # virt-install --name test --memory 1024 -c qemu:///system --disk
> /var/lib/libvirt/images/test.img,size=3 --cdrom
> /root/Downloads/RHEL-6.8-20160414.0-Server-x86_64-dvd1.iso  
> ERROR    Cannot specify both -c and --cdrom
> 
> 2.2 
> # virt-install --name test --memory 1024 -c qemu:///system --disk
> /var/lib/libvirt/images/test.img,size=3 -l
> http://download.eng.pek2.redhat.com/pub/rhel/rel-eng/RHEL-7.3-20160729.1/
> compose/Server/x86_64/os/ 
> ERROR    -c specified with what looks like a URI. Did you mean to use
> --connect? If not, use --cdrom instead
> 
> Hi Pavel, i used "-c qemu:///system" in above 2 command, but with different
> combination with "--cdrom" and "-l", i'm not sure why get such different
> error prompt to user, thanks.

I my opinion the error messages are correct.  If you specify -c and --cdrom you should use only one of them.  If you use -c instead of --connect it will suggest you to use --connect instead.  The error message is clear and explains the error perfectly so I don't see any issue with those error messages.

Comment 6 zhoujunqin 2017-03-22 02:56:26 UTC
(In reply to Pavel Hrdina from comment #5)
> (In reply to zhoujunqin from comment #4)
> > I can reproduce this bug with package:
> > virt-manager-1.4.0-2.el7.noarch
> > virt-install-1.4.0-2.el7.noarch
> > virt-manager-common-1.4.0-2.el7.noarch
> > 
> > Then try to verify this bug with new build:
> > virt-manager-1.4.1-1.el7.noarch
> > virt-install-1.4.1-1.el7.noarch
> > virt-manager-common-1.4.1-1.el7.noarch
> > libvirt-3.1.0-2.el7.x86_64
> > 
> > Steps:
> > 1. Check virt-install manual page.
> > 1.1 remove -c as short for --connect
> > CONNECTING TO LIBVIRT
> >        --connect URI
> >            Connect to a non-default hypervisor. If this isn't specified,
> > libvirt will try and choose the most suitable default.
> > 
> > 
> > 1.2 add -c as short for --cdrom
> > INSTALLATION OPTIONS
> >        -c OPTIONS
> >        --cdrom OPTIONS
> >            File or device used as a virtual CD-ROM device.  It can be path
> > to an ISO image, or to a CDROM device. It can also be a
> >            URL from which to fetch/access a minimal boot ISO image. The URLs
> > take the same format as described for the "--location"
> >            argument. If a cdrom has been specified via the "--disk" option,
> > and neither "--cdrom" nor any other install option is
> >            specified, the "--disk" cdrom is used as the install media.
> > 
> > 2. Check virt-install command line:
> > 2.1 
> > # virt-install --name test --memory 1024 -c qemu:///system --disk
> > /var/lib/libvirt/images/test.img,size=3 --cdrom
> > /root/Downloads/RHEL-6.8-20160414.0-Server-x86_64-dvd1.iso  
> > ERROR    Cannot specify both -c and --cdrom
> > 
> > 2.2 
> > # virt-install --name test --memory 1024 -c qemu:///system --disk
> > /var/lib/libvirt/images/test.img,size=3 -l
> > http://download.eng.pek2.redhat.com/pub/rhel/rel-eng/RHEL-7.3-20160729.1/
> > compose/Server/x86_64/os/ 
> > ERROR    -c specified with what looks like a URI. Did you mean to use
> > --connect? If not, use --cdrom instead
> > 
> > Hi Pavel, i used "-c qemu:///system" in above 2 command, but with different
> > combination with "--cdrom" and "-l", i'm not sure why get such different
> > error prompt to user, thanks.
> 
> I my opinion the error messages are correct.  If you specify -c and --cdrom
> you should use only one of them.  If you use -c instead of --connect it will
> suggest you to use --connect instead.  The error message is clear and
> explains the error perfectly so I don't see any issue with those error
> messages.

Hi pavel, thanks for your detail explanation, it makes more clear for me.
Since "-c" is short for "--cdrom" only, move this bug from ON_QA to VERIFIED.

Comment 7 errata-xmlrpc 2017-08-01 21:02:03 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.