diff --git a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md index 121abd51c804..78df8d3d77c7 100644 --- a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md +++ b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md @@ -43,6 +43,11 @@ test script). ## Shell access to VMs in interactive mode {#sec-nixos-test-shell-access} +::: {.warning} +Using `shell_interact()` is deprecated. Use the +[interactive SSH backdoor](#sec-nixos-test-ssh-access) instead. +::: + The function `.shell_interact()` grants access to a shell running inside a virtual machine. To use it, replace `` with the name of a virtual machine defined in the test, for example: `machine.shell_interact()`. diff --git a/nixos/doc/manual/release-notes/rl-2611.section.md b/nixos/doc/manual/release-notes/rl-2611.section.md index b06f3e9cdfaf..e74dd9ca6f69 100644 --- a/nixos/doc/manual/release-notes/rl-2611.section.md +++ b/nixos/doc/manual/release-notes/rl-2611.section.md @@ -56,6 +56,8 @@ - `komodo` has been updated to the v2 release line (2.x). See the [upstream v1 → v2 upgrade guide](https://github.com/moghtech/komodo/releases/tag/v2.0.0). +- The `shell_interact()` function on interactive runs of NixOS VM tests has been deprecated. Use the SSH backdoor instead. + - `security.run0.enableSudoAlias` now uses the `run0-sudo-shim` instead of a shell-script to improve compatibility. - `security.run0.persistentAuth` options have been added to support persistent Authentication of session. Timeout configurable via `security.polkit.settings.Polkitd.ExpirationSeconds`. diff --git a/nixos/lib/test-driver/src/test_driver/machine/__init__.py b/nixos/lib/test-driver/src/test_driver/machine/__init__.py index 00876b0e7d1b..84eee2abb0f4 100644 --- a/nixos/lib/test-driver/src/test_driver/machine/__init__.py +++ b/nixos/lib/test-driver/src/test_driver/machine/__init__.py @@ -908,6 +908,7 @@ class QemuMachine(BaseMachine): return (rc, output.decode(errors="replace")) + @warnings.deprecated("Use the SSH backdoor instead") def shell_interact(self, address: str | None = None) -> None: """ Allows you to directly interact with the guest shell. This should