google-compute-engine , how can I download a google compute engine image


how can I download a google compute engine image

Question:

Tag: google-compute-engine

How can I download a google compute engine image that was created from a snapshot of a persistent disk? There doesn't seem to be a direct way to do this through the console.


Answer:

There isn't a direct way to download a image or snapshot from GCE, but there's a way to save an image and store it in Google Cloud Storage(GCS) where it can be downloaded. You can use the standard gcimagebundle tool to do this.

You can also create this image using the dd command. On a temporary disk that’s bigger than the one you want to image, run this:

dd if=/dev/disk/by-id/google-diskname of=disk.img bs=5M

You can then run this command to copy it over to GCS:

gsutil cp disk.img gs://bucket/image.img

And later, you can:

gsutil cat gs://bucket/image.img | dd of=/dev/disk/by-id/google-newdisk bs=5M

This will allow you to make an image of your disk and then send it to GCS where you can download it using either the web interface or gsutil.


Related:


Creating a large click-to-deploy cassandra cluster


google-compute-engine
I have worked through a number of quota issues in trying to stand up a 30 node click-to-deploy cassandra cluster. The next issue is that the data disks are not becoming available within the 300 seconds allotted in wait-for-disk.sh. I've tried several times in us-central1-b, once in us-central1-a and the...

How to attach a service acount to an existing GCE VM?


google-compute-engine,google-cloud-dataflow
Need to submit dataflow job from an existing GCE VM in google cloud, learned that there has to be one service account with proper scope to be attached to that VM when the VM is created, what if VM already existed? how to attach a service account to an existing...

adaptive load balancing with gnu parallel


google-compute-engine,gnu-parallel
Is there some way to run gnu parallel with a dynamically changing list of remote hosts? The dynamism isn't intermittent or irregular -- I'm looking for a way to use the Google compute engine autoscaling feature to smoothly scale up to a max number of hosts and have gnu parallel...

Google Compute Engine Free Trial Account and Enable Billing


google-compute-engine
As I knew, The trial is free and you will not be billed. When your trial ends, your account will be paused and you'll have the option to upgrade to a paid account. But I have enabled billing in order to use Compute Engine's VM instance in my free trial...

How to add a disk to a Google Compute Engine instance with the gce_pd Ansible module?


google-compute-engine,ansible,ansible-playbook
I'm new to Ansible, but I have a working playbook that creates Google Compute Engine instances. I followed the Ansible section of Compute Engine Management with Puppet, Chef, Salt, and Ansible - Appendix to achieve this. Now I would like to extend the playbook to add extra persistent disks to...

How can I add/remove instances from GCE load balancers with Ansible?


google-compute-engine,ansible,google-cloud-platform
I see that there is a gce_lb Ansible module, but it is unclear to me whether or not I can actually use this to change the instances assigned to that LB or whether the module just creates and destroys LBs. In contrast, EC2 clearly has one module just for creating...

Issue with Wordpress Folders on Google Compute Engine


wordpress,file-permissions,google-compute-engine
I'm migrating a WordPress site to Google Cloud using Click To Deploy. All as gone well so far except a folder permissions problem when migrated the current sites wp-content folder. Steps I took to make this work... I set up a new WordPress install by using Click To Deploy and...

Relationship between HTTPS Healthchecks and an HTTPS connection to a GCE Instance


load-balancing,google-compute-engine
I'm setting up HTTPS Load Balancing (LB) on Google Compute Engine (GCE). Key components are outlined in the Overview Diagram. After successfully creating a HTTP Backend Service where 1 of 1 (GCE) instance is healthy, I decided to do the same for HTTPS. I'm using the Developer Console UI to...

what are the differences between Google compute engine and Google container engine?


google-compute-engine,google-container-engine
I was wondering what are the differences between Container Engine & Compute Engine? If I have a Jax~rs application on host which done by Groovy and Jetty, and planning to to migrate to Google cloud platform ,shoud I start for Google container or google compute?...

GCE: How to setup a private cloud (Firewall rules) with DynDns (No-Ip)?


google-compute-engine
I'm new to Google Compute Engine. I setup a VM to handle a private cloud: Only few IP address should have access to the server. According to the documentation to setup a private cloud I have to set firewall rules to restrict access to given IP Address. In the real...

Jclouds can't create instance


java,google-compute-engine,jclouds
I'm experiencing strange behavior during instance creation on Google Compute Engine. When I try to create and start ubuntu-1410-utopic instance all is working as expected but if I try to create instance ubuntu-1404-trusty I get exception: java.util.concurrent.ExecutionException: org.jclouds.http.HttpResponseException: command: POST https://www.googleapis.com/compute/v1/projects/myProjectName/zones/asia-east1-a/instances HTTP/1.1 failed with response: HTTP/1.1 400 BadRequest; content: [{...

