Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1868594

Summary: [machines] 'Unattended' is not available for 'Local Install Media'
Product: Red Hat Enterprise Linux 8 Reporter: YunmingYang <yunyang>
Component: cockpit-appstreamAssignee: Katerina Koukiou <kkoukiou>
Status: CLOSED ERRATA QA Contact: YunmingYang <yunyang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.3CC: cfergeau, kkoukiou, leiwang, mpitt, skobyda, wshi, xchen, ymao
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.6   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: cockpit-appstream-255-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 13:42:00 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 YunmingYang 2020-08-13 08:37:44 UTC
Description of problem:
When creating a VM with 'Local Install Media' and 'Unattended', manual operations is still needed

Version-Release number of selected components (if applicable):
cockpit-machines-224.1-1.el8.noarch
libvirt-dbus-1.3.0-2.module+el8.3.0+6423+e4cb6418.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create a VM with selecting 'Local Install Media' as 'Operating System' and setting 'Unattended'

Actual results:
1. Manual operations are still needed, and the passwd is also not set.

Expected results: 
1. The vm can be unattended installed

Additional info:

Comment 1 Simon Kobyda 2020-08-13 12:49:49 UTC
Which operating system was specified for created VM?

Comment 2 YunmingYang 2020-08-13 15:11:51 UTC
It is fedora server 31.

Comment 3 Simon Kobyda 2020-08-17 12:53:35 UTC
Cockpit decides if the unattended installation is available by fetching the media source to libosinfo. What source file did you specify for Local Install Media? Where does the file come from?
Do you have to manually specify the OS to reproduce this bug, or is OS automatically detected?

Comment 8 Katerina Koukiou 2021-08-12 15:09:09 UTC
@Fabiano I see you had a discussion with Simon above about how --unattended can be used with ISO install media. 


I tried local ISO file and it fails to be used with the --unattended command. Can you please take a look? Tried both --cdrom and --location, with same results.

$  virt-install --connect qemu:///system --quiet \
                --name f34 --os-variant fedora34 \
                --memory 1024 --wait -1 --noautoconsole \
                --disk size=10,format=qcow2 --graphics vnc,listen=127.0.0.1 \
                --cdrom /home/kkoukiou/Downloads/Fedora-Server-netinst-aarch64-34-1.2.iso \
                --unattended profile=jeos,admin-password-file=/tmp/cockpit-machines-y2_l5blw-admin-password
ERROR    OS 'fedora34' media does not support unattended installation
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start f34
otherwise, please restart your installation.

Comment 9 Fabiano Fidêncio 2021-08-12 15:27:15 UTC
Just testing on Fedora34 with the following command line:
```
fidencio@quino ~ $ virt-install --location ~/Descargas/Fedora-Server-netinst-x86_64-34-1.2.iso --unattended profile=jeos,admin-password-file=vm_pwd 
```

And it simply works.


However, if I try to do the same with an ISO from a different architecture:
```
fidencio@quino ~ $ virt-install --location ~/Descargas/Fedora-Server-netinst-aarch64-34-1.2.iso --unattended profile=jeos,admin-password-file=vm_pwd 
Using default --name fedora34-2
Using fedora34 default --memory 2048
Using fedora34 default --disk size=20

Empezando la instalación...
ERROR    OS 'fedora34' media does not support unattended installation
```

So, it seems that the error you're facing is due to trying to use an aarch64 image on a x86_64 machine, which is something I didn't test at al  when doing the unattended installation work.

Does cockpit machines support such scenario, @kkoukiou?

Comment 10 Katerina Koukiou 2021-08-12 15:39:07 UTC
Thanks @Fidencio, reg the arch question, since it's out of the context of this BZ I will check independently and if we need that I will create I will make sure to create a new bugzilla for that.

Comment 11 Katerina Koukiou 2021-08-30 12:49:29 UTC
PR posted upstream: https://github.com/cockpit-project/cockpit-machines/pull/339

Comment 12 Martin Pitt 2021-09-10 09:41:36 UTC
As the above PR was not good enough, and the underlying virt-install mechanics need more work, https://github.com/cockpit-project/cockpit-machines/pull/363 disables unattended installation for local ISO installation media for now.

Comment 13 YunmingYang 2021-10-19 04:40:36 UTC
Pre-verified Versions:
libvirt-dbus-1.3.0-2.module+el8.6.0+12861+13975d62.x86_64
cockpit-machines-255-1.el8.noarch
cockpit-255-1.el8.x86_64

Pre-verified Steps:
1 Open "Create VM" dialog
2 Make sure "Installation type" is "Download OS"
3 Select "Installation type" to "Local install media (ISO image or distro install tree)"
4 Select "Installation type" to "URL (ISO image or distro install tree)"
5 Select "Installation type" to "Network boot (PXE)"

Pre-verified Results:
1 In step 2, there will be "Run unattended installation" option on the dialog
2 In step 3, there will be no "Run unattended installation" option on the dialog
3 In step 4, there will be no "Run unattended installation" option on the dialog
4 In step 5, there will be no "Run unattended installation" option on the dialog

According to the results, change ‘Verified’ status to ‘TESTED’.

Comment 16 YunmingYang 2021-10-21 10:04:11 UTC
Test Versions:
cockpit-machines-255-1.el8.noarch
cockpit-255-1.el8.x86_64
libvirt-dbus-1.3.0-2.module+el8.6.0+12861+13975d62.x86_64



Test Steps:
1 Open "Create VM" dialog
2 Make sure "Installation type" is "Download OS"
3 Select "Installation type" to "Local install media (ISO image or distro install tree)"
4 Select "Installation type" to "URL (ISO image or distro install tree)"
5 Select "Installation type" to "Network boot (PXE)"


Test Results:
1 In step 2, there will be "Run unattended installation" option on the dialog
2 In step 3, there will be no "Run unattended installation" option on the dialog
3 In step 4, there will be no "Run unattended installation" option on the dialog
4 In step 5, there will be no "Run unattended installation" option on the dialog

According to the results, move status to VERIFIED.

Comment 19 errata-xmlrpc 2022-05-10 13:42:00 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 (cockpit-appstream 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-2022:1806