Vzctl Operations¶
Manage OpenVZ containers with vzctl
.
Facts used in these operations: vzctl.OpenvzContainers.
vzctl.create
¶
Stateless operation
This operation will always execute commands and is not idempotent.
Create OpenVZ containers.
vzctl.create(ctid, template=None)
- ctid: CTID of the container to create
vzctl.delete
¶
Stateless operation
This operation will always execute commands and is not idempotent.
Delete OpenVZ containers.
vzctl.delete(ctid)
- ctid: CTID of the container to delete
vzctl.mount
¶
Stateless operation
This operation will always execute commands and is not idempotent.
Mount OpenVZ container filesystems.
vzctl.mount(ctid)
- ctid: CTID of the container to mount
vzctl.restart
¶
Stateless operation
This operation will always execute commands and is not idempotent.
Restart OpenVZ containers.
vzctl.restart(ctid, force=False)
- ctid: CTID of the container to restart
- force: whether to force container start
vzctl.set
¶
Stateless operation
This operation will always execute commands and is not idempotent.
Set OpenVZ container details.
vzctl.set(ctid, save=True)
- ctid: CTID of the container to set
- save: whether to save the changes
- settings: settings/arguments to apply to the container
- Settings/arguments:
- these are mapped directly to
vztctl
arguments, eghostname='my-host.net'
becomes--hostname my-host.net
.
vzctl.start
¶
Stateless operation
This operation will always execute commands and is not idempotent.
Start OpenVZ containers.
vzctl.start(ctid, force=False)
- ctid: CTID of the container to start
- force: whether to force container start
vzctl.stop
¶
Stateless operation
This operation will always execute commands and is not idempotent.
Stop OpenVZ containers.
vzctl.stop(ctid)
- ctid: CTID of the container to stop
vzctl.unmount
¶
Stateless operation
This operation will always execute commands and is not idempotent.
Unmount OpenVZ container filesystems.
vzctl.unmount(ctid)
- ctid: CTID of the container to unmount