is the startup script supposed to take over 30 minutes to run the startup script. – "processing triggers for man-db" taking pretty pretty long time for the lab
If you are running a small vm (like an f1-micro), it will take a long time. You can ssh into the VM and run
ps aux | grep mandb to see if it is still running.
You can also remove "apt-get -yq upgrade" from the startup script to speed things up
You are right! I was so focused in make it work and follow it that also made me research and try different things because I did not want to get hints, etc
I realized because I thought it was not working, so did SSH to the VM to reproduce the steps manually and when tried to install a package apt-get was responding that was busy. Then it was easy to figure out a similar approach to yours and discover upgrades were still running. Another trick may be to add some lines into the script to output some texts to a log file to leave trace of the steps been executed.