New issue
Advanced search Search tips

Issue 767619 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

vm_tools: migrate vm_launcher to crosvm

Project Member Reported by smbar...@chromium.org, Sep 21 2017

Issue description

kvmtool is long gone, and for vm_launcher to be useful it needs to support crosvm.

We also need some refactoring to support running in headless mode. Example usage:

vm_launcher run <vm-name>    # run a VM in the foreground with serial console. vm_launcher returns once the VM shuts down
vm_launcher start <vm-name>  # run a VM in the background; vm_launcher returns immediately once the VM has booted
vm_launcher stop <vm-name>   # stop a VM and clean up, regardless of how it was started
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/01c22576c5c7c5090f8c5ec774fe354efb6e8e06

commit 01c22576c5c7c5090f8c5ec774fe354efb6e8e06
Author: Stephen Barber <smbarber@chromium.org>
Date: Tue Oct 03 03:25:24 2017

vm_tools: launcher: replace lkvm with crosvm

This adds support for crosvm as the VM monitor, and totally
removes support for kvmtool. It also changes the usage of
vm_launcher to allow for naming VMs and running them in a
headless mode using start/stop subcommands.

BUG= chromium:767619 
TEST=vm_launcher --container=container.ext4

Change-Id: I36a3df699a7cb960f47ff75c55aa34091f4c8ecd
Reviewed-on: https://chromium-review.googlesource.com/657974
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[modify] https://crrev.com/01c22576c5c7c5090f8c5ec774fe354efb6e8e06/vm_tools/launcher/constants.h
[modify] https://crrev.com/01c22576c5c7c5090f8c5ec774fe354efb6e8e06/vm_tools/launcher/vm_launcher.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/e614900e110bb618228a914265ad347b39144e8d

commit e614900e110bb618228a914265ad347b39144e8d
Author: Stephen Barber <smbarber@chromium.org>
Date: Tue Oct 03 03:25:23 2017

vm_tools: create common constants file

The maitred port needs to be shared between maitred and vm_launcher.

BUG= chromium:767619 
TEST=compiles

Change-Id: I91e1cf6b383ac08aab3ef8abbefaa370c8da43a0
Reviewed-on: https://chromium-review.googlesource.com/689734
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[modify] https://crrev.com/e614900e110bb618228a914265ad347b39144e8d/vm_tools/maitred/main.cc
[add] https://crrev.com/e614900e110bb618228a914265ad347b39144e8d/vm_tools/common/constants.h

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 3 2017

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/b0371387859dac689d95685c54e92285b26bba83

commit b0371387859dac689d95685c54e92285b26bba83
Author: Stephen Barber <smbarber@chromium.org>
Date: Tue Oct 03 03:25:23 2017

vm_tools: launcher: add vsock support

Vsock cids must be unique per VM, so those can be managed with
PooledResource.

BUG= chromium:767619 
TEST=compiles

Change-Id: I3bbac61c44adeb102c7900755f5a49b13386da52
Reviewed-on: https://chromium-review.googlesource.com/689736
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[modify] https://crrev.com/b0371387859dac689d95685c54e92285b26bba83/vm_tools/host.gypi
[add] https://crrev.com/b0371387859dac689d95685c54e92285b26bba83/vm_tools/launcher/vsock_cid.cc
[add] https://crrev.com/b0371387859dac689d95685c54e92285b26bba83/vm_tools/launcher/vsock_cid.h

Project Member

Comment 6 by bugdroid1@chromium.org, Oct 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/0c77cc7b029a286107c65325043378929098a10e

commit 0c77cc7b029a286107c65325043378929098a10e
Author: Stephen Barber <smbarber@chromium.org>
Date: Tue Oct 03 03:25:24 2017

vm_tools: launcher: add class to manage crosvm instances

This prepares for moving main to use crosvm. Each crosvm instance
gets a name and its own directory under /run/vm/. The VM instance's
directory will allow us to restore state, e.g. to stop a headless VM.

BUG= chromium:767619 
TEST=compiles

Change-Id: I10fb4f3955c8dd87288c41b7e25accc9be9c7cf6
Reviewed-on: https://chromium-review.googlesource.com/689737
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[add] https://crrev.com/0c77cc7b029a286107c65325043378929098a10e/vm_tools/launcher/crosvm.h
[modify] https://crrev.com/0c77cc7b029a286107c65325043378929098a10e/vm_tools/host.gypi
[modify] https://crrev.com/0c77cc7b029a286107c65325043378929098a10e/vm_tools/launcher/constants.h
[add] https://crrev.com/0c77cc7b029a286107c65325043378929098a10e/vm_tools/launcher/crosvm.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/f83778e89738bb03099816f5baa702fa28df31fc

commit f83778e89738bb03099816f5baa702fa28df31fc
Author: Stephen Barber <smbarber@chromium.org>
Date: Thu Oct 05 12:16:56 2017

vm_tools: launcher: update README.md for crosvm

vm_launcher usage has changed now that it uses crosvm under the hood.
Update the README to cover crosvm and the new subcommands.

BUG= chromium:767619 
TEST=none

Change-Id: I5a83e11da27a3d6f49e6f4872aaf31fd01a561f2
Reviewed-on: https://chromium-review.googlesource.com/699419
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>

[modify] https://crrev.com/f83778e89738bb03099816f5baa702fa28df31fc/vm_tools/launcher/README.md

Project Member

Comment 8 by bugdroid1@chromium.org, Oct 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/36c2dc5abca1ee7452b7f13b08d7818b70b71466

commit 36c2dc5abca1ee7452b7f13b08d7818b70b71466
Author: Stephen Barber <smbarber@chromium.org>
Date: Fri Oct 06 10:57:49 2017

vm_tools: launcher: implement GetLatestVMPath

BUG= chromium:767619 
TEST=vm_launcher with two components loaded; check that newer VM is booted

Change-Id: I73e0a60b037abac19b090c811c56e2b3fcfef888
Reviewed-on: https://chromium-review.googlesource.com/703928
Commit-Ready: Stephen Barber <smbarber@chromium.org>
Tested-by: Stephen Barber <smbarber@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>

[modify] https://crrev.com/36c2dc5abca1ee7452b7f13b08d7818b70b71466/vm_tools/launcher/vm_launcher.cc

Status: Fixed (was: Started)

Comment 10 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 11 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)
Components: OS>Systems>Containers

Sign in to add a comment