Edit:
I originally thought OP was confused with how this feature works (which OP sort of is) but I see now that they want to specifically export the machine image which is made. This is not possible. The feature to export currently does not exist. [source]
I'll leave the original response which describes what you can do.
Original:
You are confusing two different things:
- Custom Images
- Machine Images
Custom images capture the contents of a single disk, for example, a boot disk, which can be used to create new instances that are preconfigured with the apps that you need, so that you don’t have to configure public images from scratch.
Machine images are a more comprehensive resource that can contain multiple disks, as well as all of the information required to capture and create a new instance, including:
- Instance properties (machine type, labels, volume mapping, network tags)
- Data of all attached disks (one or multiple)
- Instance metadata
- Permissions, including the service account used to create the instance
[source]
To create a Machine Image, you should do the following:
gcloud beta compute machine-images create MACHINE_IMAGE_NAME \
--source-instance SOURCE_INSTANCE_NAME
You can optionally add Machine Image Storage Location, otherwise:
By default, when creating a machine image from an instance, the machine image is stored in either the Cloud Storage multiregional bucket that contains the source instance, or the geographically closest Cloud Storage multiregional bucket to the source instance.