At present, the `tools/examples/example_simple` script fails with an
access error when the user is not added to the kvm group.
This commit makes sure the user is added to the kvm group when trying to
run crosvm in running_crosvm/example_simple.md.
Tested on my local environment and checked the script works regardless
of the user being in the kvm group.
BUG=b:294970555
TEST=./tools/presubmit
TEST=./tools/examples/example_simple works regardless of user being in
the kvm group
TEST=shellcheck
Change-Id: I19e42af048774f68c7e0a93afa89a7acd183ba82
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4763917
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Joe Hattori <hattorij@google.com>
Uncommented the line that injetcs the RSA key to allow for SSH
connections to the VM without initial login.
Add more information that if the file is missing, an initial login to
change passwords is required.
BUG=N/A
TEST=mdbook build
Change-Id: Ie0f94da693e04319b7b098df8bfe044ceeeeb8a9
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4698613
Commit-Queue: Elie Kheirallah <khei@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Some information seemed omitted from network, which requires some file
creation or modification to get the example working. Added the info.
BUG=N/A
TEST=mdbook build
Change-Id: I01069a3ac690b531e7902eab626ded498df7ebb1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4694602
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Elie Kheirallah <khei@google.com>
Auto-Submit: Elie Kheirallah <khei@google.com>
Fixing small typo in command to install multiple packages. A comma is
required, and not a space.
BUG=N/A
TEST=mdbook build
Change-Id: I8a7032b3e767d1dc072cf593131f5cbddaf57ff8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4680286
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Elie Kheirallah <khei@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Elie Kheirallah <khei@google.com>
Some examples in the book assume that packages are installed. One
example as such is `Vsock`, where there's an assumption that `ncat` is
installed.
Some examples provide a hint at how packages are installed, but it's not
explicitely formulated. And if you skip the examples page and go
directly to Vsock, you lack the information on how to install `ncat`.
Added more information in the Example Usage on how to install packages,
and added the virt-builder command in vsock.
BUG=N/A
TEST=mdbook build
Change-Id: Id5a07287458ce55538ccb8a9b387dfb4b512042f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4675702
Commit-Queue: Elie Kheirallah <khei@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Convert this deprecated option to its new unified form.
BUG=None
TEST=prebuild
Change-Id: Idc0048a67e43f0542c617bb78476d6ec205c8a97
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4600497
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
Crosvm book don't have a documentation for how to run and use the virtio-fs.
Add a fs chapter under device, and upload a runnable example.
BUG=b:235067443
TEST=mdbook build docs/book
Change-Id: I8ef1ceb9d4cfc5f9a2e8afa2416d1f3ba69691b4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4535500
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
Commit-Queue: Yuan Yao <yuanyaogoog@chromium.org>
Currently, example scripts disabled sandboxing feature. However,
sandboxing feature is a big part in crosvm security model.
This commit will create /var/empty directory in host, so that the
minijail can be created.
BUG=b:281951944
TEST=tools/examples/example_simple tools/examples/example_network
tools/example_desktop
Change-Id: I8cece99ee7df22f51b61eb1eeebde7b65a715e04
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4535442
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Yuan Yao <yuanyaogoog@chromium.org>
Currently, if a user follows the crosvm's running crosvm section, one
will encounter errors executing the sample codes in tools/examples. We
want the examples codes to run without extra manual operation. Also,
there is a wrong link in the documentation.
Add disable-sandbox option in example_simple, which prevents jail
creation error. Fix a document link in 3.1.Example Usage section to show
the correct source.
BUG=b:281951944
TEST=tools/examples/example_network tools/examples/example_simple
Change-Id: I6383112acdb7c9c5f22f39da872756ab278d1309
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4518099
Commit-Queue: Yuan Yao <yuanyaogoog@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Takaya Saeki <takayas@chromium.org>
most features (especially for a simple run) should work without
requiring the sandbox to be disabled so we can remove that option from
the example command to run crosvm.
BUG=none
TEST=run the example
Change-Id: I7455062b9745fe520dccf2b54d55ec78109ff9a3
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4303079
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Auto-Submit: Maciek Swiech <drmasquatch@google.com>
This search/replace updates all copyright notices to drop the
"All rights reserved", Use "ChromiumOS" instead of "Chromium OS"
and drops the trailing dots.
This fulfills the request from legal and unifies our notices.
./tools/health-check has been updated to only accept this style.
BUG=b:246579983
TEST=./tools/health-check
Change-Id: I87a80701dc651f1baf4820e5cc42469d7c5f5bf7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894243
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
crosvm is switching the import style to use one import per line.
While more verbose, this will greatly reduce the occurence of merge
conflicts going forward.
Note: This is using a nightly feature of rustfmt. So it's a one-off
re-format only. We are considering adding a nightly toolchain to
enable the feature permanently.
BUG=b:239937122
TEST=CQ
Change-Id: Id2dd4dbdc0adfc4f8f3dd1d09da1daafa2a39992
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3784345
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
The example is currently building a crosvm with gpu support, which
doesn't link properly out of the box. Now, we build explicitly with all
features off, which is sufficient to run the example.
BUG=none
TEST=ran the example.
Change-Id: I1699741f9c094831827b090782be5f5d7492eefa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3756725
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Noah Gold <nkgold@google.com>
Use an INT3 (0xCC) instruction to cause the example to exit after
printing the message. This is more convenient than having to manually
kill crosvm from another terminal.
BUG=None
TEST=Run baremetal and observe that it exits
Change-Id: I4baeecca41d156c82bb1e1b27d0f8c2ba93959f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3691966
Reviewed-by: Anton Romanov <romanton@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Fix loading of the example baremetal kernel with the fixed ELF kernel
loader:
- Remove the "RAM" address space so virtual and physical address match.
- Remove the 0x200-byte padding now that entry point address is used.
BUG=b:234155022
TEST=Run baremetal as in tools/examples/baremetal/README.md
Change-Id: I61394cdf4bf71f91736da5a636b0088ecfe78c84
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3691965
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Anton Romanov <romanton@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
rwroot automatically adds root=/dev/vd[a-z], but the example image
actually uses /dev/vda5. This leads to confusion when two root= kernel
command line arguments are passed in and only one of them works.
Therefore we use rwdisk instead which doesn't add the kernel argument.
BUG=b:236198584
TEST=mdbook builds, examples build and run
Change-Id: I9bfc05445b1e2aef197a43ee647d7c784d50dad7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3708365
Commit-Queue: Yuanchu Xie <yuanchu@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Two examples are added. A simple one and one with network
configured.
The examples are written in a way they can be integrated
with the mdbook to form a tutorial. This will ensure the
tutorial code snippets stay up to date.
The documentation for networking is added after
https://crrev.com/c/3237468 is merged.
BUG=b:214104901
TEST=./tools/examples/example_simple
Change-Id: I33682878858d8a0324fbb6a87e33cd55b29811b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3388063
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>