4.7. 准备并导入基本 GCP 镜像

完成以下步骤,为 GCP 准备 Red Hat Enterprise Linux 9 镜像。

步骤

  1. 转换文件。上传到 GCP 的镜像必须是 raw 格式,并命名为 disk.raw

    $ qemu-img convert -f qcow2 ImageName.qcow2 -O raw disk.raw
  2. 压缩 raw 文件。上传到 GCP 的镜像必须被压缩。

    $ tar -Sczf ImageName.tar.gz disk.raw
  3. 将压缩镜像导入到之前创建的存储桶。

    $ gsutil cp ImageName.tar.gz gs://BucketName