如何修复 Lima 虚拟机上的只读错误

发布于 2025-01-16 03:34:41 字数 634 浏览 2 评论 0原文

尝试为 docker 创建本地存储库时出现只读文件系统错误。 [1] 我在 Macbook Air M1(苹果芯片组)上使用了这个安装的 lima [2]

chown: changing ownership of 'oracle-19c/.DS_Store': Read-only file system
chown: changing ownership of 'oracle-19c/oradata': Read-only file system
chown: changing ownership of 'oracle-19c/': Read-only file system

任何人都知道如何解决这个问题。我通过选择相关文件夹来更改使用“getInfor”选项的读写权限。

[1] https://registry.hub.docker.com/r/doctorkirk/ oracle-19c [2] https://github.com/lima-vm/lima

Getting read only file system error when try to create local repository for docker. [1]
I used this installed lima [2] over Macbook Air M1 (Apple chipset)

chown: changing ownership of 'oracle-19c/.DS_Store': Read-only file system
chown: changing ownership of 'oracle-19c/oradata': Read-only file system
chown: changing ownership of 'oracle-19c/': Read-only file system

Any one know how to resolve this. I have change the permission to read write with 'getInfor' option by selecting the relevant folder.

[1] https://registry.hub.docker.com/r/doctorkirk/oracle-19c
[2] https://github.com/lima-vm/lima

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

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

发布评论

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

评论(4

简单气质女生网名 2025-01-23 03:34:41

默认情况下,主页是只读的。
您可以尝试在 /tmp/lima 上写入,这应该可行。

要使主路径和其他路径默认可写,请执行以下操作:

  1. 编辑文件并在挂载部分下设置 writable: true

    $ vim ~/.lima/default/lima.yaml
    
  2. 然后重新启动lima

    limactl list #这列出了所有正在运行的虚拟机 
    limactl stop 默认#或机器名称 
    limactl start default #或机器名称 
    

更多信息: https://github.com/lima-vm/lima/blob/41fd9cc6a1e2bac73666e1f2b11604c7c42227dc/pkg/limayaml/default.TEMPLATE.yaml#L33-L41

By default the home is read only.
You may try write on /tmp/lima, this should work.

To make home and other paths writeable by default, do the following:

  1. Edit the file and set writable: true under mount section

    $ vim ~/.lima/default/lima.yaml
    
  2. Then restart lima

    limactl list #this lists all running vms 
    limactl stop default #or name of the machine 
    limactl start default #or name of the machine 
    

Further infos: https://github.com/lima-vm/lima/blob/41fd9cc6a1e2bac73666e1f2b11604c7c42227dc/pkg/limayaml/default.TEMPLATE.yaml#L33-L41

携君以终年 2025-01-23 03:34:41

正如@Dunick 回答的那样,我们应该为每个安装的卷添加可写功能到 lima.yaml

 - location: "~"
 writable: true
 - location: "/tmp/lima"
 writable: true

As @Dunick answered, We should add a writable feature to lima.yaml for each mounted volumes

 - location: "~"
 writable: true
 - location: "/tmp/lima"
 writable: true
清旖 2025-01-23 03:34:41

就我而言,使用 macOS Sonoma,如果你想做得更快,但有点不安全:

# Bash or zsh
limactl edit your-instance-name --mount-writable

In my case, using macOS Sonoma, and if you want to do it faster, but a bit insecure:

# Bash or zsh
limactl edit your-instance-name --mount-writable
雨后彩虹 2025-01-23 03:34:41

为了能够写入您的主目录,您需要授予 lima 对您的主目录的写入权限。

vi ~/.lima/<your-vm-name>/lima.yml

并更改

mounts:
  - location: "~"
  - location: "/tmp/lima"
    writable: true

mounts:
  - location: "~"
    writeable: true
  - location: "/tmp/lima"
    writable: true

To be able to write to your home directory, you need to grant lima write permissions to your home directory.

vi ~/.lima/<your-vm-name>/lima.yml

and change

mounts:
  - location: "~"
  - location: "/tmp/lima"
    writable: true

to

mounts:
  - location: "~"
    writeable: true
  - location: "/tmp/lima"
    writable: true
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文