Work with linux containers
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
Returns whether the named container exists.
salt '*' lxc.exists name
Freeze the named container.
salt '*' lxc.freeze name
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] \
[start=(true|false)]
List defined containers (running, stopped, and frozen).
salt '*' lxc.list
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