Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1782799

Summary: "rhel7" hard-coded in virt-install command
Product: [oVirt] ovirt-ansible-collection Reporter: Yedidyah Bar David <didi>
Component: hosted-engine-setupAssignee: Evgeny Slutsky <eslutsky>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bugs, eslutsky, michal.skrivanek
Target Milestone: ovirt-4.4.0Keywords: Triaged
Target Release: 1.1.1Flags: sbonazzo: ovirt-4.4?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-ansible-hosted-engine-setup-1.1.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 20:03:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yedidyah Bar David 2019-12-12 11:13:54 UTC
Description of problem:

In tasks/bootstrap_local_vm/02_create_local_vm.yml, we have:

      - name: Create local VM
        command: >-
          virt-install -n {{ he_vm_name }}Local --os-variant rhel7 --virt-type kvm --memory {{ he_mem_size_MB }}

This currently works, but emits to the log:

        "  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'),)",

(we do not log the output cleanly, that's why the quoting etc. - it's only logged because we have '- debug: var=create_local_vm').

So:

1. We should rather soon change that, probably to "rhel7.0".

2. We should later on make this parametric, to allow building also for el8 and fedora.

Comment 6 Nikolai Sednev 2020-04-21 06:39:45 UTC
Tested on:
rhvm-4.4.0-0.33.master.el8ev.noarch
ovirt-ansible-hosted-engine-setup-1.1.2-1.el8ev.noarch
ovirt-hosted-engine-ha-2.4.2-1.el8ev.noarch
ovirt-hosted-engine-setup-2.4.4-1.el8ev.noarch
Linux 4.18.0-193.el8.x86_64 #1 SMP Fri Mar 27 14:35:58 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux release 8.2 (Ootpa)

alma04 ~]# cat /var/log/ovirt-hosted-engine-setup/* | grep virt-install
cat: '/var/log/ovirt-hosted-engine-setup/engine-logs-2020-04-20T13:49:13Z': Is a directory
cat: '/var/log/ovirt-hosted-engine-setup/engine-logs-2020-04-20T14:10:35Z': Is a directory
2020-04-20 16:26:14,231+0300 DEBUG otopi.ovirt_hosted_engine_setup.ansible_utils ansible_utils._process_output:103 create_local_vm: {'cmd': ['virt-install', '-n', 'HostedEngineLocal', '--os-variant', 'rhel8.0', '--virt-type', 'kvm', '--memory', '16384', '--vcpus', '4', '--network', 'network=default,mac=00:16:3e:7b:b8:53,model=virtio', '--disk', '/var/tmp/localvmp5ej9i31/images/d4945538-65e8-400f-bda9-0e95f36278e3/532a5b0a-d368-47de-a0b7-ce8fc24042a6', '--import', '--disk', 'path=/var/tmp/localvmp5ej9i31/seed.iso,device=cdrom', '--noautoconsole', '--rng', '/dev/random', '--graphics', 'vnc', '--video', 'vga', '--sound', 'none', '--controller', 'usb,model=none', '--memballoon', 'none', '--boot', 'hd,menu=off', '--clock', 'kvmclock_present=yes'], 'stdout': '\nStarting install...\nDomain creation completed.', 'stderr': '', 'rc': 0, 'start': '2020-04-20 16:26:06.839004', 'end': '2020-04-20 16:26:13.122436', 'delta': '0:00:06.283432', 'changed': True, 'stdout_lines': ['', 'Starting install...', 'Domain creation completed.'], 'stderr_lines': [], 'failed': False}
        "virt-install",

Moving to verified.

Comment 7 Sandro Bonazzola 2020-05-20 20:03:14 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.