Not able to telnet smtp server from google cloud vm


linux,smtp,google-compute-engine,mailgun
We have a account on mailGun. we can ping and telnet to smtp.mailgun.org port 25 from our local system. But when we use google cloud vm then ping smtp.mailgun.org is successfull, But telnet smtp.mailgun.org 25 stucks at trying... current firewall rules has 0.0.0.0/0 tcp:1-60000 entry in it. Iptables are off....

Set hostname for GCE instance - instead of IP address


networking,debian,godaddy,google-compute-engine,google-cloud-dns
I have a new GCE instance(Debian Wheezy), using Google based apps domain like: www.example.com I want to set a hostname for this server I have deployed a PHP webapp(Current URL: {IP}/appname) But, I want to use the hostname instead of IP and call the app URL. Eg. http://{servername}/appname I...

export variable in google cloud instance rhel7


java,linux,google-compute-engine,rhel7
I created an instance from the RHEL7 image. Installed java at /opt/jdk1.7 and edited /etc/enviroment to contain PATH=/opt/jdk1.7/bin:$PATH Now performed a reboot. Now when I try to login it allow to login using first part of email id then it ask for passpharse. Now I am login as xyz. Now...

Error installing php5-mcrypt


php,ubuntu,server,google-compute-engine,mcrypt
Just today I signed up with Google Cloud Compute Engine. I did everything but then I stuck into an error while installing php5-mcrypt extension. Error: [email protected]:~# sudo apt-get install php5-mcrypt Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean...

google compute engine tool gcloud is exceptionally slow


google-compute-engine,google-cloud-platform,att,gcloud
I tried downloading and using the gcloud bash tool to manage my accounts, however everything I do with the tool is exceptionally slow. It will take MINUTES to reply to a command that is typed. Is there perhaps a firewall I need to open up on my router or something...

VirtualBox and google cloud engine


virtualbox,google-compute-engine
Can I run Virtualbox and an active VM on a server hosted in google cloud engine? If yes, what are the steps? Just install it and build the VM through VNC? So far I have found similar solution for DigitalOcean where you simply install Virtualbox, xfce, VNC, etc. and it...

Cannot set maintenance policy on a instance template from the command line


google-compute-engine
I have tried to set in a new instances template the maintenance policy to "MIGRATE" and the automatic restart to "On" (as the Web Console does); but it ignores the flags. This is the command I am using: gcloud compute instance-templates create \ $TEMPLATE_NAME \ --boot-disk-size 50GB \ --image coreos-beta-681-0-0-v20150527...

Container Engine: AttributeError: 'module' object has no attribute 'Credentials'


google-compute-engine,gcloud,google-container-engine
I'm following the "hello wordpress" example: https://cloud.google.com/container-engine/docs/tutorials/hello-wordpress, but it stops with: [email protected]:~$ gcloud alpha container kubectl create -f wordpress.json Traceback (most recent call last): File "/usr/local/bin/../share/google/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 209, in <module> main() File "/usr/local/bin/../share/google/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 205, in main _cli.Execute() File...

What is the difference between an Instance and an Instance group


google-compute-engine,google-cloud-platform
I was wondering what the difference between an instance and an instance group are. Can anyone explain the difference to me? Why can we use Autoscaler with an instance group and not with a instance...

kubectl is not installed on GCE by default


google-compute-engine,google-container-engine
Following the guide I'm trying to manage Google Container Engine cluster from another machine on Google Compute Engine. Here is the output from my GCE instance: [email protected]:~$ sudo gcloud components update preview All components are up to date. [email protected]:~$ sudo gcloud components update alpha All components are up to date....

Start and stop GCE instances using bash or python script


python,bash,google-compute-engine
I have GCE instance setup and already being used. With some services setup and running. I need to be able to stop it and start it with bash or python scripts in a cron job as I won't it to be running only at specific times and days. Is this...

Does Google Compute Engine support HTTPS?


ssl,google-compute-engine,google-cloud-platform
I recently signed up for google compute engine and managed to get my web app setup etc. But Google says that adding SSL certificates is currently only available for Alpha users? https://cloud.google.com/compute/docs/load-balancing/http/ssl-certificates Does that mean GCE doesn't allow https or is there any other method, i can get https working?...

Permissions error while setting up kubernetes pod


debian,google-compute-engine,kubernetes
I am a newbie to kubernetes and docker and I am following the tutorial at https://cloud.google.com/container-engine/docs/tutorials/hello-wordpress which teaches how to setup a pod running wordpress. I have setup a GCE instance and have logged into my debian instance and installed docker and kubernetes. But when I specify a file to...

