Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/build-guest-artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ runs:
AZURELINUX_VERSION: ${{ steps.guest-versions.outputs.azurelinux-version }}
KERNEL_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'kernel/config-microvm', 'kernel/config-microvm.derived', 'kernel/patches/**', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py', 'scripts/nvx_tools/kconfig.py', 'scripts/nvx_tools/kernel_config.py', 'scripts/nvx_tools/kernel_features.py') }}
DEBUG_KERNEL_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'kernel/config-microvm', 'kernel/config-microvm-debug', 'kernel/patches/**', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py', 'scripts/nvx_tools/kconfig.py', 'scripts/nvx_tools/kernel_config.py', 'scripts/nvx_tools/kernel_features.py') }}
ALPINE_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'guest/common/**', 'guest/alpine/**', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py', 'scripts/nvx_tools/common.py', 'scripts/nvx_tools/elf.py', 'scripts/nvx_tools/guest_binaries.py', 'scripts/nvx_tools/guests.py') }}
ALPINE_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'guest/common/**', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py', 'scripts/nvx_tools/common.py', 'scripts/nvx_tools/elf.py', 'scripts/nvx_tools/guest_binaries.py', 'scripts/nvx_tools/guests.py') }}
UBUNTU_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'guest/common/**', 'guest/ubuntu/**', 'ubuntu/**', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py', 'scripts/nvx_tools/common.py', 'scripts/nvx_tools/elf.py', 'scripts/nvx_tools/guest_binaries.py', 'scripts/nvx_tools/guests.py', 'scripts/nvx_tools/ubuntu.py') }}
AZURELINUX_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'guest/common/**', 'azurelinux/**', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/azurelinux.py', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py', 'scripts/nvx_tools/common.py', 'scripts/nvx_tools/elf.py', 'scripts/nvx_tools/guest_binaries.py', 'scripts/nvx_tools/guests.py') }}
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/actions/check-quality/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ runs:
python -m ruff check scripts .github/specula
python -m compileall -q .github/specula
${SHELLCHECK} --shell=sh \
guest/common/init guest/alpine/nvx-container-enter \
guest/alpine/nvx-container-launch \
guest/common/init \
guest/common/nvx-hostmount guest/common/nvx-identity-probe \
guest/common/nvx-sandbox-smoke guest/common/nvx-snapshot \
guest/common/nvx-virtio-restore-probe \
Expand All @@ -53,8 +52,7 @@ runs:
python -m pyright --pythonplatform Windows
python -m ruff format --check scripts .github/specula
${SHFMT} -d -ln posix -i 4 -ci \
guest/common/init guest/alpine/nvx-container-enter \
guest/alpine/nvx-container-launch \
guest/common/init \
guest/common/nvx-hostmount guest/common/nvx-identity-probe \
guest/common/nvx-sandbox-smoke guest/common/nvx-snapshot \
guest/common/nvx-virtio-restore-probe \
Expand Down
1 change: 0 additions & 1 deletion SOURCE-MANIFEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"minirootfs_sha256": "41f73e3cf5fa919b8aa5ca6b30dc48f0da2720776d7423e2a7748211456fe081",
"guest_sources": [
"guest/common",
"guest/alpine",
"nvx-rs",
"rust-toolchain.toml"
],
Expand Down
8 changes: 2 additions & 6 deletions doc/project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ nvx/
| `-- copilot-instructions.md Repository-wide Copilot instructions
|-- .vscode/settings.json Shared VS Code settings
|-- guest/ Guest-owned scripts
| |-- common/ Shared init, agent, snapshot, and probe scripts
| |-- alpine/ Alpine-control container entry scripts
| |-- common/ Shared init, snapshot, and probe scripts
| `-- ubuntu/ Ubuntu interactive-shell startup policy
|-- ubuntu/
| `-- packages.lock.json Exact supplemental Ubuntu binary package closure
Expand Down Expand Up @@ -234,10 +233,7 @@ starts an initramfs program named by `nvx_exec=`, `nvx-init` for a layered root,
workload named by `nvx_entrypoint=`, a virtio restore probe for benchmark
profiling, or the interactive shell. On an interactive boot, `init` prints a
stable distribution boot marker for Alpine and Azure Linux, and
`guest/ubuntu/nvx-bashrc` prints Ubuntu's. `guest/alpine` contains
the container launch and entry scripts that only the Alpine initramfs installs;
the entry script stages Alpine's musl loader and `setpriv` inside the
workload's root.
`guest/ubuntu/nvx-bashrc` prints Ubuntu's.

The remaining common helpers handle shutdown, virtio-fs mounting, snapshot
preparation, and the guest side of the time ABI. The Rust guest binaries
Expand Down
9 changes: 3 additions & 6 deletions doc/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ Run all lint and formatting checks before submitting a change:
```bash
python3 -m ruff check scripts .github/specula
shellcheck --shell=sh \
guest/common/init guest/alpine/nvx-container-enter \
guest/alpine/nvx-container-launch \
guest/common/init \
guest/common/nvx-hostmount guest/common/nvx-identity-probe \
guest/common/nvx-sandbox-smoke \
guest/common/nvx-snapshot guest/common/nvx-virtio-restore-probe \
Expand All @@ -228,8 +227,7 @@ python3 -m pyright --pythonplatform Linux
python3 -m pyright --pythonplatform Windows
python3 -m ruff format --check scripts .github/specula
shfmt -d -ln posix -i 4 -ci \
guest/common/init guest/alpine/nvx-container-enter \
guest/alpine/nvx-container-launch \
guest/common/init \
guest/common/nvx-hostmount guest/common/nvx-identity-probe \
guest/common/nvx-sandbox-smoke \
guest/common/nvx-snapshot guest/common/nvx-virtio-restore-probe \
Expand Down Expand Up @@ -273,8 +271,7 @@ Apply the configured Python and POSIX shell formatters with:
```bash
python3 -m ruff format scripts .github/specula
shfmt -w -ln posix -i 4 -ci \
guest/common/init guest/alpine/nvx-container-enter \
guest/alpine/nvx-container-launch \
guest/common/init \
guest/common/nvx-hostmount guest/common/nvx-identity-probe \
guest/common/nvx-sandbox-smoke \
guest/common/nvx-snapshot guest/common/nvx-virtio-restore-probe \
Expand Down
83 changes: 0 additions & 83 deletions guest/alpine/nvx-container-enter

This file was deleted.

19 changes: 0 additions & 19 deletions guest/alpine/nvx-container-launch

This file was deleted.

27 changes: 2 additions & 25 deletions scripts/nvx_tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -792,23 +792,7 @@ def _install_guest_files(
root / "sbin" / "nvx-virtio-restore-probe",
),
]
if descriptor.sandbox_control:
alpine = BuildConstants.REPO_ROOT / AlpineBuildConstants.GUEST_DIRECTORY
scripts.extend(
[
(
"nvx-container-enter",
alpine / "nvx-container-enter",
root / "sbin" / "nvx-container-enter",
),
(
"nvx-container-launch",
alpine / "nvx-container-launch",
root / "sbin" / "nvx-container-launch",
),
]
)
else:
if not descriptor.sandbox_control:
scripts.append(
(
"nvx-bashrc",
Expand Down Expand Up @@ -889,14 +873,7 @@ def _guest_customization_files(descriptor: GuestDescriptor) -> tuple[Path, ...]:
)
if path.is_file()
)
alpine = tuple(
path
for path in sorted(
(BuildConstants.REPO_ROOT / AlpineBuildConstants.GUEST_DIRECTORY).iterdir()
)
if path.is_file()
)
return (*common, *alpine, *guest_binary_source_files())
return (*common, *guest_binary_source_files())


def build_initramfs(config: InitramfsBuildConfig) -> None:
Expand Down
6 changes: 1 addition & 5 deletions scripts/nvx_tools/build_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,7 @@ class GuestRustBuildConstants:

class AlpineBuildConstants:
GUEST_NAME: Final = "alpine"
GUEST_DIRECTORY: Final = Path("guest") / GUEST_NAME
GUEST_SOURCE_DIRECTORIES: Final = (
BuildConstants.COMMON_GUEST_DIRECTORY,
GUEST_DIRECTORY,
)
GUEST_SOURCE_DIRECTORIES: Final = (BuildConstants.COMMON_GUEST_DIRECTORY,)
DISTRIBUTION: Final = "Alpine Linux"
VERSION: Final = "3.24.1"
BRANCH: Final = "v3.24"
Expand Down
4 changes: 0 additions & 4 deletions scripts/nvx_tools/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -1643,10 +1643,6 @@ def verify_source_tree() -> None:
/ "0002-microvm-hvc-xe9.patch": "xe9 HVC patch",
BuildConstants.REPO_ROOT / "kernel" / "COPYING-LINUX": "Linux copyright notice",
BuildConstants.REPO_ROOT / "guest" / "common" / "init": "common guest init",
BuildConstants.REPO_ROOT
/ "guest"
/ "alpine"
/ "nvx-container-enter": "Alpine sandbox container helper",
UbuntuBuildConstants.PACKAGE_LOCK: "Ubuntu supplemental package lock",
OpenVMMBuildConstants.DIRECTORY / "Cargo.toml": "initialized OpenVMM submodule",
}
Expand Down
2 changes: 0 additions & 2 deletions scripts/test_nvx_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,6 @@ def _write_release_fixture(
"minirootfs_sha256": AlpineBuildConstants.MINIROOTFS_SHA256,
"guest_sources": [
"guest/common",
"guest/alpine",
*GuestRustBuildConstants.SOURCE_PATHS,
],
"package_manifests": ["build/initramfs.cpio.gz.packages.json"],
Expand Down Expand Up @@ -7511,7 +7510,6 @@ def select(*outputs: str) -> ci.CiChanges:
(("kernel/config-microvm",), microvm_and_benchmarks, None),
(("kernel/patches/0001-example.patch",), microvm_and_benchmarks, None),
(("guest/common/init",), microvm_and_benchmarks, None),
(("guest/alpine/nvx-container-enter",), microvm_and_benchmarks, None),
(
(".github/actions/build-guest-artifacts/action.yml",),
microvm_and_benchmarks,
Expand Down
Loading