code: func (vm *VirtualMachine) deleteController(ctx context.Context, controllerDevice types.BaseVirtualDevice, vmDevices object.VirtualDeviceList) error {
  	controllerDeviceList := vmDevices.SelectByType(controllerDevice)
  	if len(controllerDeviceList) < 1 {
  		return ErrNoDevicesFound
  	}
  	device := controllerDeviceList[len(controllerDeviceList)-1]
  	err := vm.RemoveDevice(ctx, true, device)
  	if err != nil {
  		klog.Errorf("Error occurred while removing device on VM: %q. err: %+v", vm.InventoryPath, err)
  		return err
  	}
  	return nil
  }
docs: // deleteController removes latest added SCSI controller from VM.