You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using colima clone command to move profiles around. While doing so, encountered the following error:
colima clone default clone
INFO[0000] preparing to clone colima...
INFO[0000] cloning virtual machine...
INFO[0029] copying config...
cp: /Users/j/.colima/_lima/colima is a directory (not copied).
FATA[0029] error copying VM config: exit status 1
Looking at the code, it appears the cp command is called on two directories, but without a -r flag to recurse the source directory. This causes the failure above. The code in question is:
So a recursive -r flag on the subsequent copy in Line 66 might not be the proper way to fix this, as it would copy for a second time the files copied in lines 26-52.
The second cp could copy specific named files like the prior copy. Or could do a recursive copy but delete any unwanted files such as *.log and *.sock.
I haven't created a PR because I do not have a confirmed way to test the code on my platform (MacOS via Homebrew), but could try if I received some guidance on how and this would speed up a fix.
Thanks,
Jason
The text was updated successfully, but these errors were encountered:
Meant to include, I ran a cp -r src-dir tgt-dir manually after the clone command failed, and was able to use the cloned profile. So completing the second cp appears to resolve the only failed step in the clone.
Using
colima clone
command to move profiles around. While doing so, encountered the following error:Looking at the code, it appears the
cp
command is called on two directories, but without a-r
flag to recurse the source directory. This causes the failure above. The code in question is:colima/cmd/clone.go
Line 66 in 73732ae
Now, in the preceding code, the target directory is created and specific files are copied:
colima/cmd/clone.go
Lines 26 to 52 in 73732ae
So a recursive
-r
flag on the subsequent copy in Line 66 might not be the proper way to fix this, as it would copy for a second time the files copied in lines 26-52.The second
cp
could copy specific named files like the prior copy. Or could do a recursive copy but delete any unwanted files such as*.log
and*.sock
.I haven't created a PR because I do not have a confirmed way to test the code on my platform (MacOS via Homebrew), but could try if I received some guidance on how and this would speed up a fix.
Thanks,
Jason
The text was updated successfully, but these errors were encountered: