# Create VM instance from a predefined machine image

**URL:** <https://forum.ansible.com/t/create-vm-instance-from-a-predefined-machine-image/37332>\
**Category:** Ansible Project\
**Tags:** gcp, galaxy-ng\
**Created:** [November 10, 2022, 3:49pm UTC](https://forum.ansible.com/t/create-vm-instance-from-a-predefined-machine-image/37332 "2022-11-10T15:49:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valio\_V](https://avatars.discourse-cdn.com/v4/letter/v/b3f665/32.png) [@Valio\_V](https://forum.ansible.com/u/Valio_V)\
**Post date:** [November 10, 2022, 3:49pm UTC](https://forum.ansible.com/t/create-vm-instance-from-a-predefined-machine-image/37332/1 "2022-11-10T15:49:04Z")

</div>

Hello,  
I am trying to create a VM instance from a predefined machine image using Ansible (ansible [core 2.13.5]) and [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).  
I went through the Ansible doc for Google.Cloud and especially the [gcp\_compute\_instance module](https://docs.ansible.com/ansible/latest/collections/google/cloud/gcp_compute_instance_module.html#ansible-collections-google-cloud-gcp-compute-instance-module) but could not find a way to do it.  
Can you please let me know if there is any way to achieve this?
