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 1714304 - virt-install --os-variant rhel7 causes stack trace
Summary: virt-install --os-variant rhel7 causes stack trace
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: virt-manager
Version: 8.0
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: 8.1
Assignee: Pavel Hrdina
QA Contact: zhoujunqin
URL:
Whiteboard:
: 1649820 1718828 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-27 15:38 UTC by Juan Orti
Modified: 2020-11-14 13:55 UTC (History)
8 users (show)

Fixed In Version: virt-manager-2.2.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 21:20:21 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:3464 0 None None None 2019-11-05 21:20:37 UTC

Description Juan Orti 2019-05-27 15:38:26 UTC
Description of problem:

Using virt-install --os-variant rhel7 causes a stack trace, but not --os-variant rhel8

# virt-install --name test1 --memory 512 --vcpus 1 --disk none --livecd --os-variant rhel7 --cdrom /var/lib/libvirt/images/rhel-server-7.6-x86_64-dvd.iso

--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.6/logging/handlers.py", line 71, in emit
    if self.shouldRollover(record):
  File "/usr/lib64/python3.6/logging/handlers.py", line 187, in shouldRollover
    msg = "%s\n" % self.format(record)
  File "/usr/lib64/python3.6/logging/__init__.py", line 840, in format
    return fmt.format(record)
  File "/usr/lib64/python3.6/logging/__init__.py", line 577, in format
    record.message = record.getMessage()
  File "/usr/lib64/python3.6/logging/__init__.py", line 338, in getMessage
    msg = msg % self.args
TypeError: not enough arguments for format string
Call stack:
  File "/usr/share/virt-manager/virt-install", line 955, in <module>
    sys.exit(main())
  File "/usr/share/virt-manager/virt-install", line 943, in main
    guest, installer = build_guest_instance(conn, options)
  File "/usr/share/virt-manager/virt-install", line 539, in build_guest_instance
    set_distro_variant(options, guest, installer)
  File "/usr/share/virt-manager/virt-install", line 317, in set_distro_variant
    guest.set_os_name(distro)
  File "/usr/share/virt-manager/virtinst/guest.py", line 261, in set_os_name
    obj = OSDB.lookup_os(name)
  File "/usr/share/virt-manager/virtinst/osdict.py", line 200, in lookup_os
    "This alias will be removed in the future."), (key, alias))
Message: "OS name '%s' is deprecated, using '%s' instead. This alias will be removed in the future."
Arguments: (('rhel7', 'rhel7.0'),)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.6/logging/__init__.py", line 994, in emit
    msg = self.format(record)
  File "/usr/lib64/python3.6/logging/__init__.py", line 840, in format
    return fmt.format(record)
  File "/usr/lib64/python3.6/logging/__init__.py", line 577, in format
    record.message = record.getMessage()
  File "/usr/lib64/python3.6/logging/__init__.py", line 338, in getMessage
    msg = msg % self.args
TypeError: not enough arguments for format string
Call stack:
  File "/usr/share/virt-manager/virt-install", line 955, in <module>
    sys.exit(main())
  File "/usr/share/virt-manager/virt-install", line 943, in main
    guest, installer = build_guest_instance(conn, options)
  File "/usr/share/virt-manager/virt-install", line 539, in build_guest_instance
    set_distro_variant(options, guest, installer)
  File "/usr/share/virt-manager/virt-install", line 317, in set_distro_variant
    guest.set_os_name(distro)
  File "/usr/share/virt-manager/virtinst/guest.py", line 261, in set_os_name
    obj = OSDB.lookup_os(name)
  File "/usr/share/virt-manager/virtinst/osdict.py", line 200, in lookup_os
    "This alias will be removed in the future."), (key, alias))
Message: "OS name '%s' is deprecated, using '%s' instead. This alias will be removed in the future."
Arguments: (('rhel7', 'rhel7.0'),)
WARNING  Unable to connect to graphical console: virt-viewer not installed. Please install the 'virt-viewer' package.
WARNING  No console to launch for the guest, defaulting to --wait -1

