我的VM有一个基于blob的VHD。
根据您的描述,您的VM使用Azure blob,非托管磁盘创建。这样 不受管理的磁盘虚拟机的信息,有没有非托管的财产:
"osDisk": {
"caching": "ReadWrite",
"createOption": "fromImage",
"diskSizeGb": null,
"encryptionSettings": null,
"image": null,
"managedDisk": null,
"name": "jasonvm",
"osType": "Linux",
"vhd": {
"uri": "https://vmdisks909.blob.core.windows.net/vhds/jasonvm20170727093048.vhd"
}
}
所以我们可以使用这个脚本来显示VHD URI信息:
az vm show -g vm -n jasonvm --query "storageProfile.osDisk.vhd.uri" -o tsv
另外,如果你想复制这VHD到另一个Azure存储帐户,我们可以使用以下脚本:
# Copy blob from source account to destination account (destcontainer must exist)
az storage blob copy start \
--account-name destaccountname \
--account-key destaccountkey \
--destination-blob destfile.vhd \
--destination-container destcontainer \
--source-uri https://sourceaccountname.blob.core.windows.net/sourcecontainer/sourcefile.vhd
有关将blob复制到anot的更多信息她的容器请参考article。
是否要复制现有的虚拟机?这是一个非托管磁盘? –
这是正确的杰森。 –