mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
No description
993aa7fd49
Currently we have two ways to enable networking on crosvm: 1) Pass all 3 of `--host_ip`, `--netmask` and `--mac` to have crosvm create and configure a TAP device. This requires crosvm to either be run as root, or to have the CAP_NET_ADMIN capability, 2) Have another process with the above privileges create and configure the TAP device before exec'ing crosvm with the TAP FD still open and passing it to crosvm with the `--tap-fd` argument. None of these ways are very convenient for development as they either require to get some privilege every time crosvm is invoked, or to use another program (not distributed with crosvm) to do the setup. This patch adds the `tap-name` command-line option which allows to create a network device from a configured persistent TAP interface, which doesn't require any kind of privilege. A persistent TAP interface can be configured on the host as follows: # ip tuntap add mode tap user $USER vnet_hdr crosvm_tap # ip addr add 10.0.2.1/24 dev crosvm_tap # ip link set crosvm_tap up Then after this one-time setup, $USER will be able to use the `crosvm_tap` interface by simply passing `--tap-name crosvm_tap` to crosvm, without any extra option or tool. This is convenient for development setups as one just needs to permanently configure the TAP interface using standard Linux tools on the host once. BUG=None TEST=Check that networking works after passing `--tap-name` to crosvm. Change-Id: Id053a97d69e47a6fefdbe7f3134841d2bfa1757b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3325827 Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Alexandre Courbot <acourbot@chromium.org> |
||
---|---|---|
.cargo | ||
.devcontainer | ||
.github | ||
aarch64 | ||
acpi_tables | ||
arch | ||
bin | ||
bit_field | ||
ci/kokoro | ||
common | ||
crosvm-fuzz | ||
crosvm_plugin | ||
devices | ||
disk | ||
docs/book | ||
fuse | ||
gpu_display | ||
hypervisor | ||
integration_tests | ||
kernel_cmdline | ||
kernel_loader | ||
kvm | ||
kvm_sys | ||
libcras_stub | ||
libcrosvm_control | ||
libvda | ||
linux_input_sys | ||
logo | ||
net_sys | ||
net_util | ||
power_monitor | ||
protos | ||
qcow_utils | ||
resources | ||
rutabaga_gfx | ||
seccomp | ||
src | ||
system_api_stub | ||
tests | ||
third_party | ||
tools | ||
tpm2 | ||
tpm2-sys | ||
usb_sys | ||
usb_util | ||
vfio_sys | ||
vhost | ||
virtio_sys | ||
vm_control | ||
vm_memory | ||
x86_64 | ||
.dockerignore | ||
.gitignore | ||
.gitmodules | ||
.rustfmt.toml | ||
ARCHITECTURE.md | ||
Cargo.toml | ||
CONTRIBUTING.md | ||
LICENSE | ||
navbar.md | ||
OWNERS | ||
README.chromeos | ||
README.md | ||
run_tests | ||
rust-toolchain | ||
setup_cros_cargo.sh | ||
test_all | ||
unblocked_terms.txt |
crosvm - The Chrome OS Virtual Machine Monitor
crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the Chrome OS platform. Compared to QEMU, crosvm doesn’t emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.
crosvm is currently used to run Linux/Android guests on Chrome OS devices.
- Documentation
- Source code
- API doc, useful for searching API.
- For contribution, see the contributor guide. Mirror repository is available at GitHub for your convenience, but we don't accept bug reports or pull requests there.
- Issue tracker