crosvm/ci/crosvm_test_vm/build/cloud_init_data.yaml
Dennis Kempin aa0717443e Add VM to builders
The VM allows both the x86 and aarch64 builders to run tests which
require access to kernel devices that docker would prevent us
from accessing.
The VM is automatically started in the endpoint script, and the
environment is set up to execute `cargo test` binaries inside the VM.

This allows for convenient interactive usage.
The VM is also integrated into the run_tests scripts, executing tests
that do not require special privileges first, while the VM is still
booting up, then execuing the remaining tests in the VM.

BUG=b:177228167,b:177951276
TEST=These test calls pass:
./ci/builder --vm ./run_tests
./ci/aarch64_builder --vm ./run_tests
./run_tests

Change-Id: I20bf2cd848e944d411b97f1f8356279e312d8583
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2642766
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2021-02-05 03:01:53 +00:00

56 lines
1.8 KiB
YAML

#cloud-config
users:
- name: crosvm
sudo: ALL=(ALL) NOPASSWD:ALL
lock_passwd: False
# Hashed password is 'crosvm'
passwd: $6$rounds=4096$os6Q9Ok4Y9a8hKvG$EwQ1bbS0qd4IJyRP.bnRbyjPbSS8BwxEJh18PfhsyD0w7a4GhTwakrmYZ6KuBoyP.cSjYYSW9wYwko4oCPoJr.
# Pubkey for `../vm_key`
ssh_authorized_keys:
- ssh-rsa
AAAAB3NzaC1yc2EAAAADAQABAAABgQCYan8oXtUm6WTIClGMsfEf3hmJe+T8p08t9O8StuuDHyAtl1lC+8hOcuXTNvbc52/HNdZ5EO4ZpP3n+N6XftfXFWQanI8OrIHVpsMATMnofHE9RBHWcR/gH0V3xKnXcTvo3S0T3ennfCYxjtL7l7EvHDMdacX8NFOaARH92qJd/YdFp73mqykmc81OCZ4ToQ5s+20T7xvRzedksfSj/wIx3z8BJK9iovkQhNGFd1o557Vq1g3Bxk1PbcIUAvFPl0SwwlFfHBi2M9kZgCVa8UfokBzu77zvxWFud+MXVrfralwKV88k9Cy9FL5QGbtCiZ7RDP5pf69xapKBK+z2L+zuVlSkvaB1CcXuqqVDjD84LXEA+io0peXQcsqbAfbLo0666P7JsweCyQ07qc4AM8gv52SzFuQTIuHLciYxbPgkZTieKgmQLJ1EgfJelOG/+60XC24LbzPIAQxcO83erC/SQ3mTUizu6BueJt7LD1V6vXHcjLfE19FecIJ8U0XDaDU=
crosvm@localhost
groups: kvm, disk, tty
apt:
sources:
testing:
source: "deb $MIRROR bullseye main"
conf: APT::Default-Release "stable";
# Runtime dependencies of crosvm binaries.
# Note: Keep in sync with -dev packages of crosvm_(aarch64_)builder
packages:
- libcap2
- libdbus-1-3
- libdrm2
- libepoxy0
- libfdt1
- libssl1.1
- libwayland-client0
- libx11-6
- libxext6
- rsync
runcmd:
# Install testing (debian bullseye) versions of some libraries.
- [
apt-get,
install,
--yes,
-t,
testing,
--no-install-recommends,
libdrm2,
libepoxy0,
]
# Trim some fat
- [apt-get, remove, --yes, vim-runtime, iso-codes, perl, grub-common]
- [apt-get, autoremove, --yes]
- [apt-get, clean, --yes]
- [rm, -rf, /var/lib/apt/lists]
# Fill empty space with zeros, so the image can be sparsified.
- [dd, if=/dev/zero, of=/mytempfile]
- [rm, /mytempfile]