Starting install...
Domain installation still in progress. Waiting for installation to complete.



# virt-install --name test1 --memory 512 --vcpus 1 --disk none --livecd --os-variant rhel8 --cdrom /var/lib/libvirt/images/rhel-8.0-x86_64-dvd.iso
ERROR    Unknown OS name 'rhel8'. See `osinfo-query os` for valid values.


# osinfo-query os | grep rhel
 rhel-atomic-7.0      | Red Hat Enterprise Linux Atomic Host 7.0           | 7.0      | http://redhat.com/rhel-atomic/7.0       
 rhel-atomic-7.1      | Red Hat Enterprise Linux Atomic Host 7.1           | 7.1      | http://redhat.com/rhel-atomic/7.1       
 rhel-atomic-7.2      | Red Hat Enterprise Linux Atomic Host 7.2           | 7.2      | http://redhat.com/rhel-atomic/7.2       
 rhel-atomic-7.3      | Red Hat Enterprise Linux Atomic Host 7.3           | 7.3      | http://redhat.com/rhel-atomic/7.3       
 rhel-atomic-7.4      | Red Hat Enterprise Linux Atomic Host 7.4           | 7.4      | http://redhat.com/rhel-atomic/7.4       
 rhel2.1              | Red Hat Enterprise Linux 2.1                       | 2.1      | http://redhat.com/rhel/2.1              
 rhel2.1.1            | Red Hat Enterprise Linux 2.1 Update 1              | 2.1.1    | http://redhat.com/rhel/2.1.1            
 rhel2.1.2            | Red Hat Enterprise Linux 2.1 Update 2              | 2.1.2    | http://redhat.com/rhel/2.1.2            
 rhel2.1.3            | Red Hat Enterprise Linux 2.1 Update 3              | 2.1.3    | http://redhat.com/rhel/2.1.3            
 rhel2.1.4            | Red Hat Enterprise Linux 2.1 Update 4              | 2.1.4    | http://redhat.com/rhel/2.1.4            
 rhel2.1.5            | Red Hat Enterprise Linux 2.1 Update 5              | 2.1.5    | http://redhat.com/rhel/2.1.5            
 rhel2.1.6            | Red Hat Enterprise Linux 2.1 Update 6              | 2.1.6    | http://redhat.com/rhel/2.1.6            
 rhel2.1.7            | Red Hat Enterprise Linux 2.1 Update 7              | 2.1.7    | http://redhat.com/rhel/2.1.7            
 rhel3                | Red Hat Enterprise Linux 3                         | 3        | http://redhat.com/rhel/3                
 rhel3.1              | Red Hat Enterprise Linux 3 Update 1                | 3.1      | http://redhat.com/rhel/3.1              
 rhel3.2              | Red Hat Enterprise Linux 3 Update 2                | 3.2      | http://redhat.com/rhel/3.2              
 rhel3.3              | Red Hat Enterprise Linux 3 Update 3                | 3.3      | http://redhat.com/rhel/3.3              
 rhel3.4              | Red Hat Enterprise Linux 3 Update 4                | 3.4      | http://redhat.com/rhel/3.4              
 rhel3.5              | Red Hat Enterprise Linux 3 Update 5                | 3.5      | http://redhat.com/rhel/3.5              
 rhel3.6              | Red Hat Enterprise Linux 3 Update 6                | 3.6      | http://redhat.com/rhel/3.6              
 rhel3.7              | Red Hat Enterprise Linux 3 Update 7                | 3.7      | http://redhat.com/rhel/3.7              
 rhel3.8              | Red Hat Enterprise Linux 3 Update 8                | 3.8      | http://redhat.com/rhel/3.8              
 rhel3.9              | Red Hat Enterprise Linux 3 Update 9                | 3.9      | http://redhat.com/rhel/3.9              
 rhel4.0              | Red Hat Enterprise Linux 4.0                       | 4.0      | http://redhat.com/rhel/4.0              
 rhel4.1              | Red Hat Enterprise Linux 4.1                       | 4.1      | http://redhat.com/rhel/4.1              
 rhel4.2              | Red Hat Enterprise Linux 4.2                       | 4.2      | http://redhat.com/rhel/4.2              
 rhel4.3              | Red Hat Enterprise Linux 4.3                       | 4.3      | http://redhat.com/rhel/4.3              
 rhel4.4              | Red Hat Enterprise Linux 4.4                       | 4.4      | http://redhat.com/rhel/4.4              
 rhel4.5              | Red Hat Enterprise Linux 4.5                       | 4.5      | http://redhat.com/rhel/4.5              
 rhel4.6              | Red Hat Enterprise Linux 4.6                       | 4.6      | http://redhat.com/rhel/4.6              
 rhel4.7              | Red Hat Enterprise Linux 4.7                       | 4.7      | http://redhat.com/rhel/4.7              
 rhel4.8              | Red Hat Enterprise Linux 4.8                       | 4.8      | http://redhat.com/rhel/4.8              
 rhel4.9              | Red Hat Enterprise Linux 4.9                       | 4.9      | http://redhat.com/rhel/4.9              
 rhel5.0              | Red Hat Enterprise Linux 5.0                       | 5.0      | http://redhat.com/rhel/5.0              
 rhel5.1              | Red Hat Enterprise Linux 5.1                       | 5.1      | http://redhat.com/rhel/5.1              
 rhel5.10             | Red Hat Enterprise Linux 5.10                      | 5.10     | http://redhat.com/rhel/5.10             
 rhel5.11             | Red Hat Enterprise Linux 5.11                      | 5.11     | http://redhat.com/rhel/5.11             
 rhel5.2              | Red Hat Enterprise Linux 5.2                       | 5.2      | http://redhat.com/rhel/5.2              
 rhel5.3              | Red Hat Enterprise Linux 5.3                       | 5.3      | http://redhat.com/rhel/5.3              
 rhel5.4              | Red Hat Enterprise Linux 5.4                       | 5.4      | http://redhat.com/rhel/5.4              
 rhel5.5              | Red Hat Enterprise Linux 5.5                       | 5.5      | http://redhat.com/rhel/5.5              
 rhel5.6              | Red Hat Enterprise Linux 5.6                       | 5.6      | http://redhat.com/rhel/5.6              
 rhel5.7              | Red Hat Enterprise Linux 5.7                       | 5.7      | http://redhat.com/rhel/5.7              
 rhel5.8              | Red Hat Enterprise Linux 5.8                       | 5.8      | http://redhat.com/rhel/5.8              
 rhel5.9              | Red Hat Enterprise Linux 5.9                       | 5.9      | http://redhat.com/rhel/5.9              
 rhel6.0              | Red Hat Enterprise Linux 6.0                       | 6.0      | http://redhat.com/rhel/6.0              
 rhel6.1              | Red Hat Enterprise Linux 6.1                       | 6.1      | http://redhat.com/rhel/6.1              
 rhel6.10             | Red Hat Enterprise Linux 6.10                      | 6.10     | http://redhat.com/rhel/6.10             
 rhel6.2              | Red Hat Enterprise Linux 6.2                       | 6.2      | http://redhat.com/rhel/6.2              
 rhel6.3              | Red Hat Enterprise Linux 6.3                       | 6.3      | http://redhat.com/rhel/6.3              
 rhel6.4              | Red Hat Enterprise Linux 6.4                       | 6.4      | http://redhat.com/rhel/6.4              
 rhel6.5              | Red Hat Enterprise Linux 6.5                       | 6.5      | http://redhat.com/rhel/6.5              
 rhel6.6              | Red Hat Enterprise Linux 6.6                       | 6.6      | http://redhat.com/rhel/6.6              
 rhel6.7              | Red Hat Enterprise Linux 6.7                       | 6.7      | http://redhat.com/rhel/6.7              
 rhel6.8              | Red Hat Enterprise Linux 6.8                       | 6.8      | http://redhat.com/rhel/6.8              
 rhel6.9              | Red Hat Enterprise Linux 6.9                       | 6.9      | http://redhat.com/rhel/6.9              
 rhel7.0              | Red Hat Enterprise Linux 7.0                       | 7.0      | http://redhat.com/rhel/7.0              
 rhel7.1              | Red Hat Enterprise Linux 7.1                       | 7.1      | http://redhat.com/rhel/7.1              
 rhel7.2              | Red Hat Enterprise Linux 7.2                       | 7.2      | http://redhat.com/rhel/7.2              
 rhel7.3              | Red Hat Enterprise Linux 7.3                       | 7.3      | http://redhat.com/rhel/7.3              
 rhel7.4              | Red Hat Enterprise Linux 7.4                       | 7.4      | http://redhat.com/rhel/7.4              
 rhel7.5              | Red Hat Enterprise Linux 7.5                       | 7.5      | http://redhat.com/rhel/7.5              
 rhel7.6              | Red Hat Enterprise Linux 7.6                       | 7.6      | http://redhat.com/rhel/7.6              
 rhel8.0              | Red Hat Enterprise Linux 8.0                       | 8.0      | http://redhat.com/rhel/8.0              


