Categories
Tech

用 Azure CLI 在 Storage Accounts 之间迁移 VM

微软写了详细教程讲如何用 Azure Powershell 迁移 VM。然而,教程通篇只字不提 Azure CLI,这不是欺负 non-Windows Azure 用户么(

研究了下怎么用 Azure CLI 进行迁移,笔记一下。其他全部按照微软教程进行即可,替换 Powershell 命令为 Azure CLI 命令如下:

复制命令:

azure storage blob copy start --source-blob vm.vhd --dest-account-name destacct --dest-account-key destkey --dest-container deskvhds -a sourceacct -k sourcekey

查询复制状态:

azure storage blob copy show -a destacct -k destkey