Original Message:
Sent: Tue March 12, 2024 04:10 AM
From: Alexander Reichle-Schmehl
Subject: VIOS upgrade does not preserve config filesj
Hi!
Oh, do you use ansible on VIOS with oem_setup_env? Du you use it with other ansible modules than shell / cmd?
I'm asking the other day we had to change nameserver and ntp settings. Which was easily possible using an ansible template, but was more difficult on VIOS due to limitations of the padmin user, and we didn't found a way to call oem_setup_env for the them.
Our solution then was to deploying ssh keys to the root acount, and hope we don't have to do many other changes, as that's not how we would like to do it :(
Best regards,
Alexander
------------------------------
Alexander Reichle-Schmehl
Original Message:
Sent: Tue March 05, 2024 03:25 AM
From: Andrey Klyachkin
Subject: VIOS upgrade does not preserve config filesj
Regarding ssh keys, add them into your postupgrade script.
#!/bin/ksh
mkdir -p /home/padmin/.ssh
chown padmin:system /home/padmin/.ssh
chmod 0700 /home/padmin/.ssh
echo 'my-key' >/home/padmin/.ssh/authorized_keys
chown padmin:staff /home/padmin/.ssh/authorized_keys
chmod 0600 /home/padmin/.ssh/authorized_keys
or create another user with the PAdmin role. Because I have ansible user with PAdmin role, I could login as ansible user and then execute /usr/ios/cli/ioscli oem_setup_env to get into root environment and check the configuration ;-)
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Mon March 04, 2024 04:53 AM
From: Tommi Sihvo
Subject: VIOS upgrade does not preserve config filesj
Hello,
Following Jaqui's great guide on VIOS3.1 > 4.1 migration:
https://techchannel.com/SMB/12/2023/powervm-v4-upgrade
I have defined the files to be preserved:
cat /home/padmin/filestosave.txt
/etc/environment
/etc/group
/etc/hosts
/etc/inetd.conf
/etc/inittab
/etc/motd
/etc/netsvc.conf
/etc/passwd
/etc/profile
/etc/syslog.conf
/etc/security/limits
/etc/security/login.cfg
/etc/security/passwd
/etc/tunables/nextboot
/etc/ssh/sshd_config
/home/padmin/.profile
/home/padmin/filestosave.txt
/etc/ntp.conf
/etc/rc.tcpip
/home/padmin/config/ntp.conf
...and the migration itself goes just perfectly fine...butttt...the all the config files are wiped to default ones.
Actually I cannot even login as padmin, since ssh-keys are gone, and prompt complains that "Password expired too long" (Eventhough I actually changed it before starting the migration)
Anyone having any idea for root cause of this behaviour? Or is it by design (e.g should the original config files be restored somehow manually after the migration) ?
Br,
tommi
------------------------------
Tommi Sihvo, Lead Service Architect
Tietoevry, Compute Services
email tommi.sihvo@tietoevry.com mobile +358 (0)40 5180 Finland
------------------------------