Azure Resource Manager: unable to attach existing VHD when creating VM from powershell / azure preview portal -


trying migrate vms azure service management azure resource manager, after having created new storage accounts , new vm configuration under arm, i'm not able deploy vms attached data disks based on migrated vhds..

note: deployment works w/o datadisks, fails datadisks attached

resourcegroupname        :   id                       :   name                     : n1n3-dc-1506  type                     :   location                 :   tags                     : null  availabilitysetreference : null  extensions               : null  hardwareprofile          : {                               "virtualmachinesize": "standard_a2"                             }  instanceview             : null  networkprofile           : {                               "networkinterfaces": [                                 {                                   "primary": true,                                   "referenceuri": "/subscriptions/b540a9de-cd22-4d3e-b302-fd57b053cc8e/resourcegroups/n1n3/providers/microsoft.network/networkinterfaces/n1n3-dc-1506-nic0"                                 }                               ]                             }  osprofile                : null  plan                     : null  provisioningstate        :   storageprofile           : {                               "datadisks": [                                 {                                   "disksizegb": 1000,                                   "lun": 0,                                   "caching": "readonly",                                   "createoption": "attach",                                   "name": "n1n3-dc-1506-data0.vhd",                                   "sourceimage": null,                                   "virtualharddisk": {                                     "uri": "https://n1n3dcstdlrs1506.blob.core.windows.net/vhds/n1n3-dc-1506-data0.vhd"                                   }                                 }                               ],                               "imagereference": null,                               "osdisk": {                                 "operatingsystemtype": "windows",                                 "caching": "readonly",                                 "createoption": "attach",                                 "name": "n1n3-dc-1506-os.vhd",                                 "sourceimage": null,                                 "virtualharddisk": {                                   "uri": "https://n1n3dcstdlrs1506.blob.core.windows.net/vhds/n1n3-dc-1506-os.vhd"                                 }                               },                               "sourceimage": null                             }

deployment status

endtime             : 19/06/2015 12:12:08 +02:00  error               : microsoft.azure.management.compute.models.apierror  output              :   starttime           : 19/06/2015 12:12:07 +02:00  status              : failed  trackingoperationid : f00aba57-e49d-4574-813a-2dc4803e6aa8  requestid           : 8fbfc336-05e4-47c4-a211-e2a9a5b40871  statuscode          : ok

note: deploying vms, , trying attach disks later fails anyway.

# vm  $dc2vm = get-azurevm -resourcegroupname $destresourcegroup -name $dcvmname  # add data disk   add-azurevmdatadisk –vm $dc2vm –name $($dcdstvmname + '-data0.vhd') –vhduri $('https://'+$dcdeststdstoragename+'.blob.core.windows.net/vhds/'+$($dcdstvmname + '-data0.vhd')) –lun 0 –caching readonly –disksizeingb 500 -createoption attach -verbose  # update vm state  update-azurevm -resourcegroupname $destresourcegroup -name $dcvmname –vm $dc2vm      update-azurevm : propertychangenotallowed: changing property 'datadisks' not allowed.  in riga:4 car:1  + update-azurevm -resourcegroupname $destresourcegroup -name $dcvmname –vm $dc2vm  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      + categoryinfo          : closeerror: (:) [update-azurevm], cloudexception      + fullyqualifiederrorid : microsoft.azure.commands.compute.updateazurevmcommand

any guess? many thanks, francesco

i had same error message, when used powershell script attach data disk during new-azurevm. issue datadisk had same uri osdisk, because used same variable accidentally.

you can use azure resource explorer check it: https://resources.azure.com

select vm under subscription/resourcegroups//providers/microsoft.compute/virtualmachines/ , under storageprofile.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -