Using vzlist
The vzlist
command is used to list the containers on a node. When you run vzlist
on its own without any options, it will only list the containers that are currently running on the system:
vzlist
In the previous example, we used the vzlist
command to list the containers that are currently running on the server.
Listing all the containers on the server
If you want to list all the containers on the server instead of just the containers that are currently running on the server, you will need to add -a
after vzlist
. This will tell vzlist
to include all of the containers that are created on the node inside its output:
vzlist -a
In the previous example, we used the vzlist
command with an -a
flag to tell vzctl
that we want to list all of the containers that have been created on the server.