-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Spike] Setting directory for .crc folder #3966
Comments
If we change the crc home dir, we should also do automated migration of the config file to the new location. I think XDG base directory as the default and allowing users to override with $CRC_HOME_DIR both should be added |
/assign |
Please correct me if I am wrong -- The
It is difficult to keep track of all the values the variable can take and migrating over and over does not seem like a feasible idea. (I made a draft PR for this) My suggestion is to use crc config to store the path of the .crc directory which can be set and unset using the |
In this case also user can do following
One thing we can do as part config option is have a callback function which check if current set directory already have content or not, if it have let user know and ask for override otherwise carry on with provided option? |
I was thinking we could migrate from the existing base directory (if nothing is set, we would use the default |
I'd first make that work well before thinking too much about corner cases (such has the user changing the base directory while using crc). Though a callback would make sense to check if there's already a configured directory. This callback could offer the user to migrate. But this is starting to get complicated ^^ The suggested approach will not solve the initial request to use the XDG directory structure, where we'd need to use |
Which complicates deployment on platforms other than Linux, so this might not have been the solution to begin with. The question that has not been answered is the 'Why' is this requested?
|
For my case it was large files/storage requirement not available on the default location, currently I just run it from my fork with this one small change and this works for me commit |
are you on Linux or MacOS? Would a re-location with a symlink have worked? The issue is that we use a standardized location to ensure the VM files are always in the same location; if we allow this to be configured, there can be a inconsistency; the VMM already has a registration with a VM called 'crc', while the executable sees nothing in it's own The commit you show is an I would say:
|
I run it on Windows 10. |
On windows junctions might be able to do this, or a remapped location for a disk with Disk Manager. But be aware, on Windows you can NOT store VM disk files on anything that is a "Removable Media"; USB or disks that are dynamic.
But most likely not with the XDG value, as this is unknown on a Windows system:
Note: in your commit you check for an empty value, so that would be ignored. However, if this is not possible on the platform, best to use |
As commented on the Spike PR by @vyasgun: The objective of this spike was to test whether the crc config can be used to configure a custom .crc location. The conclusion is that it is not something that will solve the problem and could potentially cause unexpected issues in certain edge cases:
Next steps:
|
. The original request for using XDG base directory env variables in certain cases may be solved using this commit: I think if this is something user want then we can set |
Is there consideration to use XDG base directory, or maybe using some other named env variable that would allow to set where .crc folder should be?
From what i saw issue 220 about XDG was closed.
The text was updated successfully, but these errors were encountered: