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

Using vzctl to suspend and resume a container


The following set of commands will use vzctl to suspend and resume a container. When you use vzctl to suspend a container, it creates a save point of the container to a dump file. You can then use vzctl to resume the container to the saved point it was in before the container was suspended.

Suspending a container

To suspend a container, run the following command:

vzctl suspend 101

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

Resuming a container

To resume a container, run the following command:

vzctl resume 101

In the previous example, we used the vzctl command with the resume option to resume operations on the container 101.

Note

In order to get resume or suspend to work, you may need to enable several kernel modules by running the following:

modprobe vzcpt
modprobe vzrst

Destroying a container

You can destroy a container that you created by using the destroy argument with vzctl. This will...

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 €18.99/month. Cancel anytime