nxsbi commented on issue #8767: URL: https://github.com/apache/cloudstack/issues/8767#issuecomment-1992619890
I believe I found the problem and the solution. Documenting below for others for future reference. Since my prior experience creating template revolved around CentOS/Rocky, I followed the steps shown in https://docs.cloudstack.apache.org/en/latest/adminguide/templates/_password.html (I had this URL saved from before) However, I determined that was not the right place for Ubuntu... Correct steps: - I started here: https://docs.cloudstack.apache.org/en/latest/adminguide/templates.html#system-preparation-for-linux - Follow the steps 1, 2 and 3 shown as Ubuntu - For Step 4,5,6 and 7 - Setup Cloud-init Integration ONLY. Do not follow the "Adding Password Management to Your Templates" or "Implementing a SSH-Key bash script". - @weizhouapache NOTE - the link on the page to Cloud-Init Integration (in step 4,5,6,7) is broken - Tried to Edit on GitHub but not confident enough to not break something else. Maybe you can review and fix the link - Correct link is: https://docs.cloudstack.apache.org/en/latest/adminguide/templates/_cloud_init.html#linux-with-cloud-init - Finalize the Template per Step 8, 9 and 10. I believe I was having issues before I had followed both - "Adding Password Management" and "Cloud-Init Integration". And somehow those were conflicting. NOTE 2 - If you are adding Password Management, one of the step is to add the "Specify the managed user" during Cloud Init Setup and create the /etc/cloud/cloud.cfg.d/80_user.cfg. In this step, I had to modify the below line. Reason was that in the instance when I tried to do sudo command, I always kept getting error about the \". Changing to the new line fixes this for me (only tested in Ubuntu 22.04 Server LTS.) Original ` sudo: [\"ALL=(ALL) ALL\"] # User permissions` New ` sudo: [ALL=(ALL) ALL] # User permissions` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org