问题描述
试图从Azure的服务管理虚拟机迁移到Azure的资源管理器,ARM已经下创建新的存储帐户和新的虚拟机配置后,我不能够部署虚拟机与基于迁移附加的VHD磁盘的数据..
请注意:部署工作W / O datadisks,失败附加datadisks
ResourceGroupName:\r
ID :\r
名称:n1n3-DC-1506\r
类型:\r
位置 :\r
标签:空\r
AvailabilitySetReference:空\r
扩展:空\r
HardwareProfile:{\r
VirtualMachineSize:Standard_A2\r
}\r
InstanceView:空\r
NetworkProfile:{\r
NetworkInterfaces:[\r
{\r
主:真实,\r
ReferenceUri: \"/subscriptions/b540a9de-cd22-4d3e-b302-fd57b053cc8e/resourceGroups/N1N3/providers/Microsoft.Network/networkInterfaces/n1n3-dc-1506-NIC0\"\r
}\r
]\r
}\r
OSProfile:空\r
计划:空\r
ProvisioningState:\r
StorageProfile:{\r
DataDisks:[\r
{\r
DiskSizeGB:1000年,\r
论:0,\r
缓存:只读,\r
CreateOption:附加,\r
名:n1n3-DC-1506-data0.vhd\r
SourceImage:空,\r
VirtualHardDisk:{\r
开放的:https://n1n3dcstdlrs1506.blob.core.windows.net/vhds/n1n3-dc-1506-data0.vhd\r
}\r
}\r
]\r
ImageReference:空,\r
或osdisk:{\r
OperatingSystemType:窗口,\r
缓存:只读,\r
CreateOption:附加,\r
名:n1n3-DC-1506-os.vhd\r
SourceImage:空,\r
VirtualHardDisk:{\r
开放的:https://n1n3dcstdlrs1506.blob.core.windows.net/vhds/n1n3-dc-1506-os.vhd\r
}\r
},\r
SourceImage:空\r
}
\r
部署状态
结束时间:19/06/2015 12时12分08秒+02:00\r
错误:Microsoft.Azure.Management.Compute.Models.ApiError\r
输出:\r
开始时间:19/06/2015 12时12分07秒+02:00\r
状态:失败\r
TrackingOperationId:f00aba57-e49d-4574-813a-2dc4803e6aa8\r
请求ID:8fbfc336-05e4-47c4-A211-e2a9a5b40871\r
状态code:确定
\r
请注意:在部署虚拟机,并试图后来附加的磁盘反正失败
#获取VM\r
$ DC2vm = GET-AzureVM -ResourceGroupName $ destResourceGroup -Name $ DCvmName\r
#添加数据磁盘\r
附加AzureVMDataDisk -VM $ DC2vm杂牌$($ DCdstVMName +'-data0.vhd')-VhdUri $('HTTPS://'+$DCdestSTDStorageName+'.blob.core.windows.net/vhds/'+$( $ DCdstVMName +'-data0.vhd'))-lun 0 -Caching只读-DiskSizeinGB 500 -CreateOption附加-Verbose\r
#更新VM的状态\r
更新 - AzureVM -ResourceGroupName $ destResourceGroup杂牌$ DCvmName -VM $ DC2vm\r
\r
\r
更新-AzureVM:PropertyChangeNotAllowed:更改属性dataDisks'是不允许的。\r
里加:4车:1\r
+更新-AzureVM -ResourceGroupName $ destResourceGroup杂牌$ DCvmName -VM $ DC2vm\r
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r
+ CategoryInfo:CloseError:(:) [更新-AzureVM] CloudException\r
+ FullyQualifiedErrorId:Microsoft.Azure.Commands.Compute.UpdateAzureVMCommand
\r
任何的猜测?
非常感谢,
弗朗西斯
我有同样的错误信息,当我用PowerShell脚本中的New-AzureVM期间对数据磁盘连接。我的问题是,DATAdisk有相同的URI或osdisk,因为我用同一个变量意外。
您可以使用Azure的资源管理器来检查它:
选择在你的订阅/ resourceGroups //提供商VM / Microsoft.Compute / virtualMachines /
看看StorageProfile之下。
trying to migrate VMs from Azure Service Management to Azure Resource Manager, after having created new storage accounts and new vm configuration under ARM, I'm not able to deploy VMs WITH attached data disks based on migrated vhds..
Note: the deployment works w/o datadisks, fails with 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 the VMs, and trying to attach disks later fails anyway.
# Get the 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' is 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 the same error message, when I used PowerShell script to attach the data disk during the New-AzureVM. My issue was that the DATAdisk had the same uri as the OSdisk, because I used the same variable accidentally.
You can use Azure Resource explorer to check it:https://resources.azure.com
Select the VM under your subscription/resourceGroups//providers/Microsoft.Compute/virtualMachines/ and look under StorageProfile.
这篇关于Azure的资源管理器:无法从PowerShell中/蔚蓝preVIEW门户创建虚拟机时附加VHD存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!