Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Clouds > Google > Tutorials > Google Snapshots > Actions > Attach a Google Snapshot to an Instance

Attach a Google Snapshot to an Instance

Objective

Configure a server to use a Google snapshot to create a volume and attach it to an instance.

Table of Contents

Overview

When you attach a volume to an instance, what you're really doing is creating a volume from that snapshot and attaching the volume to the instance. Technically speaking, you cannot attach a snapshot to a running instance. If you want to attach an existing volume, see Attach a Google Volume to an Instance. The advantage of "attaching a snapshot" to an instance is that you don't have to worry about creating the volume in the correct availability zone. Instead, a volume will be created from the snapshot in the same availability zone as your instance. Another advantage is that by default, the created and attached volume will be deleted when the instance is terminated. If you were to attach an existing volume the old way (instead of attaching a snapshot) the volume would persist and not be deleted.  

There are two ways you can attach a Google Snapshot to an instance:

  1. Attach a Google Snapshot to a running instance
  2. Attach a Google Snapshot to a server at boot time

Steps

Attach a Google Snapshot to a running instance

Go to the Volume's tab of the running server. Click the Create/Attach Volume Now button.

  • Snapshot - Select the Snapshot that you want to attach to the running server instance.
  • Device name - Select the device name to which the created volume will be attached.  Click the "Override" box to specify a different value.
  • Volume size in GB - The size of the volume to be created from the snapshot.  By default, the size of the volume will match the size that's specified by the snapshot (e.g. 2 GB).  To create a larger volume, click the Override button and specify the desired size in GB. (e.g. 10)
  • Attachment options - A volume will be created from the snapshot and attached to the instance.  By default, the attached volume will be detached and deleted when the instance is terminated, so if you want this snapshot to also be attached on subsequent server launches, select the "Attach on boot" option.

 

  • Name - A short name that lets you recognize the Volume.
  • Description - Describe the purpose of the Volume and any other useful information. This is for documentation purposes only and does not affect behavior of the Volume. Best practices does suggest you fill it out though!
  • Datacenter / Zone - The Datacenter / Zone that you would like to place your Volume into. You can only attach a Volume to an Instance that is in the same Datacenter / Zone. Before creating a new Volume you may need to specify the Datacenter / Zone of the Instance that you want to attach the new Volume to. This is because once a Volume is created, it cannot be moved into a different Datacenter / Zone.
  • Snapshot - A Volume Snapshot that you would like to build a Volume from. You are not required to provide a snapshot if you wish to create an empty volume. Simply select the "none" option in order to create a blank Volume.
  • Attach to - Select a running server or instance to attach your new volume to. Make sure it is in the same datacenter / zone as the volume.
  • Size in GB - The size of the volume in gigabytes. If you are creating the Volume based on an existing snapshot, a minimum size will be displayed. Size restrictions vary depending on the Cloud infrastructure you are using. Depending on the cloud there may be implied rules on volume size when creating a new volume. As a general rule some clouds allow you to make it any size larger than the size of the Volume Snapshot, while other clouds restrict the Volume to the exact size of the Volume Snapshot.

Attach a Google Snapshot to a Server at boot time

Go to Clouds -> Google -> Snapshots and select the snapshot that you want to attach to a server at boot time. You can also attach a snapshot to a stopped server or "Next" server (of a running server) under the Volume's tab.

When you configure a server to attach a snapshot, a volume will be created and attached to the server the next time it is launched/relaunched. Click Create/Attach Volume on boot.

  • to Server: select the server you would like to attach the volume on boot.
  • as device: select the type of disk you would like to use as a volume to attach on boot.

Click Schedule to confirm your selections to attach your volume at the boot time of the selected server.

You must to post a comment.
Last modified
17:23, 23 May 2013

Tags

Classifications

This page has no classifications.

Announcements

None


© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.