How to create VM instance in Google Compute Engine?


linux,ssh,virtual-machine,google-compute-engine
I am new to Google Compute Engine. I want to create a Web Server having following properties: 1 Core Red Hat Enterprise Linux 7.1 64 bit RAM 8 GB HDD: 100 GB SSH, JDK 1.7 Apache Web server as the proxy to Jboss App Server Enable HTTP / 80 and...

How does one use “gcloud compute operations list” with a filter by instance name?


google-compute-engine
The root problem is that I have a project that has many tens of thousands of operations, such that it's very difficult to track down operations associated with specific instances being created or deleted. So, I'm looking for a way to list operations by target. The deprecated gcutil docs talk...

How do I add a startup script to an existing VM from the developer console?


google-compute-engine,google-cloud-platform
I have an existing, already configured VM on Google Cloud Platform. It was created without a startup script, but I'd like to add one now. How do I add it from the console.developers.google.com web interface? ...

What is the best way to detect whether a java API call successfully completed or not


java,google-compute-engine
I'm using following code to add a target pool to Google compute engine in java using Google Compute Engine Java API. Operation operation = compute.targetPools().insert(PROJECT_ID, REGION_NAME, targetPool).execute(); I need to make sure that target pool is successfully added or not before execute the next line. What is the best way...

Retrieve project id from Google Compute Engine machine?


google-compute-engine,google-cloud-platform
I have two Google Cloud Platform projects (staging and production). I would like my application deployed on Google Compute Engine instance to automatically detected the project id. What is the way to do it?

Google Compute Engine Image to create a VM in a On Prem environment


google-compute-engine
We are in a situation in which we need replicate the Google CE environment we have set up to be replicated in a an OnPrem VM. Can we download and use a Google Compute Engine image to create a VM in a On Prem environment? If yes, could you please...

Receive UDP Packets on Google Compute Engine


java,networking,udp,port,google-compute-engine
my task is to receive UDP packets on an Google Compute Engine. Given is the port, which is 300 and I already have a simple Java program which can handle these UDP packets. My problem now. Get the UDP packets to my Java program. For that I don't know how...

Google Cloud - Moving MySQL DB Location to Attached Disk


mysql,google-compute-engine
I have a Google Cloud vm instance running and I set it up with an additional attached disk. I then installed mysql successfully but I can't seem to figure out how to move the MySQL db store location to the attached disk. Does anyone know how to do this? It...

SSL is breaking my htaccess file in WordPress


wordpress,apache,.htaccess,google-compute-engine
My .htacess file is vital not only for redirection but for the look of the site. I'm not sure why the developers of this theme did this but I can't change that. If you navigate to http://akcrossfit.com you'll see the site as it should be. When you navigate to https://akcrossfit.com...

Using Click to Deploy and install Jenkins in GCE


jenkins,google-compute-engine,bitnami
Using 'Click to Deploy', I already deployed LAMP stack. Now i want to use 'Click to deploy'and then deploy Jenkins in the same GCE instance(dont want another fresh GCE instance) Is there an option to use 'Click to deploy' for multiple tools or only once per GCE instance? What...

Starting and stopping instances on google compute engine


