blob: 2fde2216c799fdaef91c4085932fdea067e3c90c [file] [log] [blame]
# Copyright 2017 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Start the VM log forwarding service"
author ""
# Starts the VM log forwarding service, which is responsible for collecting
# logs from VMs, scrubbing the contents, and then forwarding them to /dev/log
# or to a specified file. Dependent services are injected dynamically by the
# associated ebuild.
start on @dependent_start_services@
stop on @dependent_stop_services@
# VMlog-forwarder is a restartable daemon.
oom score -100
pre-start script
# Ensure the kernel module is loaded.
grep -q vhost-vsock /proc/misc || modprobe -q vhost-vsock
end script
# Forward logs to the user's cryptohome/
exec minijail0 -l -p -r -v -N -n -c 0 -G -u crosvm -g crosvm \
-- /usr/bin/vmlog_forwarder --syslog=false