def create_gce_image(zone,<EOL>project,<EOL>instance_name,<EOL>name,<EOL>description):
disk_name = instance_name<EOL>try:<EOL><INDENT>down_gce(instance_name=instance_name, project=project, zone=zone)<EOL><DEDENT>except HttpError as e:<EOL><INDENT>if e.resp.status == <NUM_LIT>:<EOL><INDENT>log_yellow("<STR_LIT>".format(instance_name))<EOL><DEDENT>else:<EOL><INDENT>raise e<EOL><DEDENT><DEDENT>body = {<EOL>"<STR_LIT>": {},<EOL>"<STR_LIT:name>": name,<EOL>"<STR_LIT>": "<STR_LIT>".format(<EOL>project, zone, disk_name<EOL>),<EOL>"<STR_LIT:description>": description<EOL>}<EOL>compute = _get_gce_compute()<EOL>gce_wait_until_done(<EOL>compute.images().insert(project=project, body=body).execute()<EOL>)<EOL>return name<EOL>
Shuts down the instance and creates and image from the disk.

Assumes that the disk name is the same as the instance_name (this is the
default behavior for boot disks on GCE).