vagrant-azure icon indicating copy to clipboard operation
vagrant-azure copied to clipboard

Creating a VM with Standard SSD

Open jbeker opened this issue 6 years ago • 2 comments

Is it possible to create a VM with a Standard SSD for the OS Disk? I am building a test machine and I'd rather not pay for the speed I don't need. I had thought setting vm_storage_account_type to Standard_LRS would do this, however it appears it does not. I can confirm my config has registered the Standard_LRS for the storage account type:

==> local.food52staging.com:  -- Location: eastus2
==> local.food52staging.com:  -- Admin Username: vagrant
==> local.food52staging.com:  -- VM Name: dawn-cloud-94
==> local.food52staging.com:  -- VM Storage Account Type: Standard_LRS
==> local.food52staging.com:  -- VM Size: Standard_B2ms
==> local.food52staging.com:  -- Image URN: canonical:ubuntuserver:16.04.0-LTS:latest```

Any thoughts? Thanks!

jbeker avatar Dec 24 '18 13:12 jbeker

I have the same issue, hope it could be fixed, here is my output when starting:

==> default:  -- Location: japanwest                                       
==> default:  -- Admin Username: vagrant                                   
==> default:  -- VM Name: ssserver                                         
==> default:  -- VM Storage Account Type: Standard_LRS                     
==> default:  -- VM Size: Standard_B1s                                     
==> default:  -- Image URN: Canonical:UbuntuServer:18.04-LTS:latest        

wizicer avatar Jan 10 '19 01:01 wizicer

Seems to me that the issue is located in the virtual machine template: templates/arm/resources/virtual_machine.json.erb

As you can see from lines 52-61, the parameter (storage type) is only used when vhd_uri || vm_managed_image_id are defined. By placing the following lines outside the if-statement: "managedDisk": { "storageAccountType": "<%= storage_account_type %>" }, I think it will be solved. However, I am not a ruby developer and have no idea how to build/test it. I can't find any documentation on how to do this, if someone can help me get going on this. I will fix it...

stijnbrouwers avatar May 28 '19 14:05 stijnbrouwers