# NameError: global name 'VirtualMachineSizeTypes' is not defined

**URL:** <https://forum.ansible.com/t/nameerror-global-name-virtualmachinesizetypes-is-not-defined/25611>\
**Category:** Ansible Project\
**Tags:** azure, rhel, aws\
**Created:** [September 27, 2017, 2:10pm UTC](https://forum.ansible.com/t/nameerror-global-name-virtualmachinesizetypes-is-not-defined/25611 "2017-09-27T14:10:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krish\_Puvi1](https://avatars.discourse-cdn.com/v4/letter/k/6bbea6/32.png) [@Krish\_Puvi1](https://forum.ansible.com/u/Krish_Puvi1)\
**Post date:** [September 27, 2017, 2:10pm UTC](https://forum.ansible.com/t/nameerror-global-name-virtualmachinesizetypes-is-not-defined/25611/1 "2017-09-27T14:10:08Z")

</div>

Hi,

I’am trying to run a playbook from a Rhel server in AWS to deploy a Rhel instance in Azure. But, I’m getting the following error,

The full traceback is:  
Traceback (most recent call last):  
File “/tmp/ansible\_aD\_HJH/ansible\_module\_azure\_rm\_virtualmachine.py”, line 1309, in   
main()  
File “/tmp/ansible\_aD\_HJH/ansible\_module\_azure\_rm\_virtualmachine.py”, line 1306, in main  
AzureRMVirtualMachine()  
File “/tmp/ansible\_aD\_HJH/ansible\_module\_azure\_rm\_virtualmachine.py”, line 513, in **init**  
for key in VirtualMachineSizeTypes:  
NameError: global name ‘VirtualMachineSizeTypes’ is not defined

fatal: [localhost]: FAILED! =\> {  
“changed”: false,  
“failed”: true,

Anyone able to point me in the right direction to fix this problem please?

Thanks  
Krish
