I know I can feed an initial configuration to lxd via ‘lxc init ----preseed.’ But is there a way to dump the current configuration as yaml? What is the best way to get the current configuration other than using the lxc network or storage etc. commands or browse the SQLite database itself?
There isn’t right now, I think it’d be a valuable thing to add as a flag to
lxc info, something like
lxc info --preseed could spit out a preseed based on what you have right now.
It obviously wouldn’t be guaranteed to work as-is, but would be a good starting point for sure.
@freeekanayaka is that something you’d be interested to contribute when you have a few spare cycles?
I would be very interested in this as I’m trying to figure out how to use the juju charm with --config lxd-preseed option
juju deploy ch:lxd --num-units 1 --config snap-channel="5.0/stable" --config lxd-listen-https=true --config lxd-listen-metrics=true --config lxd-preseed=???
I don’t look forward to trial and error this process…
current config is yaml , what do you mean?
I found the “lxd init --dump” which was helpful. I guess this issue might be outdated…
This only for the profile. What I refer to is the “lxd init” preseed which is more than just the default profile.
lxd init --dump looks great but it’s missing a list of custom storage volumes.