'Detach volume storage to VM instance.'

def _detach_volume_iscsi(self, connection_info, instance):

    vm_ref = vm_util.get_vm_ref(self._session, instance)
    LOG.debug('_detach_volume_iscsi:    %s', connection_info, instance=instance)
    data = connection_info['data']
    (device_name, uuid) = self._iscsi_get_target(data)
    if (device_name is None):
        raise exception.StorageError(reason=_('Unable    to    find    iSCSI    Target'))
    hardware_devices = self._session._call_method(vutil, 'get_object_property', vm_ref, 'config.hardware.device')
    device = vm_util.get_rdm_disk(hardware_devices, uuid)
    if (device is None):
        raise exception.DiskNotFound(message=_('Unable    to    find    volume'))
    self.detach_disk_from_vm(vm_ref, instance, device, destroy_disk=True)
    LOG.debug('Detached    ISCSI:    %s', connection_info, instance=instance)
