code: func (vm *VirtualMachine) DetachDisk(ctx context.Context, vmDiskPath string) error {
  	vmDiskPath = RemoveStorageClusterORFolderNameFromVDiskPath(vmDiskPath)
  	device, err := vm.getVirtualDeviceByPath(ctx, vmDiskPath)
  	if err != nil {
  		klog.Errorf("Disk ID not found for VM: %q with diskPath: %q", vm.InventoryPath, vmDiskPath)
  		return err
  	}
  	if device == nil {
  		klog.Errorf("No virtual device found with diskPath: %q on VM: %q", vmDiskPath, vm.InventoryPath)
  		return fmt.Errorf("No virtual device found with diskPath: %q on VM: %q", vmDiskPath, vm.InventoryPath)
  	}
  	// Detach disk from VM
  	requestTime := time.Now()
  	err = vm.RemoveDevice(ctx, true, device)
  	RecordvSphereMetric(APIDetachVolume, requestTime, err)
  	if err != nil {
  		klog.Errorf("Error occurred while removing disk device for VM: %q. err: %v", vm.InventoryPath, err)
  		return err
  	}
  	return nil
  }
docs: // DetachDisk detaches the disk specified by vmDiskPath