# Ansible Azure -  azure\_rm\_image

**URL:** <https://forum.ansible.com/t/ansible-azure-azure-rm-image/31285>\
**Category:** Ansible Project\
**Tags:** azure\
**Created:** [September 16, 2019, 1:05pm UTC](https://forum.ansible.com/t/ansible-azure-azure-rm-image/31285 "2019-09-16T13:05:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucas\_Chies](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@Lucas\_Chies](https://forum.ansible.com/u/Lucas_Chies)\
**Post date:** [September 16, 2019, 1:05pm UTC](https://forum.ansible.com/t/ansible-azure-azure-rm-image/31285/1 "2019-09-16T13:05:38Z")

</div>

Hello team,  
I’m trying to use Ansible to create snapshot from my azure VMS.  
But every time that I use the azure\_rm\_image, return error.

ERROR! ‘azure\_rm\_image’ is not a valid attribute for a Play

Someone already use this?

Tks

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [September 16, 2019, 1:15pm UTC](https://forum.ansible.com/t/ansible-azure-azure-rm-image/31285/2 "2019-09-16T13:15:27Z")

</div>

> Hello team,  
> I'm trying to use Ansible to create snapshot from my azure VMS.  
> But every time that I use the azure\_rm\_image, return error.
> 
> ERROR! 'azure\_rm\_image' is not a valid attribute for a Play
> 
> Someone already use this?
> 
> Tks

Please post your playbook.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Lucas\_Chies](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@Lucas\_Chies](https://forum.ansible.com/u/Lucas_Chies)\
**Post date:** [September 16, 2019, 1:28pm UTC](https://forum.ansible.com/t/ansible-azure-azure-rm-image/31285/3 "2019-09-16T13:28:00Z")

</div>

Hi Stefan,

Follow the script

---

<div class="post-metadata">

**Author:** ![Lucas\_Chies](https://avatars.discourse-cdn.com/v4/letter/l/5e9695/32.png) [@Lucas\_Chies](https://forum.ansible.com/u/Lucas_Chies)\
**Post date:** [September 16, 2019, 1:28pm UTC](https://forum.ansible.com/t/ansible-azure-azure-rm-image/31285/4 "2019-09-16T13:28:32Z")

</div>

Hi Stefan, follow the script:

- name: Create an image from os disk via dict  
azure\_rm\_image:  
resource\_group: RG-xxx  
name: srvfgl-xxxx-snapshot  
source:  
type: disks  
resource\_group: RG-xxx  
name: srvfgl-xxxx\_OsDisk\_1\_3d894cd33a2d4dfeb6aed9c1261cb391

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [September 16, 2019, 8:19pm UTC](https://forum.ansible.com/t/ansible-azure-azure-rm-image/31285/5 "2019-09-16T20:19:49Z")

</div>

What version of ansible are you using?
