Closed dcasota closed 5 months ago
In the ks file, for the password
setting, set age
to 0
. See https://github.com/vmware/photon-os-installer/blob/master/docs/ks_config.md , search for "password".
Thanks @oliverkurth!
As suggested, I modified ./photon-os-installer/examples/ova/minimal_ks.yaml
by adding "age" in section "password" like this
password:
crypted: false
text: changeme
"age": 0
and restarted create-image-util
. Success! A new vm from the fresh minimal.ova now asks to change the initial password. Boom - this has been accomplished in less than half an hour!
Here some other findings fyi
offline functionality: POI comes with a few python dependencies. I think it's doable to install python packages and dependencies offline, as well. Actually, the builder vm used went online to install them properly.
aarch64: create-image-util
in an aarch64 cross-compilation constellation has dependencies.
arch: aarch64
bootmode: efi
linux_flavor_aarch64: linux-esx
or linux_flavor_aarch64: linux
.
create-image-util
finishes with the following error when arch: aarch64 is specified, but bootmode not.
running /usr/bin/tdnf -j -y -c /mnt/photon-root/tdnf.conf --setopt reposdir=/mnt/photon-root --releasever 5.0 --installroot
/mnt/photon-root/photon-chroot --version
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/photon_installer/main.py", line 56, in main
installer.configure(install_config)
File "/usr/lib/python3.11/site-packages/photon_installer/installer.py", line 170, in configure
issue = self._check_install_config(install_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/photon_installer/installer.py", line 544, in _check_install_config
if install_config['arch'] == 'aarch64' and install_config['bootmode'] in ['dualboot', 'bios']:
~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'bootmode'
create-image-util
with a precheck if the repo specified is aarch64 and naming the ova as aarch64.ova helps to avoid culprits.Thank you for feedback, much appreciated!
password: crypted: false text: changeme "age": 0
No need for the quotes - the doc still uses json
format (I know, can be improved), in yaml
you can just do:
password:
crypted: false
text: changeme
age: 0
(you can still use the old json
format since json is just a subset of yaml
- but for humans, I prefer yaml
).
offline functionality: POI comes with a few python dependencies. I think it's doable to install python packages and dependencies offline, as well. Actually, the builder vm used went online to install them properly.
I am not understanding what you mean here. Can you elaborate? Not sure what you are referring to with "builder vm". In theory, once you have built the container image, everything can operate offline, if you give it a full repository, for example in a Photon ISO image.
create-image-util
finishes with the following error when arch: aarch64 is specified, but bootmode not.
Thanks, we can fix that. Note that for aarch64
only efi
boot is supported. But we should catch this error earlier, and give a better error message.
Sorry for the delay.
„builder vm“ is a simple understanding of a Photon OS vm on which the make-image-iso/ova/… process for a newer custom Photon OS release is handled. Very classic.
A new definition would be a Photon OS vm, on which mass exported/imported commits from Github are offline-replayed, or, predicted code/commits for new releases of vendor packages are auto-created and tested.
Through ML training, the Photon OS model learns writing spec files and the builder vm stores the validated, photonos’ified new vendor packages.
Most spec files have python requirements and replaying commits is in dependency to versions though. Actually there is no progress on this.
Is your feature request related to a problem? Please describe.
Created a minimal.ova with
./photon-os-installer/create-image-util --raw-image minimal.img --config-file minimal_ks.yaml --local-repo-path /mnt/local/root/photon-5.0-x86_64/ --poi-path ~/photon-os-installer/ --flavor ova --ova-config minimal.yaml --ova-name minimal
Provisioned a new vm with minimal.ova. The new vm didn't ask for changing the initial password. How can this be accomplished by the build process of ./create-image-util?
Describe the solution you'd like
difficult to say that change initial password should be an option and not mandatory.
Describe alternatives you've considered
No response
Additional context
btw. poi is nice!