google-compute-engine,google-cloud-platform,jclouds
I want to start/resume and stop/suspend instances on google compute engine, but it gives "java.lang.UnsupportedOperationException".Is there any alternative way to perform these operations? public class Example { public static void main(String[] args) { String provider = "google-compute-engine"; String identity = "****@developer.gserviceaccount.com"; String credential = "path to private key"; String groupName...

Google Cloud Engine : LibSnappy not installed errur during command-line installation of Hadoop


hadoop,google-compute-engine,google-hadoop
I'm trying to install a custom Hadoop implementation (>2.0) on Google Compute Engine using the command line option. The modified parameters of my bdutil_env.sh file are as follows: GCE_IMAGE='ubuntu-14-04' GCE_MACHINE_TYPE='n1-standard-1' GCE_ZONE='us-central1-a' DEFAULT_FS='hdfs' HADOOP_TARBALL_URI='gs://<mybucket>/<my_hadoop_tar.gz>' The ./bdutil deploy fails with a exit code 1. I find the following errors in the resultant...

Is there a way to discover what image was used to create a VM instance


google-compute-engine
I'm experimenting with my 60 day trial by setting up a chain of VMs with different specs to allow me to upgrade a Vtiger installation from its very old code to current spec. As I've been create and delete happy I can't recall which image I used for a particular...

Cannot bind ports to my container in Google Container optimized VM


docker,google-compute-engine
I'm trying to run a docker container on Google Container-optimized VM in GCE. Here is my dockerfile. I built a container image and push it to gcr.io. FROM nginx:1.9 COPY config /etc/nginx And I wrote a container manifest file. version: v1beta2 containers: - name: test image: gcr.io/myproject/test ports: - name:...

How do I run a google appengine docker image on a compute engine instance?


python,google-app-engine,google-compute-engine
I have the following docker file: FROM gcr.io/google_appengine/python-compat MAINTAINER [email protected] RUN apt-get update RUN apt-get -y upgrade ADD ./app/ /app ADD app.yaml /app/ RUN mkdir -p /var/log/app_engine I create the log directory because otherwise I get the following error sudo docker run gcr.io/MY-PROJECT/ae-image Traceback (most recent call last): File "/home/vmagent/python_vm_runtime/vmboot.py",...

How can I automatically kill idle GCE instances based on CPU usage?


google-compute-engine
I'm running some slightly unreliable software on some instances in an instance group. The software is installed and run by a startup script, and most of the time it works without issue, but about ~10% of the new instances run out of memory and crash due to some sort of...

Auto boot up Compute engine


google-app-engine,google-compute-engine,google-cloud-platform
I want a compute engine to boot up at a particular time everyday, perform a task and then self shut down. I also have a Google App Engine continuously running, if that can be of any help!...

BigQuery bq command with asterisk (*) doesn't work in Compute Engine


google-bigquery,google-compute-engine,google-cloud-platform
I have a directory with a file named file1.txt And I run the command: bq query "SELECT * FROM [publicdata:samples.shakespeare] LIMIT 5" In my local machine it works fine but in Compute Engine I receive this error: Waiting on bqjob_r2aaecf624e10b8c5_0000014d0537316e_1 ... (0s) Current status: DONE BigQuery error in query operation:...

Error to create a disk in google compute (The resource '… diskTypes/{pd-ssd}' was not found


google-cloud-storage,google-compute-engine
I try to create a disk in Google Compute. This is the process and error: gcloud compute disks create test --type={pd-ssd} For the following disks: - [test] choose a zone: [1] asia-east1-a [2] asia-east1-c [3] asia-east1-b [4] europe-west1-c [5] europe-west1-b [6] europe-west1-d [7] us-central1-a [8] us-central1-b [9] us-central1-c [10] us-central1-f...

Google compute engine boot fails after hw upgrade to hashwell


centos,google-compute-engine
I have a f1-micro instance running on google compute engine running centos. Some time ago i got a mail stating that the zone i am using (us-central1-b) is going through a hardware upgrade to new hashwell servers, and all instances need to be restarted. So, i did restart. I shut...

Any suggestion for running Aerospike on Kubernetes on CoreOS on GCE?


docker,google-compute-engine,kubernetes,aerospike
I would like to run Aerospike cluster on Docker containers managed by Kubernetes on CoreOS on Google Compute Engine (GCE). But since GCE does not permit multicast, I have to use Mesh heartbeat as described here, which has to be set up by specifying all node's IP addresses and ports;...

When should you create more than one docker container image instance with Kubernetes Replication Controller?


docker,google-compute-engine,kubernetes
When using Kubernetes to manage your docker containers, particularly when using the replication controller, when should you increase an images running container instances to more than 1? I understand that Kubernetes can spawn as many container replicas as needed in the replication controller configuration file, but why spawn multiple running...

How To Create Google Compute Engine Instance Using Fog In Ruby


ruby,google-compute-engine,fog
I try with following code but i am getting error, server = connection.servers.create({ :name => "instance-#{Time.now}", :image_name => "debian-7-wheezy-v20150325", :machine_type => "f1-micro", :zone_name => "us-central1-a", }) /home/vijay/.rvm/gems/ruby-2.0.0-p598/gems/fog-core-1.30.0/lib/fog/core/attributes.rb:151:in `requires': disks is required for this operation (ArgumentError) from /home/vijay/.rvm/gems/ruby-2.0.0-p598/gems/fog-1.29.0/lib/fog/google/models/compute/server.rb:218:in `save' from...

Remove project from Google Developer Console


google-compute-engine
I have a project listed on my Google Developer Console that I have no idea how it got there. I can't seem to delete it because it said I'm not the owner of the project. There is also $9.91 listed in the charges section, will I be charged for it?...

How to know if a machine is an Google Compute Engine instance


google-compute-engine,google-cloud-platform
Is there a way to know from a command line shell if I am currently on a Google Compute Engine machine or somewhere else (development machine)?

docker run cannot find name flag argument


ssh,docker,google-compute-engine,google-container-engine
I have recently setup a Rstudio application on Google compute container engine using Docker and the Rocker/rstudio package. Now I want to start my saved container with a name using the following ssh command line: sudo docker -d -p 8787:8787 --name samplename user/laatste which returns the following error flag provided...