Commit 7baa1c73 authored by divyenpatel's avatar divyenpatel

fix for vSphere DeleteVolume

parent eb8d34ba
......@@ -1286,6 +1286,9 @@ func (vs *VSphere) DeleteVolume(vmDiskPath string) error {
// Create a virtual disk manager
virtualDiskManager := object.NewVirtualDiskManager(vs.client.Client)
if filepath.Ext(vmDiskPath) != ".vmdk" {
vmDiskPath += ".vmdk"
}
// Delete virtual disk
task, err := virtualDiskManager.DeleteVirtualDisk(ctx, vmDiskPath, dc)
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment