LoginSignup
9
10

More than 5 years have passed since last update.

GCPの他のプロジェクトからイメージを使う方法

Last updated at Posted at 2016-01-07

GCPの他のプロジェクトからイメージを使う方法

  • プロジェクト1でスナップショットからイメージを作成。
  • 作成したイメージからインスタンスをプロジェクト2で作成。

仕方

プロジェクト1でスナップショットからイメージを作成。

  • ブート可能なディスクを準備

「delete boot disk when deleting instance」をuncheckにして、インスタンスを削除してください。
qiita-1.png

  • 準備したディスクからイメージ作成

Source diskのところにさっき準備したディスクを選択し、Createボタンをクリックしてください。
qiita-2.png

  • 作成したイメージをプロジェクト2にインストールする
gcloud config set project <project-id-of-project-2>
gcloud config list
gcloud compute instances create <name-of-new-instance> \
 --image <name-of-your-image-from-project-1> \
 --image-project "<project-id-of-project-1"
9
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
10