colima
colima copied to clipboard
Restart not behaving as expected
Description
It would appear as if the colima restart command doesn't behave as I would expect/imagine but maybe it's like that by design in my specific scenario.
I am running my development environment using a virtual disk image to store my code. I understand that this is sort of an edge case and the way to make it work is by explicitly mounting the virtual disk at start up which is what I did but I did it wrong and my workflow to fix it didn't work.
Version
colima version 0.7.5 git commit: 1588c066b9ab9dae8205ef265929c7eb43dca473
runtime: docker arch: aarch64 client: v27.2.1 server: v27.1.1 limactl version 0.23.2 qemu-img version 9.1.0 Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers
Operating System
- [ ] macOS Intel <= 13 (Ventura)
- [ ] macOS Intel >= 14 (Sonoma)
- [ ] Apple Silicon <= 13 (Ventura)
- [X] Apple Silicon >= 14 (Sonoma)
- [ ] Linux
Output of colima status
INFO[0000] colima is running using macOS Virtualization.Framework INFO[0000] arch: aarch64 INFO[0000] runtime: docker INFO[0000] mountType: virtiofs INFO[0000] socket: unix:///Users/username/.colima/default/docker.sock
Reproduction Steps
- Start colima with the following command
~ colima start --cpu X --memory X --vm-type=vz --vz-rosetta --mount-type=virtiofs --mount=/Volumes/VirtualDisk
- Realise that the disk is actually mounted as read only
- Modify the mounts section in the
~/.colima/default/colima.yamlfile to update thewritableoption of the mounted point totrue - Run the command
colima restart - Realise that the volume is still mounted as readonly
Expected behaviour
I would expect the colima restart to pick up the updated configuration from the file and apply it accordingly
Additional context
My only way out of this was to run a colima delete and then restart it with the write option flag at start up:
~ colima start --cpu X --memory X --vm-type=vz --vz-rosetta --mount-type=virtiofs --mount=/Volumes/VirtualDisk:w
For now, the restart command does not reload the configuration. You would need to do a stop/start for that behaviour.