永久增加 podman 机器虚拟机中的 vm.max_map_count

发布于 2025-01-16 01:18:12 字数 472 浏览 2 评论 0原文

我正在尝试使用 podman 在我的 Mac m1 笔记本电脑上运行 Elasticsearch 映像。它将失败并显示以下消息:

错误:[1] 引导检查失败。在启动 Elasticsearch 之前,您必须解决以下 [1] 行中描述的要点。 [1] 的引导检查失败 [1]:最大虚拟内存区域 vm.max_map_count [65530] 太低,至少增加到 [262144]

我可以通过使用 ssh 进入 podman 机器 vm 并设置 vm 来临时解决这个问题。 max_map_count 与

sudo sysctl -w vm.max_map_count=262144

但是,如果我停止并重新启动 podman 机器 vm,该设置将恢复为默认 65530。

有没有办法永久设置 podman 机器 vm 的 vm.max_map_count?

I am trying to run the Elasticsearch image on my Mac m1 laptop using podman. It will fail with the message:

ERROR: [1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch.
bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

I can solve this temporarily by using ssh to enter the podman machine vm and setting vm.max_map_count with

sudo sysctl -w vm.max_map_count=262144

However, if I stop and restart the podman machine vm, the setting is back to the default 65530.

Is there a way to permanently set vm.max_map_count for the podman machine vm?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

_蜘蛛 2025-01-23 01:18:12

我最近也遇到过这个。您可能已经自己解决了这个问题,但如果没有的话。

要在启动时修改内核参数,只需添加一个条目,执行您的 sysctl 配置之一,它将在重新启动时应用。

# echo "vm.max_map_count = 262144" >> /etc/sysctl.d/99-sysctl.conf

I came across this recently too. You might have already sorted it out on your own, but if not.

To modify kernel parameters at boot just add an entry do one of your sysctl configs and it will be applied on reboot.

# echo "vm.max_map_count = 262144" >> /etc/sysctl.d/99-sysctl.conf
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文