docs: document hypervisor auto-detection in testing guide

Describe --hypervisor as an optional override that defaults to
auto-detection from the host device node (/dev/mshv or /dev/kvm) for
both the build and tests commands and the shared test-script arguments.

Assisted-by: Claude:Opus-4.8
Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2026-06-03 17:56:24 -07:00
committed by Bo Chen
parent bbaeae7cb0
commit d83ffd7d7d

View File

@@ -78,7 +78,7 @@ scripts/dev_cli.sh build [--debug|--release] [--libc musl|gnu] \
| `--debug` | yes | Build debug binaries. |
| `--release` | | Build release binaries. |
| `--libc` | `gnu` | C library to link against (`musl`/`gnu`).|
| `--hypervisor` | `kvm` | Hypervisor backend (`kvm`/`mshv`). |
| `--hypervisor` | auto | Hypervisor backend (`kvm`/`mshv`). Auto-detected from the host device node when omitted. |
| `--features` | | Additional cargo features. |
| `--volumes` | | Extra host volumes (`/a:/a#/b:/b`). |
| `--runtime` | `docker`| Container runtime (`docker`/`podman`). |
@@ -112,7 +112,7 @@ scripts/dev_cli.sh tests [<test type>] [--libc musl|gnu] \
| Flag | Default | Description |
|----------------|---------|------------------------------------------|
| `--libc` | `gnu` | C library to link against (`musl`/`gnu`).|
| `--hypervisor` | `kvm` | Hypervisor backend (`kvm`/`mshv`). |
| `--hypervisor` | auto | Hypervisor backend (`kvm`/`mshv`). Auto-detected from the host device node when omitted. |
| `--volumes` | | Extra host volumes (`/a:/a#/b:/b`). |
### Argument passthrough
@@ -134,7 +134,7 @@ The test scripts accept the following common arguments via
| Argument | Description |
|-----------------------|----------------------------------------------|
| `--hypervisor kvm\|mshv` | Select hypervisor (also passed by dev_cli.sh). |
| `--hypervisor kvm\|mshv` | Override the hypervisor (auto-detected from the host device node when omitted; also passed by dev_cli.sh). |
| `--test-filter <name>`| Run only tests matching the filter. |
| `--test-exclude <name>`| Exclude tests matching the pattern. |
| `--build-guest-kernel`| Build the guest kernel from source instead of downloading a prebuilt binary. |
@@ -208,6 +208,10 @@ When the hypervisor is `mshv`, the feature flag `--features mshv` is
passed to cargo. On x86_64 with KVM, the `tdx` feature is additionally
enabled if needed (MSHV does not support TDX).
The hypervisor backend is auto-detected from the host device node:
`/dev/mshv` selects MSHV and `/dev/kvm` selects KVM. Pass
`--hypervisor kvm|mshv` to override the detection explicitly.
## Integration tests
All integration test containers run with `--privileged` and full
@@ -341,7 +345,7 @@ guest images and a prebuilt kernel.
### Confidential VMs
```shell
scripts/dev_cli.sh tests --integration-cvm [--hypervisor mshv]
scripts/dev_cli.sh tests --integration-cvm
```
Runs `scripts/run_integration_tests_cvm.sh`. Builds with `--features