Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
OpenVZ Essentials

You're reading from   OpenVZ Essentials Create and administer virtualized containers on your server using the robust OpenVZ

Arrow left icon
Product type Paperback
Published in Nov 2014
Publisher
ISBN-13 9781782167327
Length 110 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Mark Furman Mark Furman
Author Profile Icon Mark Furman
Mark Furman
Arrow right icon
View More author details
Toc

The vzctl command

The next command that we are going to cover is the vzctl command. This is the primary command that you are going to use when you want to perform tasks with the containers on the node. The initial functions of the vzctl command that we will go over are how to start, stop, and restart the container.

Starting a container

We use vzctl to start a container on the node. To start a container, run the following command:

vzctl start 101

Starting Container ...
Setup slm memory limit
Setup slm subgroup (default)
Setting devperms 20002 dev 0x7d00
Adding IP address(es) to pool:
Adding IP address(es): 192.168.2.101
Hostname for Container set: gotham.example.com
Container start in progress...

In the previous example, we used the vzctl command with the start option to start the container 101.

Stopping a container

To stop a container, run the following command:

vzctl stop 101
Stopping container ...
Container was stopped
Container is unmounted

In the previous example, we used the vzctl command...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime