lxc-create should provide you with a default config file if not specified one
Bug #823862 reported by
Marc Cluet
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
lxc-create fails silently if no config file is specified, and finding a sane one is not an easy task.
It would be extremely useful if lxc-create or a wrapper script could provide a default sane config.
To post a comment you must log in.
Thanks for taking the time to submit this bug.
It would be nice if we could provide a default config, but we can't do that until we guarantee that we have a known network setup. Since wireless cannot be bridged and we haven't decided whether we are willing to depend on libvirt-bin, this would have to mean:
1. create bridge lxcbr0
2. set up NAT from lxcbr0 to default route
3. choose a private subnet and run dnsmasq on lxcbr0
Note lxc-create does not fail silently - it actually produces a loud warning, provides two sample config files, and demands input before continuing. Witness:
root@sergelap: /sys/fs/ cgroup/ cpu# lxc-create -t ubuntu -n n1
Warning:
-------
Usually the template option is called with a configuration
file option too, mostly to configure the network.
eg. lxc-create -n foo -f lxc.conf -t debian
The configuration file is often:
lxc.network. type=macvlan link=eth0 flags=up
lxc.network.
lxc.network.
or alternatively:
lxc.network. type=veth link=br0 flags=up
lxc.network.
lxc.network.
For more information look at lxc.conf (5)
At this point, I assume you know what you do.
Press <enter> to continue ...
Note also that sample configurations are offered with the package.
I'm going to mark this low priority, rather than wishlist, because I do believe such a default would help tremendously with adoption by new users.