2016-10-02 5 views
0

모든 Azure VM을 제거 했으므로 이제 고전적인 저장소 계정에서 vhds 컨테이너 저장소 BLOB를 제거하려고합니다. 그것은 나에게 오류를 제공합니다VM이 없어도 저장소 BLOB를 삭제할 수 없습니다.

이 블롭에 임대가 현재 어떠한 임대 ID가 나는이 오류 언급 기사를 발견했다

요청에 지정되지 : https://blogs.technet.microsoft.com/thbrown/2015/04/04/there-is-currently-a-lease-on-the-blob-and-no-lease-id/

것은 그것은 제안을 VM을 제거합니다. 나는 미리 가지고있다. VM을 먼저 삭제하여 이미지를 분리 할 수 ​​없으므로 엉망이 되었습니까? 이거 버그 야?

+0

이 질문에 대한 답변은 이미되었습니다. 거기에 내 대답은 클래식 및 ARM 기반 스토리지 모두와 관련된 디스크를 제거하는 방법을 보여줍니다. –

답변

0

다음 명령을 PowerShell로 임대를 중단 할 수 있습니다

Get-AzureRmStorageAccount -Name 'mystorageaccountname' | Get-AzureStorageBlob -name 'mycontainername').ICloudBlob.BreakLease() 
0

이 고전 VM의 알려진 문제입니다 : https://github.com/Azure/azure-sdk-tools-samples/blob/master/solutions/data-management/Remove-BlobsFromAllContainers.ps1 나이 :이 같은 것을 사용할 수,

#Define the storage account and context. 
$StorageAccountName = "yourstorageaccount" 
$StorageAccountKey = "Storage key for yourstorageaccount ends with ==" 
$ContainerName = "containername" 
$Ctx = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey 

#Get a reference to all the blobs in the container. 
$blobs = Get-AzureStorageBlob -Container $ContainerName -Context $Ctx 

#Delete blobs in a specified container. 
$blobs| Remove-AzureStorageBlob 

또는 :이 같은 뭔가를 시도 할 수 있습니다. 다음 방법은 나를 위해 일한 :

  1. 은 푸른 클래식 포털에서 삭제하려는 디스크 리소스를 선택한 다음 디스크
  2. 클릭 가상 머신로 이동합니다 ( 칼럼에 첨부가되어야한다 삭제 빈)
  3. 을 클릭 한 다음 연결된 VHD를 삭제

편집 :디스크 자원을 삭제하십시오. 임대를 해체하고 디스크 리소스를 삭제하지 않고 VHD를 제거하면 여전히 일부 메타 데이터가 저장되어 있으므로 원하는 경우 저장소 계정을 삭제할 수 없습니다.

관련 문제