按照这篇文章(http://blog.greatrexpectations.com/2013/04/24/using-blob-snapshots-to-backup-azure-virtual-machines/)我可以创建虚拟机的快照,但我现在想要将该快照还原到不同的 VM - 我们有时需要还原备份以恢复单个文件,我想确保在迁移到它们之前可以在 Azure 中执行此操作。
我试过了:
$restorePath = "vhds/my-new-vm.vhd"
$restoreBlob = $blobClient.GetBlobReference($restorePath)
$restoreBlob.CopyFromBlob($snapshots[$snapshots.Length -1])
但它给了我:
Exception calling "CopyFromBlob" with "1" argument(s): "There is currently
a lease on the blob and no lease ID was specified in the request."
我不知道如何获得租赁 ID,或者如何处理它。