Share via


Error regarding non-managed disks when attempting to create VMs

Question

Thursday, August 10, 2017 6:57 PM

Hello All,

 First of all, I am new to Azure and just started the trial a couple of weeks ago.   My goal is to create a test/dev Exchange 2016 environment, and so far I have been quite impressed with what Azure has to offer.

For this task, I'm using the steps listed at:

https://technet.microsoft.com/library/mt733070(v=exchg.160).aspx

...to create a VMs for a DC and for Exchange.

However, I can't get past the New-AzureRMVM command when attempting to create a VM, "adVM", which part of Phase 2 in the article.    This is what I get:

PS C:\Windows\system32> New-AzureRMVM -ResourceGroupName $rgName -Location $locName -VM $vm
New-AzureRMVM : Addition of a VM with managed disks to non-managed Availability Set or addition of a VM with blob
based disks to managed Availability Set is not supported. Please create an Availability Set with 'Aligned' SKU in
order to add a VM with managed disks to it.
ErrorCode: OperationNotAllowed
ErrorMessage: Addition of a VM with managed disks to non-managed Availability Set or addition of a VM with blob based
disks to managed Availability Set is not supported. Please create an Availability Set with 'Aligned' SKU in order to
add a VM with managed disks to it.
StatusCode: 409
ReasonPhrase: Conflict
OperationID : e023ff3a-4835-43a6-a51d-cdc33d9cd65d
At line:1 char:1

  • New-AzureRMVM -ResourceGroupName $rgName -Location $locName -VM $vm

    + CategoryInfo          : CloseError: (:) [New-AzureRmVM], ComputeCloudException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.NewAzureVMCommand

I checked the properties of the availability set that I'm using, and it does show Managed.   So I'm a bit stumped at this point.  I would greatly appreciate any pointers!

Thanks

Maurice

All replies (3)

Thursday, August 10, 2017 9:06 PM

Are you trying to create a managed VM or an unmanaged VM?

Do you have any other VMs in an availability set?

Just to clarify, how did you check the availability set is managed or unmanaged?

Here is the command to create a managed availability set:

New-azurermavailabilityset -ResourceGroupName “name of the resource group” -Name “name of the availability set” -Location "Location" -Sku Aligned  -PlatformUpdateDomainCount 5 -PlatformFaultDomainCount 2

-Sku aligned (to create a Managed Availability set)

-sku classic (to create an Unmanaged availability set)

If you didn’t use any SKU Azure automatically creates an unmanaged availability set.

If you want your VM to be part of an availability set, you need to create the availability set first or while you are creating your first VM in the set. If your VM will be using Managed Disks, the availability set must be created as a managed availability set.

For more information about creating and using availability sets, see Manage the availability of virtual machines.

Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.


Friday, August 11, 2017 12:16 PM

Hello vikranth, thank you for your reply.

I am not necessarily attempting to create either a managed or unmanaged availability set, I'm following the steps in the article that I mentioned just to get VM's setup for a test environment.

This is the command that the article shows for creating the availability set:

# Create an availability set for domain controller virtual machines 
New-AzureRMAvailabilitySet -Name dcAvailabilitySet 
-ResourceGroupName $rgName -Location $locNameSo it sounds like since there is no -sku parameter, this would end up being an unmanaged set.However, Get-AzureRMAvailabilitySet shows:Name                      : dcAvailabilitySet
Type                      : Microsoft.Compute/availabilitySets
Location                  : eastus
Managed                   : True
Sku                       : Aligned
Tags                      : {}
PlatformFaultDomainCount  : 2
PlatformUpdateDomainCount : 5
Statuses                  : []
VirtualMachinesReferences : []There are no VMs present as I'm not able to get past the step to create one, 
via the powershell commands listed in the article at 
https://technet.microsoft.com/library/mt733070(v=exchg.160).aspx

Maurice


Sunday, August 13, 2017 4:34 PM

To clarify, are you trying to create a managed VM or an unmanaged VM?

If you are trying to create an unmanaged VM, you can’t add an unmanaged VM to a managed availability set.

In my lab, I have created an availability set without SKU, by default an unmanaged availability set has created.

Try to create a new availability set with Aligned SKU and retry the operation.

Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.