Version-Release number of selected component (if applicable):

virt-install-2.0.0-5.el8.noarch
libosinfo-1.2.0-5.el8.x86_64

Comment 1 Pavel Hrdina 2019-05-27 16:28:00 UTC
Upstream commit:

commit 30b7c33c6ddc1d5572c11a63dd09abab7f0f6d5f
Author: Lukáš Doktor <ldoktor>
Date:   Wed Nov 14 15:58:43 2018 +0100

    virt-install: Fix guest-os deprecation msg

Comment 2 Pavel Hrdina 2019-05-31 14:31:30 UTC
*** Bug 1649820 has been marked as a duplicate of this bug. ***

Comment 3 Pavel Hrdina 2019-06-10 11:45:25 UTC
*** Bug 1718828 has been marked as a duplicate of this bug. ***

Comment 5 zhoujunqin 2019-07-22 07:51:14 UTC
I can reproduce it with build:
virt-manager-2.0.0-5.el8.noarch

Then try to verify this bug with new build:
virt-manager-2.2.1-1.el8.noarch
virt-install-2.2.1-1.el8.noarch
libvirt-4.5.0-24.module+el8.1.0+3205+41ff0a42.x86_64
qemu-kvm-2.12.0-77.module+el8.1.0+3382+49219945.x86_64
python3-libvirt-4.5.0-1.module+el8+2529+a9686a4d.x86_64
libosinfo-1.5.0-2.el8.x86_64


