Achala Kumarai
Achala Kumarai

Reputation: 121

How to fix the read only error on lima vm

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

Upvotes: 12

Views: 11712

Answers (4)

farzam
farzam

Reputation: 749

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

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

Upvotes: 4

Dunick
Dunick

Reputation: 301

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

Upvotes: 15

Soerendip
Soerendip

Reputation: 9185

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

Upvotes: 0

ngeorger
ngeorger

Reputation: 43

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

Upvotes: 2

Related Questions