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 2144885 - virt-install-4.1.0-1 reports error "An install method must be specified"
Summary: virt-install-4.1.0-1 reports error "An install method must be specified"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: virt-manager
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jonathon Jongsma
QA Contact: Hongzhou Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-22 16:11 UTC by Xiaofeng Wang
Modified: 2023-05-09 08:44 UTC (History)
8 users (show)

Fixed In Version: virt-manager-4.1.0-2.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:39:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-140198 0 None None None 2022-11-22 16:33:10 UTC
Red Hat Product Errata RHBA-2023:2255 0 None None None 2023-05-09 07:39:31 UTC

Description Xiaofeng Wang 2022-11-22 16:11:10 UTC
Description of problem:
Run virt-install to create a VM with qcow2 file with command:

sudo virt-install --name=ostree-raw-7db03031-e247-4407-93c8-bd1a6eab6213-uefi --disk path=/var/lib/libvirt/images/ostree-raw-7db03031-e247-4407-93c8-bd1a6eab6213-uefi.qcow2,format=qcow2 --ram 3072 --vcpus 2 --network network=integration,mac=34:49:22:B0:83:31 --os-type linux --os-variant rhel9-unknown --boot uefi --nographics --noautoconsole --wait=-1 --noreboot

Command reports error:
ERROR
An install method must be specified
(--location URL, --cdrom CD/ISO, --pxe, --import, --boot hd|cdrom|...)

Did not have this issue on virt-install-4.0.0-1.el9.noarch on compose RHEL-9.2.0-20221120.2

Version-Release number of selected component (if applicable):
RHEL 9.2 compose RHEL-9.2.0-20221122.2
virt-install-4.1.0-1.el9.noarch

How reproducible:
Steps to Reproduce:
1. Deploy a openstack RHEL 9.2 VM and install virt-install
2. sudo virt-install --name=ostree-raw-7db03031-e247-4407-93c8-bd1a6eab6213-uefi --disk path=/var/lib/libvirt/images/ostree-raw-7db03031-e247-4407-93c8-bd1a6eab6213-uefi.qcow2,format=qcow2 --ram 3072 --vcpus 2 --network network=integration,mac=34:49:22:B0:83:31 --os-type linux --os-variant rhel9-unknown --boot uefi --nographics --noautoconsole --wait=-1 --noreboot

Actual results:
Failed to run with error:
ERROR
An install method must be specified
(--location URL, --cdrom CD/ISO, --pxe, --import, --boot hd|cdrom|...)

Expected results:
No error here

Additional info:

