Vzctl

Manage OpenVZ containers with vzctl.

vzctl.create

Create OpenVZ containers.

vzctl.create(ctid, template=None)
  • ctid: CTID of the container to create

vzctl.delete

Delete OpenVZ containers.

vzctl.delete(ctid)
  • ctid: CTID of the container to delete

vzctl.mount

Mount OpenVZ container filesystems.

vzctl.mount(ctid)
  • ctid: CTID of the container to mount

vzctl.restart

Restart OpenVZ containers.

vzctl.restart(ctid, force=False)
  • ctid: CTID of the container to restart

  • force: whether to force container start

vzctl.set

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, eg hostname='my-host.net' becomes --hostname my-host.net.

vzctl.start

Start OpenVZ containers.

vzctl.start(ctid, force=False)
  • ctid: CTID of the container to start

  • force: whether to force container start

vzctl.stop

Stop OpenVZ containers.

vzctl.stop(ctid)
  • ctid: CTID of the container to stop

vzctl.unmount

Unmount OpenVZ container filesystems.

vzctl.unmount(ctid)
  • ctid: CTID of the container to unmount