Skip to content

incorrect warning "Since the VM is created using premium storage...." #3735

@axelgMS

Description

@axelgMS

Cmdlet(s)

New-AzureRMVM

PowerShell Version

Instructions: to get PowerShell version, type $PSVersionTable and look for the value associated with PSVersion
PSVersion 5.1.14393.953

Module Version

OS Version

Instructions: to get OS version, type $PSversionTable and look for value associated with BuildVersion
BuildVersion 10.0.14393.953

Description

Creating a new VM with Standard storage from an image stored in Standard Storage Account.
New-AzureRMVM incorrectly throws a warning about "Premium storage"

WARNING: Since the VM is created using premium storage, existing standard storage account, rg34915313diag932, is used for boot diagnostics.

Debug Output

Instructions: to get Debug Output, set $DebugPreference="Continue" and then execute the cmdlet or script causing the issue

PS C:> New-AzureRmVM -ResourceGroupName $rgName -Location $location -VM $vm -Verbose
WARNING: Since the VM is created using premium storage, existing standard storage account, rg34915313diag932, is used for boot diagnostics.
VERBOSE: Performing the operation "New" on target "vm-from-image".

RequestId IsSuccessStatusCode StatusCode ReasonPhrase


                     True         OK OK          

Script/Steps for Reproduction

Definition is here
457
458 Since the VM is created using premium storage, existing standard storage account, {0}, is used for boot diagnostics.
459 {0} = existing standard storage account name
460

Used here:
221 private string GetOrCreateStorageAccountForBootDiagnostics()
222 {
223 var storageAccountName = GetStorageAccountNameFromStorageProfile();
[…]
267 WriteWarning(string.Format(Properties.Resources.UsingExistingStorageAccountForBootDiagnostics, storageAccount.Name));
268 return storageAccount.PrimaryEndpoints.Blob;
269 }

And looks like it’s thrown when executing the New-AzureRMVM cmdlet and VM doesn’t have a DiagnosticsProfile - code

76 public override void ExecuteCmdlet()
77 {
78 base.ExecuteCmdlet();
79
80 if (this.VM.DiagnosticsProfile == null)
81 {
82 var storageUri = GetOrCreateStorageAccountForBootDiagnostics();

Metadata

Metadata

Labels

Compute - VMService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions