Current Position:Home > What is the workflow for deleting a VM using the Python SDK?

What is the workflow for deleting a VM using the Python SDK?

Update:11-30Source: network consolidation
Advertisement
Following the available Azure Python SDK documentation, I use ServiceManagementService.delete_deployment() followed by ServiceManagementService.delete_hosted_service().  This works correctly to delete the VM, however it leaves the boot VHD still present.
 If I wait until the orphaned disk no longer has an associated VM (through the Disk.attached_to field), I am able to successfully call ServiceManagementService.delete_disk().
Is this the correct way of doing this?  Seems like there might be a better way to suspend/stop the VM, detach the disk, delete the VM and delete the disk, but I see no API for detaching a disk from a VM.
Much preferably, I would rather delete a VM and know that the associate disk(s) are also automatically deleted.
Thanks in advance.

The Best Answer

Advertisement
Sorry for the delay.
The procedure you follow is correct. Sometime, when you delete the VM, the VHD of the VM remains in the lease connection. Once the lease is disconnected you will be able to delete the VHD.
However, you may refer the following link which provide clear procedure for performing common service management tasks from Python:
http://azure.microsoft.com/en-in/documentation/articles/cloud-services-python-how-to-use-service-management/
Regards,
Manu
  • What is the workflow for deleting a VM using the Python SDK? Update:11-30

    Following the available Azure Python SDK documentation, I use ServiceManagementService.delete_deployment() followed by ServiceManagementService.delete_hosted_service().  This works correctly to delete the VM, however it leaves the boot VHD still pres

  • Best Workflow for Deleting? Update:11-30

    Hi Folks. Would anyone like to suggest the best workflow for deleting files after a project? Let's assume that i have no future need for any of the captured footage or PE7 files. It would be helpful to know what the default locations are for all the

  • Using Python SDK to delete storage container: The Date header in the request is incorrect. Update:10-11

    Hi, I'm trying to delete a container from my storage by using the python sdk and I always get the error  Unknown error (Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature

  • How do i create a workflow to delete tasks. Update:10-11

    I've created a workflow that will take the Title, Start Date, and End Date from one list (roomReserved) and then create a task on another list (centralCal) setup as a central calendar. When a yes/no checkbox is checked, it will then create the task o

  • Issue in workflow - Logically Deleted Scenario Update:10-11

    Hi, We have an issue in Journal Entry Workflow. The user has tried to upload a document for Journal Entry Posting. Document is in Parked Status. In the workflow, when it has come to the required step of workflow approval and checks for the document t

  • Custom Workflow - BPEL - delete registered policies Update:11-30

    Hi all, I am trying to set up a custom workflow with the Oracle Beehive Custom Workflow Tutorial. After some difficulties I finally succeeded in deploying the BPEL-process. Only the integration with beehive does not (yet ;-)) work correctly. I need t

  • Workflow Items deletion Update:11-30

    Hi, Can anybody please let me know how to delete the Workflow items in ECC 6.0? What is the TC or any other process/ program? Your help and time will be really appreciate. Thanks & Regards, Niki Shah.Hi, If by ABAP you  have this FM SAP_WAPI_WORKITEM

  • Workflow to delete certain finder items Update:11-30

    My workflow (which backs up FileMaker Pro databases from FileMaker Server) does this: 1. Mounts an AFP volume 2. Creates a zip archive of the data folder to an AFP volume 3. Changes the name of the zip archive to from name.zip to namedate.zip iCal ru

  • Using customer workflow for delete action on active sync Update:11-30

    The following from is called by a partent form when the feedOp is delete. <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE Configuration PUBLIC 'waveset.dtd' 'waveset.dtd'> <Configuration name='VDSActiveSyncDeleteForm' wstype='UserForm'>

  • How can we implement workflow for Deleted content Update:11-30

    Hi Experts, whenever we delete a content , It never went into Workflow. I want when user delete any content, It should go into workflow. When approver approves it, only then content item should actually deleted. If approver rejects it, content item s