LoginSignup
6
6

More than 5 years have passed since last update.

GCPでUbuntu 16.04 (xenial) LTSを起動する

Posted at

2016-04-21にxenial (Ubuntu 16.04)がついに出たので、記念カキコ。

重要なポイント

イメージのIDが /ubuntu-os-cloud/ubuntu-1604-xenial-v20160420c という表現なので、人に優しい設計です。これが、某IaaSのようにランダムなIDだと多くの人は困るわけです。

gcloud コマンド実行例

gcloud compute instances create "xenial" \
 --zone "asia-east1-a" --machine-type "n1-standard-1" \
 --network "default" --maintenance-policy "MIGRATE" \
 --scopes default="https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring.write","https://www.googleapis.com/auth/cloud.useraccounts.readonly" \
 --image "/ubuntu-os-cloud/ubuntu-1604-xenial-v20160420c" \
 --boot-disk-size "10" --boot-disk-type "pd-ssd" --boot-disk-device-name "xenial"

ここで --image "/ubuntu-os-cloud/ubuntu-1604-xenial-v20160420c" とあるように、IDから一目で種別とバージョンが分かるのは便利ですね。日付でバージョニングされているOSの場合は、その部分を変更していくだけで簡単に最新版のOSイメージの利用が可能になりますね。

6
6
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
6
6