PowerVC 1.3.1 provides better control of how volumes are deleted for the complete VM lifecycle. In the past, the users had little to no control over the VM volumes that will be deleted. In most of the instances, we would delete a “data” volume that originated from a deployed image or a created blank volume on the GUI for deploy, but PowerVC did not delete the data volumes that were attached after the deployment. There were additional actions the user could take post-deploy that would affect which VMs data volumes would be deleted, but it was not obvious. PowerVC 1.3.1 solves these issues by providing new data deletion controls at the volume level to the user which clearly controls what VM volumes will be deleted and what volumes will remain after deleting a VM.

Note: Shared volumes will never be deleted with the new controls since these volumes are shared between multiple VMs and requires special attention.

User Interface (GUI) changes:

The delete VM GUI in the IBM PowerVC Virtual Machines Page lists three options for volume deletion. This selection dialog is new to PowerVC v1.3.1 and provides the new improved controls for data deletion.

Option 1. Boot volumes: This provides a list of boot volumes that are not shared between the VMs.  A virtual machine root volume will always be a boot volume.

Option 2. All non-shared volumes: This provides a list of both boot and data volumes which are not shared between the VMs.

Option 3. Select volumes: This provides a list of all boot and data volumes that are attached to the virtual machine. Volumes that are shared with another virtual machine cannot be selected.

The deletion dialog will not allow the user to choose to delete volumes that are shared between VMs. See the figure below for the shared volume that has been grayed out. If the request comes to delete a volume that is shared via REST API, the volume will not be deleted and the delete of the VM will still succeed. This keeps the behavior same between the API and the graphical use interface and protects shared volumes from being accidentally deleted.

If you proceed to select any of the above first 2 options, you are shown a confirmation dialog so you can confirm that the list is accurate before the actual delete of the volume is done. The confirmation dialog also appears in Option 3 after selecting the volumes.


With the help of REST API, we rely on the additional parameter named “delete_on_termination” using the PUT method API call of os-volume_attachments. For details, see the PowerVC Knowledge Center link:

Data Volume Deletion in PowerVC

Below is a CURL command example that shows the REST API calls:

curl -X ‘PUT’ -1 -k -v -H “X-Auth-Token:b86e52e7bf404dcc83d384aeb03596bd” -H ‘Content-type: application/json’ -H “X-OpenStack-Nova-API-Version: 2.22” -d ‘{“volumeAttachment”:{“volumeId”:”300917df-15ed-4b57-a58a-ffc4d810d61a”, “delete_on_termination”: true}}’

If the delete_on_termination flag is set to “true” the volume will be deleted, otherwise the volume will not be deleted.

curl -X ‘PUT’ -1 -k -v -H “X-Auth-Token:8bac4b7ebb0241ab8acdba26c0801f33” -H ‘Content-type: application/json’ -H “X-OpenStack-Nova-API-Version: 2.22” -d ‘{“volumeAttachment”:{“volumeId”:”300917df-15ed-4b57-a58a-ffc4d810d61a”, “delete_on_termination”: false}}’

Supported Environments:

The GUI change is only available in PowerVC Standard version but not in PowerKVM version.

I hope these new options make your life simpler.  If you have comments or questions, post them below.  We’d love to hear from you! And don’t forget to follow us on LinkedIn, Twitter, and Facebook!

By Himabindu P J

IBM PowerVC Software Engineer

Join The Discussion

Your email address will not be published. Required fields are marked *