Comment 1 Hongzhou Liu 2022-11-23 02:04:30 UTC
(In reply to Xiaofeng Wang from comment #0)
> Description of problem:
> Run virt-install to create a VM with qcow2 file with command:
> 
> sudo virt-install
> --name=ostree-raw-7db03031-e247-4407-93c8-bd1a6eab6213-uefi --disk
> path=/var/lib/libvirt/images/ostree-raw-7db03031-e247-4407-93c8-bd1a6eab6213-
> uefi.qcow2,format=qcow2 --ram 3072 --vcpus 2 --network
> network=integration,mac=34:49:22:B0:83:31 --os-type linux --os-variant
> rhel9-unknown --boot uefi --nographics --noautoconsole --wait=-1 --noreboot

It seems like you are trying to import a guest with this image "/var/lib/libvirt/images/ostree-raw-7db03031-e247-4407-93c8-bd1a6eab6213-uefi.qcow2,format=qcow2" you might need add --import to your cmd. If not, I suggest you use --pxe and specify an installation source in your cmd.

Hope this bz2128413#c4 can help you.
 
> 
> Command reports error:
> ERROR
> An install method must be specified
> (--location URL, --cdrom CD/ISO, --pxe, --import, --boot hd|cdrom|...)
> 
> Did not have this issue on virt-install-4.0.0-1.el9.noarch on compose
> RHEL-9.2.0-20221120.2
> 
> Version-Release number of selected component (if applicable):
> RHEL 9.2 compose RHEL-9.2.0-20221122.2
> virt-install-4.1.0-1.el9.noarch
> 
> How reproducible:
> Steps to Reproduce:
> 1. Deploy a openstack RHEL 9.2 VM and install virt-install
> 2. sudo virt-install
> --name=ostree-raw-7db03031-e247-4407-93c8-bd1a6eab6213-uefi --disk
> path=/var/lib/libvirt/images/ostree-raw-7db03031-e247-4407-93c8-bd1a6eab6213-
> uefi.qcow2,format=qcow2 --ram 3072 --vcpus 2 --network
> network=integration,mac=34:49:22:B0:83:31 --os-type linux --os-variant
> rhel9-unknown --boot uefi --nographics --noautoconsole --wait=-1 --noreboot
> 
> Actual results:
> Failed to run with error:
> ERROR
> An install method must be specified
> (--location URL, --cdrom CD/ISO, --pxe, --import, --boot hd|cdrom|...)
> 
> Expected results:
> No error here
> 
> Additional info:

Comment 2 Xiaofeng Wang 2022-11-23 02:12:21 UTC
Thanks @hongzliu 

The issue is same issue does not exist on virt-install-4.0.0-1.el9.noarch on compose RHEL-9.2.0-20221120.2.
But it appears on virt-install-4.1.0-1.el9.noarch on compose RHEL-9.2.0-20221122.2.
Any changes caused this error? Thanks.

Comment 3 Hongzhou Liu 2022-11-23 02:31:23 UTC
I found something might cause this error:
https://github.com/virt-manager/virt-manager/commit/e94786c066696781a821f5a4bcef3c377e4bc5e5 :
"Anything passed to --boot should imply --install no_install=yes
in the absence of other --install options. This is historically
what we've done but we regressed in 4.1.0"

Comment 4 Jiri Kortus 2022-12-01 12:20:29 UTC
Hello,

I've hit the same problem in our automated test that uses --boot option to boot via UEFI HTTP boot, and then from local disk after the installation reboots, like this:
# virt-install --os-variant rhel9-unknown --arch x86_64  --boot hd,network,uefi,loader=/usr/share/edk2/ovmf/OVMF_CODE.secboot.fd,loader_ro=yes,loader_type=pflash,nvram_template=/usr/share/edk2/ovmf/OVMF_VARS.fd --name rtttest --memory 4096 --disk size=10 --network network=netboot,mac=00:11:22:33:44:55

It worked fine on RHEL-9.1, and I think using just --boot should be fine even according to the man page:
"--boot
       Syntax: --boot BOOTOPTS
       ...
       --boot can be specified in addition to other install options (such as --location, --cdrom, etc.) or  can  be
       specified  on  its  own."

So I think this indeed is a bug (regression) compared to the previous versions and should be fixed.

Thank you,
Jirka

Comment 5 Jonathon Jongsma 2022-12-01 17:36:04 UTC
(In reply to Hongzhou Liu from comment #3)
> I found something might cause this error:
> https://github.com/virt-manager/virt-manager/commit/
> e94786c066696781a821f5a4bcef3c377e4bc5e5 :
> "Anything passed to --boot should imply --install no_install=yes
> in the absence of other --install options. This is historically
> what we've done but we regressed in 4.1.0"

That commit was added after the 4.1.0 release so it was not included in this package. I made a scratch build that includes this patch: https://kojihub.stream.rdu2.redhat.com/koji/taskinfo?taskID=1642086.

Jiri Kortus or Xiaofeng Wang, if you have time to test, let me know if this fixes your issue.

Comment 7 Hongzhou Liu 2022-12-02 03:41:24 UTC
I have tried with this scratch build, the problem has been fixed:
# rpm -q virt-install
virt-install-4.1.0-2.el9_rc.2f90ae7b91.noarch

# virt-install  --disk path=/home/vm1.img,size=20 --memory 3072 --vcpus 2 --network network=integration,mac=34:49:22:B0:82:31 --os-variant rhel9-unknown --boot uefi --nographics --noautoconsole --wait=-1 --noreboot
Using default --name rhel9

Starting install...
Allocating 'vm1.img'                                                         |    0 B  00:00:00 ... 
Creating domain...                                                           |    0 B  00:00:00     
Domain creation completed.
You can restart your domain by running:
  virsh --connect qemu:///system start rhel9

Comment 8 Jonathon Jongsma 2022-12-02 16:16:23 UTC
Thanks. Posted package changes: https://gitlab.com/redhat/centos-stream/src/virt-manager/-/merge_requests/9

We need ITM set and then I can make a new build.

Comment 9 Jiri Kortus 2022-12-02 16:46:06 UTC
Thank you, Jonathon and Jongsma. The fixed build worked fine for me as well.

Comment 10 Hongzhou Liu 2022-12-05 02:55:24 UTC
(In reply to Jonathon Jongsma from comment #8)
> Thanks. Posted package changes:
> https://gitlab.com/redhat/centos-stream/src/virt-manager/-/merge_requests/9
> 
> We need ITM set and then I can make a new build.

Done

Comment 11 Jonathon Jongsma 2022-12-05 21:04:42 UTC
(In reply to Hongzhou Liu from comment #10)
> (In reply to Jonathon Jongsma from comment #8)
> > Thanks. Posted package changes:
> > https://gitlab.com/redhat/centos-stream/src/virt-manager/-/merge_requests/9
> > 
> > We need ITM set and then I can make a new build.
> 
> Done

It looks like you changed DTM, but not ITM. I took the liberty of setting ITM to the value you set for DTM. If this is wrong, please change.

Comment 12 Hongzhou Liu 2022-12-06 15:05:52 UTC
(In reply to Jonathon Jongsma from comment #11)
> (In reply to Hongzhou Liu from comment #10)
> > (In reply to Jonathon Jongsma from comment #8)
> > > Thanks. Posted package changes:
> > > https://gitlab.com/redhat/centos-stream/src/virt-manager/-/merge_requests/9
> > > 
> > > We need ITM set and then I can make a new build.
> > 
> > Done
> 
> It looks like you changed DTM, but not ITM. I took the liberty of setting
> ITM to the value you set for DTM. If this is wrong, please change.

Sorry for the mistake, Let us go with ITM 17, Thanks.

Comment 13 Hongzhou Liu 2022-12-06 15:13:15 UTC
Pre-verify this bug on latest RHEL9.2

Packages:
virt-install-4.1.0-2.el9.noarch

Run the command below to install a guest:
# virt-install  --disk path=/home/vm1.img,size=20 --memory 3072 --vcpus 2 --network network=integration,mac=34:49:22:B0:82:31 --os-variant rhel9-unknown --boot uefi --nographics --noautoconsole --wait=-1 --noreboot
Using default --name rhel9

Starting install...
Allocating 'vm1.img'                                                         |  36 MB  00:00:03 ... 
Creating domain...                                                           |    0 B  00:00:00     
Domain creation completed.
You can restart your domain by running:
  virsh --connect qemu:///system start rhel9

Result: the guest can install successfully

Based on this result, add verified:tested flag here

Comment 16 Hongzhou Liu 2022-12-07 01:54:15 UTC
verify this bug on latest RHEL9.2

Packages:
virt-install-4.1.0-2.el9.noarch

Run the command below to install a guest:
# virt-install  --disk path=/home/vm2.img,size=20 --memory 3072 --vcpus 2 --network network=integration,mac=02:68:b3:29:da:98 --os-variant rhel9-unknown --boot uefi --nographics --noautoconsole --wait=-1 --noreboot
Using default --name rhel9

Starting install...
Allocating 'vm2.img'                                                         |  36 MB  00:00:03 ... 
Creating domain...                                                           |    0 B  00:00:00     
Domain creation completed.
You can restart your domain by running:
  virsh --connect qemu:///system start rhel9

Result: the guest can install successfully

The result is as expected, so I change the status to Verified. Thanks

Comment 18 errata-xmlrpc 2023-05-09 07:39:17 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 (virt-manager bug fix and enhancement update), 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-2023:2255


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