Steps:

1. Install a vm with option "--os-variant rhel7" 

# virt-install --name testvm --memory 1024 --vcpus 1  --location http://download.eng.pek2.redhat.com/pub/rhel/rel-eng/RHEL-7.7-20190716.0/compose/Server/x86_64/os/ --os-variant rhel7  --nodisk
WARNING  OS name 'rhel7' is deprecated, using 'rhel7.0' instead. This alias will be removed in the future.

Starting install...
Retrieving file vmlinuz...                                  | 6.4 MB  00:00     
Retrieving file initrd.img...                               |  55 MB  00:00     
...

Result: No causing stack trace, just a clear warning message shows to user, it's as expected.

Then installing a vm with "--os-variant rhel7.0" instead 

# virt-install --name testvm --memory 1024 --vcpus 1  --location http://download.eng.pek2.redhat.com/pub/rhel/rel-eng/RHEL-7.7-20190716.0/compose/Server/x86_64/os/ --os-variant rhel7.0  --nodisk

Starting install...
Retrieving file vmlinuz...                                  | 6.4 MB  00:00     
Retrieving file initrd.img...                               |  55 MB  00:01     

Installation starts successfully, so I move this bug from ON_QA to VERIFIED, thanks.

Comment 7 errata-xmlrpc 2019-11-05 21:20:21 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-2019:3464


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