Skip to content

vzctl

vzctl

Manage OpenVZ containers with vzctl.

create(ctid, template=None)

Create OpenVZ containers.

  • ctid: CTID of the container to create

delete(ctid)

Delete OpenVZ containers.

  • ctid: CTID of the container to delete

mount(ctid)

Mount OpenVZ container filesystems.

  • ctid: CTID of the container to mount

restart(ctid, force=False)

Restart OpenVZ containers.

  • ctid: CTID of the container to restart
  • force: whether to force container start

set(ctid, save=True, **settings)

Set OpenVZ container details.

  • 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.

start(ctid, force=False)

Start OpenVZ containers.

  • ctid: CTID of the container to start
  • force: whether to force container start

stop(ctid)

Stop OpenVZ containers.

  • ctid: CTID of the container to stop

unmount(ctid)

Unmount OpenVZ container filesystems.

  • ctid: CTID of the container to unmount