Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

How to get lease-id on the blob for a IAAS azure VM which is already created.

$
0
0

Hi,

  I am calling Azure REST Api's from c# code to create and apply snapshots for IAAS Virtual machines.

  Create snapshot went well and I got snapshot datetime in response.

Now I am trying to apply this snapshot to my base blob using REST api (Copy Blob) .

Since there is already lease acquired on my base blob for infinite period , I have to specify this lease ID in the Copy Blob REST header . I browsed in the azure portal  Storage->Containers->Blob Edit , which will show  blob properties and metadata . But it is shown that lease status as "Locked" however there is no lease-id shown . Also I browsed many azure REST api's but not got any useful way to retrieve the lease-id for the blob.

Since in my case while creating the Virtual machine , blob is also getting created by default lease-id where I don't have any  way to specify my own lease-id.

Please guide me to correct way of retieving lease-id which I can specify in the copy Blob rest api.

Thanks in advance,

Rakesh

 


Viewing all articles
Browse latest Browse all 12545

Trending Articles