Hi @vipullag-MSFT ,
Thanks for your answer. Additionally, I found following answer very helpful:
"We started seeing corrupted RPM dbs with newer CentOS images, which can be detected and fixed following similar guidance as to here: https://www.tecmint.com/rebuild-corrupted-rpm-database-in-centos
In short: if you get errors printed out with rpm -qa > /dev/null
then it’s corrupt, and rpm -vv –rebuilddb
should fix it. You could try running the first command when making your custom image, both before and after a yum upgrade, and see if the upgrade command takes it from “not corrupt” to “corrupt”. If it does, the easiest fix will probably just be to include that rebuild step after the upgrade."
Thanks, Oscar