colima icon indicating copy to clipboard operation
colima copied to clipboard

Restart not behaving as expected

Open bc-debo opened this issue 1 year ago • 1 comments

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

  1. Start colima with the following command
~ colima start --cpu X --memory X --vm-type=vz --vz-rosetta --mount-type=virtiofs --mount=/Volumes/VirtualDisk
  1. Realise that the disk is actually mounted as read only
  2. Modify the mounts section in the ~/.colima/default/colima.yaml file to update the writable option of the mounted point to true
  3. Run the command colima restart
  4. 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

bc-debo avatar Sep 11 '24 22:09 bc-debo

For now, the restart command does not reload the configuration. You would need to do a stop/start for that behaviour.

abiosoft avatar Oct 01 '24 13:10 abiosoft