blob: ab60f59b3e36f19f9b3bf87f4b56a88375604fd2 [file] [log] [blame]
// Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include "login_manager/job_manager.h"
#include <base/files/file_path.h>
namespace login_manager {
// Provides methods for starting and stopping virtual machines.
class TerminaManagerInterface : public JobManagerInterface {
virtual ~TerminaManagerInterface() {}
// Starts the container image from |image_path| in a termina VM. Give the
// running vm |name| so it can be referred to later.
// |image_path| must be a disk image containing a valid open container
// initiative spec configuration file and the container rootfs.
// If |writable| is true, the container image will be writable within the VM.
virtual bool StartVmContainer(const base::FilePath& image_path,
const std::string& name,
bool writable) = 0;
// Stops a running VM named |name|.
virtual bool StopVmContainer(const std::string& name) = 0;
} // namespace login_manager