Control Linux Containers via Salt
depends: | lxc execution module |
---|
Wrapper for using lxc.init in saltcloud compatibility mode
path to the container parent default: /var/lib/lxc (system default)
New in version 2015.8.0.
Returns the host for a container.
path to the container parent default: /var/lib/lxc (system default)
New in version 2015.8.0.
salt-run lxc.find_guest name
Return a dict of hosts and named guests
path to the container parent default: /var/lib/lxc (system default)
New in version 2015.8.0.
Freeze the named container
path to the container parent default: /var/lib/lxc (system default)
New in version 2015.8.0.
salt-run lxc.freeze name
Returns information about a container.
path to the container parent default: /var/lib/lxc (system default)
New in version 2015.8.0.
salt-run lxc.info name
Initialize a new container
salt-run lxc.init name host=minion_id [cpuset=cgroups_cpuset] \ [cpushare=cgroups_cpushare] [memory=cgroups_memory] \ [template=lxc_template_name] [clone=original name] \ [profile=lxc_profile] [network_proflile=network_profile] \ [nic=network_profile] [nic_opts=nic_opts] \ [start=(true|false)] [seed=(true|false)] \ [install=(true|false)] [config=minion_config] \ [snapshot=(true|false)]
path to the container parent default: /var/lib/lxc (system default)
New in version 2015.8.0.
cgroups memory limit, in MB
Changed in version 2015.5.0: If no value is passed, no limit is set. In earlier Salt versions, not passing this value causes a 1024MB memory limit to be set, and it was necessary to pass memory=0
to set no limit.
Network profile to use for the container
New in version 2015.5.2.
Deprecated since version 2015.5.0: Use network_profile
instead
Extra options for network interfaces. E.g.:
{"eth0": {"mac": "aa:bb:cc:dd:ee:ff", "ipv4": "10.1.1.1", "ipv6": "2001:db8::ff00:42:8329"}}
List defined containers (running, stopped, and frozen) for the named (or all) host(s).
path to the container parent default: /var/lib/lxc (system default)
New in version 2015.8.0.
salt-run lxc.list [host=minion_id]
Purge the named container and delete its minion key if present. WARNING: Destroys all data associated with the container.
path to the container parent default: /var/lib/lxc (system default)
New in version 2015.8.0.
salt-run lxc.purge name
Start the named container.
path to the container parent default: /var/lib/lxc (system default)
New in version 2015.8.0.
salt-run lxc.start name
Stop the named container.
path to the container parent default: /var/lib/lxc (system default)
New in version 2015.8.0.
salt-run lxc.stop name
Unfreeze the named container
path to the container parent default: /var/lib/lxc (system default)
New in version 2015.8.0.
salt-run lxc.unfreeze name
© 2019 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltstack.com/en/latest/ref/runners/all/salt.runners.lxc.html