Open RoyNoymanW opened 1 year ago
After looking into this a bit more, it looks to be specific to 9p mounts. Setting mount type to 9p afterwards misbehaves if the VM was not created with 9p mount.
Im not sure about it because when running these commands:
colima delete colima start --memory 6 --cpu 4 --mount $HOME/Project_A:/Path_Project_A:w --mount-type 9p colima stop colima start --memory 6 --cpu 4 --mount $HOME/Project_B:/Path_Project_B:w --mount-type 9p
I get the same issue. Is it something that will be fixed or this is the expected behavior?
Ideally, switching mount types should be avoided.
It was enabled for flexibility purposes but considering it is not behaving as desired it makes more sense to prevent it. i.e. changing mount type would require resetting the VM.
Looking at the colima start --help, seems that 9p is the default behaviour so in the scenario I described, there's no mount types change.
--mount-type string volume driver for the mount (9p, sshfs, virtiofs) (default "9p")
But even when I mention the mount type from first place, its the same problem
I am having the same issue of not being able to change mounts after starting the VM unless I delete the VM; I am using virtiofs
mount type. I created the VM with this mount type and did not change it.
Description
Hey, We have couple of usages for running colima, for example:
colima start --memory 6 --cpu 4
colima start --memory 6 --cpu 4 --mount $HOME/a_project_directory:/a_path_in_container:w --mount-type 9p
The bug: Cant set a mount if sometime previously I started colima without a mount. Must use colima delete which clear a lot of cached resources.
An ls command output after the second start (with mount): colima:/$ ls -la
Version
Colima Version: 0.5.1 Lima Version: 0.14.2 Qemu Version: 7.2.0
Operating System
Output of
colima status
First run -
colima start --memory 6 --cpu 4
:Second run (after colima stop, without delete):
Reproduction Steps
colima start --memory 6 --cpu 4
)colima stop
colima start --memory 6 --cpu 4 --mount $HOME/a_project_directory:/a_path_in_container:w --mount-type 9p
Expected behaviour
The expected behavior is having the new mounted directory instead of the default (
/Users/
)Additional context
This can only be solved by running
colima delete
.One more thing that might be related: Its true to any 2 different mounts (here the first one is just the default one)