Bug 1855020

Summary: [RFE]: Allow passing user name for the new user when doing unattended installation
Product: [Fedora] Fedora Reporter: Katerina Koukiou <kkoukiou>
Component: virt-managerAssignee: Fabiano FidĂȘncio <fidencio>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: berrange, crobinso, mpitt, philip.wyett
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-3.1.0-1.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-03 00:56:23 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 Katerina Koukiou 2020-07-08 16:35:14 UTC
Description of problem:

When creating a VM with `--unattended` option and  `--admin-password-file` it would make sense to allow passing the desired user name. Currently the user name is the current host user name as pointed out by the documentation but this behavior is very limiting and in our case (cockpit-machines) it is blocking privileged users to create user account on VMs.

So, in cockpit when the connected user has super user privileges we always run the script containing virt-install as root, which results on us not being able to set a non root user for the VM.

In other words, due to cockpit's internals combined with this auto fetching of the user name that virt-install is doing, Cockpit Machines will need to disable user account creation for unattended installations because it does not work as expected. 

Version-Release number of selected component (if applicable):
2.2.1

Comment 1 Fabiano FidĂȘncio 2020-07-08 16:42:49 UTC
Katerina,

This has been implemented some time ago, as part of https://github.com/virt-manager/virt-manager/commit/cdcec1fb03155c41958987faaa0073b756b10c6c, but there was no release since then.
The commit mentioned above introduces the `user-login` option. Would you mind to give it a try with git master and let us know whether it fits cockpit-machines needs?

Comment 2 Katerina Koukiou 2020-07-08 16:56:38 UTC
Fabiano it looks good, looking forward to next release then.

Comment 3 Fedora Update System 2020-09-15 21:52:05 UTC
FEDORA-2020-656e86b662 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-656e86b662

Comment 4 Fedora Update System 2020-09-15 21:52:14 UTC
FEDORA-2020-656e86b662 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-656e86b662

Comment 5 Fedora Update System 2020-09-16 18:57:39 UTC
FEDORA-2020-656e86b662 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-656e86b662`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-656e86b662

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

Comment 6 Fedora Update System 2020-10-01 01:20:40 UTC
FEDORA-2020-c30055ffe4 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-c30055ffe4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-c30055ffe4

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

Comment 7 Fedora Update System 2020-10-03 00:56:23 UTC
FEDORA-2020-c30055ffe4 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.