def list_running():
    '''
    Lists running nspawn containers

    .. note::

        ``nspawn.list`` also works to list running containers

    CLI Example:

    .. code-block:: bash

        salt myminion nspawn.list_running
        salt myminion nspawn.list
    '''
    ret = []
    for line in _machinectl('list')['stdout'].splitlines():
        try:
            ret.append(line.split()[0])
        except __HOLE__:
            pass
    return sorted(ret)

# 'machinectl list' shows only running containers, so allow this to work as an
# alias to nspawn.list_running
dataset/ETHPy150Open saltstack/salt/salt/modules/nspawn.py/list_running