Can't clone a VM instance from Google Developer Compute Console - google-compute-engine

I'm trying to clone an instance Centos based and in a load balancing pool. As soon as I click "create" I see the yellow baloon saying "creating instance...." but I don't see the task running in the Activities Windows and the message "creating instance..." freeze for ever.
So I tried creating the instance starting from a snapshot of the original instance but the result is the same. I'm not sure if something happened in the project or the problem is related to the fact the the instance is in a pool of the loadbalancer. Thank you.
This is the screenshot:

Related

AWS Beanstalk keeps changing the instance underneath

I have Node JS application running on AWS Beanstalk with load balance, I set the minimum instance number to 1 and max to 5.
The Node JS application executes some time consuming tasks that could take several hours.
Everything is working ok on my local environment but after deploying to Beanstalk, I notice Beanstalk is running ok at the beginning, but after 5-10 minutes, the instance seems be replaced with a clone.
E.g.: My Node JS task keeps writing to the log file to track the task progress, and at the beginning I can see the beanstalk log file contains the progress text and it keeps growing, but after 5 minutes, when I look at the log file again, the progress the task logged is gone. Then I downloaded the full log file and checked full log, the log file size is very small and only contains basic server start information. It looks like a newly started instance as even the instance is restarted, the previous log should still in the file.
It gives me a strong indication that the log file now I am looking at is not the same instance I was looking at before, and I suspect Beanstalk swap the instance that was running my task with a brand new but cloned instance. And even every code I deployed before is still there, but the task progress is gone. Therefore, the task is never able to fully completed.
Anyone has seen this before? And how to fix it?

how to manage google compute engine group of instances disk image?

We are trying to create a horizontaly Scalable web service via Google Compute Engine.
In order to do so, we have created an Instance Template and a Group of Instances based on this new template. The group of instances create a new virtual machine (we chose Debian) in which we can install our NodeJs application and other stuff.
We unlucky found out that when the VM is turned off everything inside the VM is erased. We would like to create a Snapshot or a Disk Image in order to avoid completely rebuild an instance from sketch, but we encountered two problems:
You can't create a Disk Image while the VM is running but if we turn it off we would lose all data in it.
It is possible to create a Snapshot of a VM while it is running but when you create a new instance from the Snapshot we can't link/join the new instance to the Group of Instances.
How can we get to the solution with those tools?
Thanks
Although it is recommended to shutdown your VM instance before creating an image, it is possible to create an image of a running system.
Connect to your instance (SSH, RDP, etc.)
Shutdown the applications that you can such as databases, etc. This purpose is to minimize disk activity and changes to the file system.
Sync the file system to disk. Linux sudo sync. Windows: Sysinternals wrote Sync which will help. Sysinternals's Sync
Go to the Google Console -> Compute Engine ->Disks.
Select your the disk drive for the VM instance.
At the top of the screen will be a button CREATE IMAGE.
Click the button and complete the dialog.
Make sure that you click the button Keep instance running (not recommended).
Once the image completes, I would launch a new instance and verify that you have everything and that everything is working as expected.
Note: You can also create a disk snapshot.

Can't RDP or ping GCE instance created from custom image

Newbie to GCE. I created an VM instance. I successfully RDP'd to the instance and successfully retrieved metadata. I then created an image from this instance. Then created a new instance from my image. But I can't ping or RDP into the new instance. I deleted everything and performed these steps again but still have the same problem.
This is a Windows instance. I know that Windows instances can take a while to start up. I tried for well over half an hour just in case.
Any ideas what might be wrong ?
Thanks,
Peter
I seem to have found the issue. The problem occurred when I ran the standard sysprep command (windows\system32\Sysprep\sysprep.exe) to ready my disk for image creation. Once I tried gcesysprep instead, it worked. I found this command down in the snapshot help (https://cloud.google.com/compute/docs/disks#create-snapshot-windows).

Openstack trove database instance status=error after creating a new instance

Recently I installed openstack trove using the automated script (devstack). After it is installed successfully and creating some user and projects, I manged to create a database instance and database inside it. unfortunately every database instance that I am going to build (via command line or horizon dashboard) trove gave me error status. Therefore when I tried to create database inside each of created database instance I stock with database instance is not ready.
I did some google and some people mentioned that I should check nova-compute.log, but unfortunately I did not find this log file. Would you please guide me?
Regards.
If you are running devstack it creates a screen session for all the services and it contains the logs. Try running "screen -x" to attach to the screen session and you can view the logs from there. Each window within the screen session is a separate service running.
If you had an issue creating an instance from trove it maybe because the image you are using is not setup correctly for trove because it needs the trove guest agent installed and a configuration for the guest agent baked in the image.
We have a repo that uses devstack to create a development trove installation that might be of use to test things out. This readme should help getting you started.
https://github.com/openstack/trove-integration/blob/master/README.md

Why does my custom beanstalk keep restarting?

I am trying to customize the default AMI of beanstalk, but everytime I get server restarts after some random time. I went so far as not to change anything, but nothing works.
I have tried the following:
find the instance of running beanstalk, create AMI, modify the AMI of beanstalk-crashing
create new instance with same AMI as on beanstalk, create AMI, modify configuration-crashing
I have tried both stopping the instance before creating AMI, and creating AMI of running instance.
Edit: I found the answer here: Can't generate a working customized EC2 AMI from Amazon Beanstalk sample appl
From personal experience, place the health status page to point to a dummy, static .html file. Although not recommended, this will prevent the health checks from restarting the machine and you could make more inside inspection.
AWS captures into the S3 logs only the ones output via java.util.logging. It means all console logging is not transferred.
That said, make sure you define an private key in your environment config, so you could ssh to it easily and see its output (it changes - for Tomcat 7, it is at /opt/tomcat7. For tomcat6, it is under /usr/share/tomcat6)
Just to add to what aldrinleal wrote (can't comment yet): In the past, I would often find a failed Healthcheck would also disable my site. By which I mean: If you have the health check on your actual app and that app threw an exception, you wouldn't actually get to see anything, the environment would just report a failed state. Only after I changed to a static file for the health check, did I manage to see the errors.
Now I obviously this is more a problem with a dev environment and you can always just pull the logs. But especially in the beginning as someone new to AWS/Beanstalk this helped me a lot.