VMware {code} Community
Jason_Yang
Contributor
Contributor

ReconfigVM_Task could not remove a delta disk from VM on vSphere 5.1

When I test web service api ReconifgVM_Task against vSphere 5.1 to remove a delta disk from virtual machine. A error occured.

It shows "Invalid configuration for device '0'". And get the error information returned.

"Cannot remove virtual disk from the virtual machine because it or one of its parent disks is part of a snapshot of the virtual machine."

But this works fine against vSphere 5.0 update 1 and vSphere 4.0.

What happened here of this API. Does VMWare changed its behavior for this API "ReconifgVM_Task"?

And when I tried to remove disk from a VM through vClient. It also poped out the error dialog.

CouldNotRemoveDeltaDisks.jpg

0 Kudos
3 Replies
adilshabbir
Contributor
Contributor

Look like some snapshot is associated to your disk .. just for trail can you remove all the snapshots and then can try you code agian.

let me know the results.

0 Kudos
Jason_Yang
Contributor
Contributor

But I want to keep those snapshots as I hope any time it could be reverted to a stable state.

Any other way?

thanks.

0 Kudos
Steve_Jin
Expert
Expert

This is NOT a vSphere API issue.

When a snapshot is cut, a new child (delta) disk is created for changes forward. If you remove the parent disk and child disks in snapshot chain, a child disk is useless. To enforce integrity of the disks, users are not allowed to delete parent disk and child disks in the chain before a child disk is deleted.

You may want to check out this KB for more explanation: http://kb.vmware.com/kb/1015180

Best luck!

Steve, vExpert, creator of open source vijava API, http://www.doublecloud.org

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org
0 Kudos