Bug 2318461 - packaged virt-install permits --unattended and --cloud-init whereas upstream fails
Summary: packaged virt-install permits --unattended and --cloud-init whereas upstream ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 41
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-10-13 23:18 UTC by Emanuel Buholzer
Modified: 2024-12-15 02:27 UTC (History)
4 users (show)

Fixed In Version: virt-manager-5.0.0-1.fc41
Clone Of:
Environment:
Last Closed: 2024-12-15 02:27:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Emanuel Buholzer 2024-10-13 23:18:20 UTC
Mixing --unattended and --cloud-init should fail, as they cannot be used at the same time. For example, defining an admin password file with the unattended option always overrides the generated root password with the cloud-init option root-password-generate=on. With some OS the admin password needs to be set, when --unattended is set, hence the cloud-init option root-password-generate=on can never work

Locally installed package virt-install-4.1.0-5.fc40.noarch

Tested against upstream commit 31eab9b46a8c5787c45665b1fa651accf3e9110e

Reproducible: Always

Steps to Reproduce:
1. echo "root" > admin-pass
2. virt-install --debug --name domtest --install rocky9 --unattended profile=jeos,admin-password-file=admin-pass --cloud-init disable=on,root-password-generate=on
Actual Results:  
Regular installation proceeds, but root password is not generated.

Expected Results:  
[Mon, 14 Oct 2024 01:09:45 virt-install 8105] DEBUG (cli:256)   File "/home/emanuel/code/virt-manager/./virt-install", line 9, in <module>
    virtinstall.runcli()
  File "/home/emanuel/code/virt-manager/./virtinst/virtinstall.py", line 1236, in runcli
    sys.exit(main())
  File "/home/emanuel/code/virt-manager/./virtinst/virtinstall.py", line 1223, in main
    guest, installer = build_guest_instance(conn, options)
  File "/home/emanuel/code/virt-manager/./virtinst/virtinstall.py", line 652, in build_guest_instance
    installer = build_installer(options, guest, installdata)
  File "/home/emanuel/code/virt-manager/./virtinst/virtinstall.py", line 415, in build_installer
    cli.fail_conflicting("--unattended", "--cloud-init")
  File "/home/emanuel/code/virt-manager/./virtinst/cli.py", line 487, in fail_conflicting
    fail(msg)
  File "/home/emanuel/code/virt-manager/./virtinst/cli.py", line 256, in fail
    log.debug("".join(traceback.format_stack()))

[Mon, 14 Oct 2024 01:09:45 virt-install 8105] ERROR (cli:257) Cannot use --unattended and --cloud-init at the same time

Comment 1 Fedora Update System 2024-12-06 19:02:12 UTC
FEDORA-2024-eb0b085f84 (virt-manager-5.0.0-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-eb0b085f84

Comment 2 Fedora Update System 2024-12-07 07:25:35 UTC
FEDORA-2024-eb0b085f84 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-eb0b085f84`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-eb0b085f84

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2024-12-15 02:27:43 UTC
FEDORA-2024-eb0b085f84 (virt-manager-5.0.0-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


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