MicroVM driver doesn't use system path to look for e2fsprogs

Open Beginner friendly
#3,400 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust

Research direction

Start in crates/openshell-driver-vm/src/rootfs.rs around line 1058 and inspect how candidate root directories are assembled. Reproduce on a Linux system with mke2fs or mkfs.ext4 installed under /sbin or /usr/sbin; done when the MicroVM driver locates the executable and creates the ext4 rootfs without requiring it in the user's PATH.

Written by the indexing model from the issue text.

Description

state:triage-needed

When trying to use the MicroVM sandbox driver on a Linux system, I get this error:

✗ Error: ProvisioningFailed: failed to create ext4 rootfs image from /home/username/.local/state/openshell/vm-driver/images/sandbox-bootstrap-rootfs-ext4-v3-openshell-0.0.116-sha256-aeef1c63f00e2913ea002ccb3aaf925f338b5c5d70e63576f0d95c16a138044e.staging-1789573222361-0/rootfs: mke2fs not found
/opt/homebrew/opt/e2fsprogs/sbin/mke2fs not found
/opt/homebrew/opt/e2fsprogs/bin/mke2fs not found
/usr/local/opt/e2fsprogs/sbin/mke2fs not found
/usr/local/opt/e2fsprogs/bin/mke2fs not found
mkfs.ext4 not found
/opt/homebrew/opt/e2fsprogs/sbin/mkfs.ext4 not found
/opt/homebrew/opt/e2fsprogs/bin/mkfs.ext4 not found
/usr/local/opt/e2fsprogs/sbin/mkfs.ext4 not found
/usr/local/opt/e2fsprogs/bin/mkfs.ext4 not found. Install e2fsprogs (mke2fs/mkfs.ext4) and retry

This is caused by the below section of code:

https://github.com/NVIDIA/OpenShell/blob/c502be9fd73c41bab25f0a88587b7a3d90c96b55/crates/openshell-driver-vm/src/rootfs.rs#L1058

/usr/sbin and/or /sbin should be added to the candidate root directories to resolve this, since most Linux systems will already have mke2fs installed in one of those locations. I recognise that many systems won't add /sbin and /usr/sbin to the $PATH of non-root users by default, so a explicit search path may be required.

Dominant language
Rust
Stars
8.7k
Forks
1.3k
Avg merge
2d 6h
Merged PRs (30d)
236

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA/OpenShell

All issues in NVIDIA/OpenShell

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.