Control Linux Containers via Salt
depends: | lxc package for distribution |
---|
Create a new container.
salt 'minion' lxc.create name [config=config_file] \
[profile=profile] [template=template_name] \
[backing=backing_store] [ vgname=volume_group] \
[size=filesystem_size] [options=template_options]
Destroy the named container. WARNING: Destroys all data associated with the container.
salt '*' lxc.destroy name [stop=(true|false)]
Returns whether the named container exists.
salt '*' lxc.exists name
Freeze the named container.
salt '*' lxc.freeze name
Returns the value of a cgroup parameter for a container.
salt '*' lxc.get_parameter name parameter
Returns information about a container.
salt '*' lxc.info name
Initialize a new container.
salt 'minion' lxc.init name [cpuset=cgroups_cpuset] \
[cpushare=cgroups_cpushare] [memory=cgroups_memory] \
[nic=nic_profile] [profile=lxc_profile] \
[nic_opts=nic_opts] [start=(true|false)] \
[seed=(true|false)] [install=(true|false)] \
[config=minion_config]
List defined containers (running, stopped, and frozen).
salt '*' lxc.list
Set the value of a cgroup parameter for a container.
salt '*' lxc.set_parameter name parameter value
Start the named container.
salt '*' lxc.start name
Returns the state of a container.
salt '*' lxc.state name
Stop the named container.
salt '*' lxc.stop name
Unfreeze the named container.
salt '*' lxc.unfreeze name
Current Salt release: 2014.1.6
Docs for previous releases on salt.rtfd.org.