def find_mounted_volume_vm_id(mcs, volume_id):
    """
    Find the vm the volume is mounted to (or None if not mounted)
    The vm might not be running.
    :param mcs: MiniCloudStack instance with valid connection
    :param volume_id: id of volume
    :return: vm_id or 'None'
    """
    vm_id = None
    for v in mcs.list('volumes', id=volume_id):
        attached_vm = getattr(v, 'virtualmachineid', None)
        if attached_vm is not None:
            if hasattr(v, 'deviceid'):
                return attached_vm
    return vm_id
