Bug 2144885
| Summary: | virt-install-4.1.0-1 reports error "An install method must be specified" | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Xiaofeng Wang <xiaofwan> |
| Component: | virt-manager | Assignee: | Jonathon Jongsma <jjongsma> |
| virt-manager sub component: | Common | QA Contact: | Hongzhou Liu <hongzliu> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | unspecified | CC: | akoutsou, hongzliu, jikortus, juzhou, mhou, tyan, tzheng, virt-maint |
| Version: | 9.2 | Keywords: | Triaged |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | virt-manager-4.1.0-2.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-05-09 07:39:17 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Xiaofeng Wang
2022-11-22 16:11:10 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: 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. 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" 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
(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. 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 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. Thank you, Jonathon and Jongsma. The fixed build worked fine for me as well. (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 (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. (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. 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 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 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 |