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

未关闭 适合新手
#3,400 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust

调研方向

从 crates/openshell-driver-vm/src/rootfs.rs 第 1058 行附近开始,检查候选根目录是如何组装的。在 /sbin 或 /usr/sbin 下安装了 mke2fs 或 mkfs.ext4 的 Linux 系统上复现;当 MicroVM 驱动程序能够定位可执行文件并创建 ext4 rootfs,且不要求它位于用户的 PATH 中时,即完成。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Rust
星标
8.7k
派生
1.3k
平均合并
2 天 7 小时
30 天内合并 PR
243

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NVIDIA/OpenShell 的其他 Issue

查看 NVIDIA/OpenShell 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。