question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Use PremiumLRS storage without a Storage Account.

See original GitHub issue

Describe the bug There is a bug that if you select

.WithLatestWindowsImage("MicrosoftWindowsServer", "WindowsServer", "2016-Datacenter")

then you can’t use

.WithOSDiskStorageAccountType(StorageAccountTypes.PremiumLRS)

The only way around it, is add to a storage account by doing this:

.WithNewStorageAccount(storageAccount)

However, if i change the .WithLatestWindowsImage("MicrosoftWindowsServer", "WindowsServer", "2016-Datacenter") to .WithPopularLinuxImage(KnownLinuxVirtualMachineImage.UbuntuServer14_04_Lts) then i don’t need to use a storage account and it works great!

Exception or Stack Trace N/A

To Reproduce Steps to reproduce the behavior:

Example in code snippet below.

Code Snippet Add the code snippet that causes the issue.

azure.VirtualMachines .Define(vmName) .WithRegion(location) .WithExistingResourceGroup(rgName) .WithExistingPrimaryNetworkInterface(networkInterface) .WithLatestWindowsImage("MicrosoftWindowsServer", "WindowsServer", "2016-Datacenter") .WithAdminUsername("azureuser") .WithAdminPassword("#####") .WithComputerName(vmName) .WithSize(vmSize) .WithOSDiskName(vmName + "-osdisk") .WithTag("Environment", "Dev") .WithOSDiskStorageAccountType(StorageAccountTypes.PremiumLRS) .WithOSDiskCaching(CachingTypes.ReadWrite) .WithOSDiskSizeInGB(128) .Create();

Expected behavior

To be able to use PremiumLRS storage without a Storage Account.

Screenshots If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: Windows
  • IDE : VS2017
  • Version of the Library used: latest

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
yaohaizhcommented, Sep 9, 2019

Will take a look

1reaction
kurtzeborncommented, May 24, 2019

Thank you for opening this issue! We are routing it to the appropriate team for follow up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I'm having a problem with Azure VM Premium_LRS data ...
This problem does *not* happen on machine sizes that only offer standard storage, only HDD storage, Standard_LRS (e.g. Standard_A4_v2). One ...
Read more >
Attaching premium disk to non-premium storage ARM VM ...
message: 'Storage account type Premium_LRS is not supported for VM ... use standard storage or use one of VM series with premium storage...
Read more >
I'm getting Error Message: Key based authentication is not ...
I have this command in a powerShell script $storageAccount = New-AzStorageAccount -ResourceGroupName $resourceGroup -Name ...
Read more >
Bicep: unable to set storage account to web app resource
The error in the code is that you are using a Premium_LRS sku and kind is storageV2 . So , it doesn't create...
Read more >
Storage account configuration discrepancy with provider vs ...
I'm receiving a similar issue while deploying a Storage Account with FileStorage and Infrastructure Encryption enabled as well using Terraform.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found