Hello, As per this article <https://cloud.google.com/compute/docs/instance-templates/create-instance-templates#based-on-existing-instance> "--source-instance" flag to save the configuration of an existing virtual machine instance into an instance template. From your gcloud command line, it seems like you already used this flag but still the new instances created without the code from existing instance, In order move the case forward and figure out the root cause please provide the following information:
- Is there more than one disk on the machine? we need this information because, this manifests easily if code lives on a second disk, but the template is made only from the boot disk. - Can you create the template successfully via cloud console? Flow would be to 1) Make an image from the intended disk 2) make a new instance template from that image (once you create image you will see the image under "Custom images" ) 3) spin up instance using that template On Monday, September 10, 2018 at 10:16:33 PM UTC-4, Dx Dev wrote: > > hi, > > I am new to google cloud platform. i have already running my php web app > on single VM Instance. now i am trying to create a Autoscaling Groups for > this app. for that i have followed following steps: > > - create instance-template from my existing vm instance (the one which > have running php web app) > - then created instance group > - and finally create a load balancer. > > now when i check my Autoscaling Groups, it has created new instance but > without any code from my existing instance. new instance only create with > ubuntu OS but I thought it will copy all php code and install Apache web > server from my old instance as I created instance template for the old > instance with the help of following command: > > gcloud beta compute instance-templates create my-templates-instance > --source-instance=my-instance-1 --source-instance-zone=us-central1-c > > i don't know what i miss. please help me > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/c72e5e70-3a87-40e0-b3fe-9707d1fe3c6c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.