官术网_书友最值得收藏!

How to create an image of a disk

Custom disk images are different from public images managed by Google. These are local to your project. They are useful for creating one or more instances when you have customized your instance in a certain way. For example, you could have installed updates, some applications, or could have set up some environment to work on and you would not want to repeat the procedure over again. Unlike snapshots, custom images are to be backed up once per instance only. We can create multiple images as variants, but they will be complete backups of the instance and will result in more billing due to access storage:

  1. To create the image, use the gcloud compute instance create command and provide an image name, source disk, the zone of the source disk, and the image family. The image family is an optional argument that specifies which OS we are using along with its version. In our case, it is Debian 9:
gcloud compute images create sda-image \
  --source-disk sda \ 
  --source-disk-zone us-east1-b \
  --family debian-9 
  1. For creating an image from another image, replace the source disk and source disk zone with the source image and source image project accordingly:
gcloud compute images create [IMAGE_NAME] \
  --source-image [SOURCE_IMAGE] \
  --source-image-project [IMAGE_PROJECT] \
  --family [IMAGE_FAMILY]
主站蜘蛛池模板: 琼结县| 邻水| 贞丰县| 内乡县| 大田县| 八宿县| 永清县| 永丰县| 康保县| 星子县| 河东区| 龙口市| 云龙县| 赞皇县| 土默特右旗| 阿合奇县| 阳朔县| 东乡族自治县| 贞丰县| 易门县| 临漳县| 高雄县| 保定市| 神木县| 贵港市| 新昌县| 莱阳市| 固原市| 威远县| 信阳市| 抚顺市| 教育| 当阳市| 昌都县| 阆中市| 永吉县| 岫岩| 邻水| 房产| 桃源县| 彰化市|