# Azure create vm module - cant specify vm size compatible with premium storage (or other valid vm\_size values)

**URL:** <https://forum.ansible.com/t/azure-create-vm-module-cant-specify-vm-size-compatible-with-premium-storage-or-other-valid-vm-size-values/25106>\
**Category:** Ansible Project\
**Tags:** azure\
**Created:** [July 27, 2017, 8:38am UTC](https://forum.ansible.com/t/azure-create-vm-module-cant-specify-vm-size-compatible-with-premium-storage-or-other-valid-vm-size-values/25106 "2017-07-27T08:38:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andy\_Redhead](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@Andy\_Redhead](https://forum.ansible.com/u/Andy_Redhead)\
**Post date:** [July 27, 2017, 8:38am UTC](https://forum.ansible.com/t/azure-create-vm-module-cant-specify-vm-size-compatible-with-premium-storage-or-other-valid-vm-size-values/25106/1 "2017-07-27T08:38:42Z")

</div>

Hi,

I’m pretty new to Ansible and so far have spent only an afternoon with the Ansible Azure module - so it’s likely I’m being dim…

After a bit of trial and error I got a playbook together that can create a basic VM (along with the virtual networking gubbins to make it accessible etc.) - very cool, thanks to all who made that possible 🙂

One aspect that caught me by surprise was that I couldn’t specify a premium storage compatible VM size…

I’m using Ansible 2.3.1.0 and have Azure v2.0.0RC5 installed (running on an up-to-date MacBook Pro).

In the azure\_rm\_virtualmachine task, the create process works ok (so long as the storage account used for the VM is account\_type: Standard\_LRS) if a VM size is specified along the lines of:

vm\_size: Standard\_D3\_v2

Where I got problems was trying to use Premium\_LTS for the storage account and:

vm\_size: Standard\_F4s

Which resulted in the error message:

fatal: [localhost]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “value of vm\_size must be one of: Basic\_A0,Basic\_A1,Basic\_A2,Basic\_A3,Basic\_A4,Standard\_A0,Standard\_A1,Standard\_A10,Standard\_A11,Standard\_A2,Standard\_A3,Standard\_A4,Standard\_A5,Standard\_A6,Standard\_A7,Standard\_A8,Standard\_A9,Standard\_D1,Standard\_D11,Standard\_D11\_v2,Standard\_D12,Standard\_D12\_v2,Standard\_D13,Standard\_D13\_v2,Standard\_D14,Standard\_D14\_v2,Standard\_D15\_v2,Standard\_D1\_v2,Standard\_D2,Standard\_D2\_v2,Standard\_D3,Standard\_D3\_v2,Standard\_D4,Standard\_D4\_v2,Standard\_D5\_v2,Standard\_DS1,Standard\_DS11,Standard\_DS11\_v2,Standard\_DS12,Standard\_DS12\_v2,Standard\_DS13,Standard\_DS13\_v2,Standard\_DS14,Standard\_DS14\_v2,Standard\_DS15\_v2,Standard\_DS1\_v2,Standard\_DS2,Standard\_DS2\_v2,Standard\_DS3,Standard\_DS3\_v2,Standard\_DS4,Standard\_DS4\_v2,Standard\_DS5\_v2,Standard\_G1,Standard\_G2,Standard\_G3,Standard\_G4,Standard\_G5,Standard\_GS1,Standard\_GS2,Standard\_GS3,Standard\_GS4,Standard\_GS5, got: Standard\_F4s”}

Clearly Standard\_F4s is not in the permitted list… nor are any of the machines such as Standard\_DS3\_v2 (which I think would be a fairly common premium storage compatible general purpose box)

However, checking the list of valid VM sizes in the location I’m asking for the VM to be created in via the Azure CLI shows that Standard\_F4s is valid (as far as Azure is concerned):

azure vm sizes --location uksouth

…  
Standard\_DS14\_v2\_Promo  
Standard\_F1s  
Standard\_F2s  
Standard\_F4s  
Standard\_F8s  
Standard\_F16s  
Standard\_A1\_v2  
…

Is there something I’m doing wrong here or might there be a bug in the Azure module where the range of valid vm\_size values is overly restrictive?

Cheers, Andy
