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 1162800 - Distro 'virtio26' does not exist in our dictionary
Summary: Distro 'virtio26' does not exist in our dictionary
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Giuseppe Scrivano
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-11 17:39 UTC by Jan Stancek
Modified: 2015-03-05 10:07 UTC (History)
9 users (show)

Fixed In Version: virt-manager-1.1.0-7.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 10:07:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0427 0 normal SHIPPED_LIVE virt-manager bug fix and enhancement update 2015-03-05 14:38:46 UTC

Description Jan Stancek 2014-11-11 17:39:13 UTC
Description of problem:
Beaker task /virt/install fails with compose RHEL-7.1-20141029.0 / virt-install-1.1.0-4.el7.noarch:

[Mon, 03 Nov 2014 09:36:54 virt-install 3730] DEBUG (cli:257)   File "/usr/share/virt-manager/virt-install", line 904, in <module>
    sys.exit(main())
  File "/usr/share/virt-manager/virt-install", line 889, in main
    guest = build_guest_instance(conn, options, parsermap)
  File "/usr/share/virt-manager/virt-install", line 496, in build_guest_instance
    options.distro_variant)
  File "/usr/share/virt-manager/virt-install", line 256, in set_install_media
    fail(_("Error validating install location: %s" % str(e)))
  File "/usr/share/virt-manager/virtinst/cli.py", line 257, in fail
    logging.debug("".join(traceback.format_stack()))

[Mon, 03 Nov 2014 09:36:54 virt-install 3730] ERROR (cli:258) Error validating install location: Distro 'virtio26' does not exist in our dictionary


GA distro
----------
# rpm -qa virt-install
virt-install-0.10.0-20.el7.noarch
# virt-install --os-variant list | grep virtio26
virtio26             : Generic 2.6.25 or later kernel with virtio

RHEL-7.1-20141029.0
---------------------
# rpm -qa virt-install
virt-install-1.1.0-4.el7.noarch
# virt-install --os-variant list
ERROR
...

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

How reproducible:
100%

Steps to Reproduce:
1. run /virt/install with compose RHEL-7.1-20141029.0

Actual results:
[Mon, 03 Nov 2014 09:36:54 virt-install 3730] ERROR (cli:258) Error validating install location: Distro 'virtio26' does not exist in our dictionary

Expected results:
guests are installed

Additional info:

Comment 2 Giuseppe Scrivano 2014-11-11 18:57:41 UTC
the support for "virtio26" was consciously dropped after we've started using libosinfo to read OS data.  It doesn't make much sense to have a generic entry like virtio26 (or generic24, generic26) when you can choose the correct distro.  We would like users to start doing that, so the correct information can be used instead of guessing what "generic" might mean.

Would it possible to you to feed the correct distro name to virt-install?

Comment 3 Jan Stancek 2014-11-11 19:57:46 UTC
I opened same BZ also for Beaker, as I'm not sure what's the best way forward here:
Bug 1159903 - /virt/install fails with: Distro 'virtio26' does not exist in our dictionary

(In reply to Giuseppe Scrivano from comment #2)
> the support for "virtio26" was consciously dropped after we've started using
> libosinfo to read OS data.  It doesn't make much sense to have a generic
> entry like virtio26 (or generic24, generic26) when you can choose the
> correct distro.  We would like users to start doing that, so the correct
> information can be used instead of guessing what "generic" might mean.
> 
> Would it possible to you to feed the correct distro name to virt-install?

This sounds like reimplementing the guessing part in automated test instead.
The test can be used to install any imported by beaker, so it would have to somehow guess os-variant, maybe based on location URL? I'm not sure how the guessing part worked before.

Looking at older man pages, it says "This parameter is optional".
Can we skip it? Are there any negatives of doing so?

Comment 4 Giuseppe Scrivano 2014-11-11 20:27:16 UTC
what are the possible options here? Couldn't you just hard-code rhel7 instead of virtio26?  Specifying the right os-variant will make sure to use sane default values, you can skip this option altogether but it is not suggested.

Comment 5 Jan Stancek 2014-11-11 20:58:08 UTC
(In reply to Giuseppe Scrivano from comment #4)
> what are the possible options here?
Based on my team's usage, host and guest can be any of RHEL5/6/7, but I assume there are people using it for Fedora distros too.

> Couldn't you just hard-code rhel7 instead of virtio26?

Assuming this os-variant is defined in older virt-install packages, I suppose it would be possible. Then it is the question of how sane default it is for guests other than rhel7.

Comment 6 Cole Robinson 2014-11-16 17:19:17 UTC
Beaker should be trying to enter as accurate an OS as possible, since there are more defaults besides virtio that we specify.

That said, we need to preserve cli compat with older virt-install above all else. I think we can just do something like:

diff --git a/virtinst/osdict.py b/virtinst/osdict.py
index 515eaf2..358dabd 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -66,6 +66,7 @@ _aliases = {
     "vista" : "winvista",
     "winxp64" : "winxp",
 
+    "virtio26": "fedora12",
     "linux" : "generic",
     "windows" : "winxp",
     "solaris" : "solaris10",

Since I think the only defaults fedora12 will impact is virtio net + block. Giuseppe, can you test and confirm?

Comment 7 Giuseppe Scrivano 2014-11-17 09:39:01 UTC
yes, I confirm that the patch ensures virtio is used when --os-variant=virtio26 is specified.

Cole, could you please push this patch upstream so I can backport it?

Comment 8 Cole Robinson 2014-11-17 15:24:19 UTC
commit 60e62e26761072475301729002150ceb0ba617fd
Author: Cole Robinson <crobinso>
Date:   Mon Nov 17 10:21:33 2014 -0500

    osdict: Add back compat 'virtio26' entry

Comment 12 CongDong 2014-11-19 09:34:22 UTC
I can reproduce this with 
virt-install-1.1.0-4.el7.noarch.rpm  virt-manager-common-1.1.0-4.el7.noarch.rpm
virt-manager-1.1.0-4.el7.noarch.rpm

Steps:
# virt-install  --name demo --memory 1024 --disk path=/var/lib/libvirt/images/demo.img,size=8 --network network=test --os-variant virtio26 --location=$RHEL-7.1-20141029.0_OS_tree
ERROR    Error validating install location: Distro 'virtio26' does not exist in our dictionary


Verify with 
virt-manager-1.1.0-7.el7.noarch

Steps:
# virt-install  --name demo --memory 1024 --disk path=/var/lib/libvirt/images/demo.img,size=8 --os-variant virtio26 --location=http://download.englab.nay.redhat.com/pub/rhel/rel-eng/RHEL-7.1-20141029.0/compose/Server/x86_64/os/ --network network=test

Starting install...
Retrieving file vmlinuz...                               | 9.6 MB     00:00 !!! 
Retrieving file initrd.img...                            |  72 MB     00:00 !!! 
Allocating 'demo.img'                                    | 8.0 GB     00:00     
Creating domain...                                       |    0 B     00:00     
Guest installation complete... restarting guest.

Guest install successfully.

As the result, move to VERIFIED.

Comment 14 errata-xmlrpc 2015-03-05 10:07:30 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://rhn.redhat.com/errata/RHBA-2015-0427.html


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