Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
OpenVZ Essentials
OpenVZ Essentials

OpenVZ Essentials: Create and administer virtualized containers on your server using the robust OpenVZ

eBook
€8.99 €14.99
Paperback
€18.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

OpenVZ Essentials

Chapter 1. Installing OpenVZ

In this chapter, we are going to explain what OpenVZ is and the system requirements we need to install OpenVZ on our system. Then we are going to walk through configuring yum to use the OpenVZ repo and install the vzkernel.

Finally, we are going to talk about installing additional packages to help manage containers on the node—vzctl to create, configure, and remove containers and vzquota to manage quotas.

What is OS-level virtualization?

OS-level virtualization is a type of virtualization that is kernel-based. It depends on a host OS to manage, create, and configure containers on the host server through a specialized kernel.

Another type of virtualization is bare bones virtualization; this type of virtualization differs from the OS-level virtualization by providing a small OS that is booted instead of a host OS such as Windows or Linux. This type of virtualization is used to reduce the resource overhead on the host OS.

What is OpenVZ?

OpenVZ is a OS-level virtualization software that allows you to run isolated, secured containers that use a modified version of the Linux kernel to split the physical server to allow you to run multiple isolated containers, sometimes also called virtual private servers, that act as their own independent servers and have their own properties that are:

  • Root account
  • Users
  • Filesystem and quotas
  • Processes
  • Memory limits
  • CPU quotas
  • Network configuration

Each of the containers shares the same hardware and resources from a single physical server called a node.

The operating systems on the server cannot be mixed; they must run the same operating system as the physical server. Since you are using Linux for OpenVZ, you can only install Linux containers, although you can use different distributions of Linux for each of your containers.

System requirements

For this book, you are going to use CentOS 6.5 as the distribution OS in all the examples. You can also follow RHEL6.5, Scientific Linux, or Debian 7 along with this book. At the time of this writing, the OpenVZ kernel version that is available is vzkernel 2.6.32 and will be the OpenVZ kernel that is used throughout the rest of this book.

For hardware specifications, the following are recommended:

  • IBM PC compatible computer
  • Intel Core i7, Xeon E7, and AMD Opteron
  • A minimum of 128 MB of RAM; 2 GB or more is recommended
  • A hard drive with at least 80 GB of space
  • A 10/100/1000 network card

For network specifications, the following are recommended:

  • A local area network for the server
  • A valid Internet connection
  • A valid IP address for the server
  • A valid IP address for each container

Note

Please note that the previously listed requirements are recommended to get you started with learning how to use OpenVZ. On a live server, you will want to increase the RAM and CPU as the number of your containers grows on the server. It is not unusual to see a server with three to four CPUs with two or more cores at 3.4 GHz per core and 90 GB of RAM.

The disk partition scheme

You will create a / partition for Centos 6.5 and a swap partition to manage the virtual memory on the server and a /vz partition to store the containers that are created on the server.

When installing your Linux distribution, you will want to configure your disk partition scheme to the following:

Partition

Size

/

4-12 GB

Swap

Twice the amount of RAM

/vz

Rest of the space on the drive

The yum configuration

First, we will start by adding the OpenVZ repo to the repos.d directory under /etc/yum/; you can do this by running the following command:

wget -P /etc/yum.repos.d/ http://ftp.openvz.org/openvz.repo

In the previous example, we use the wget command to download the openvz.repo file from ftp.openvz.org to install openvz.repo on your server.

Then, import the OpenVZ GPG key used to sign the packages by running the following command:

rpm --import http://ftp.openvz.org/RPM-GPG-Key-OpenVZ

In the previous example, we use the rpm command to import the GPG key for openvz.repo to validate the package as a signed package.

Installing vzkernel

Vzkernel is the core of OpenVZ; it is essentially a modified version of the Linux kernel that allows you to run containers on your server.

To install vzkernel, you will want to run the following command:

yum install vzkernel

In the previous example, we use the yum command with the install option to install vzkernel on our server.

Installing vzctl and vzquota

In this section, we are going to go over the additional tools that are needed to install the vzkernel. The tools are as follows:

  • vzctl: This is an OpenVZ utility tool that allows you to directly interface with the containers. You can use this utility to start, stop, suspend, destroy, and create containers. We will go over this utility and it's usage in more detail in a future chapter.
  • vzquota: This is an OpenVZ utility that allows you to configure disk quotas on your server. You can use this utility to initialize, turn quotas on, turn quotas off, set limits, and show quota stats. We will go over this utility and it's usage in more detail in a following chapter.

To install the utilities, you will need to run the following command:

yum install vzctl vzquota

In the previous example, we use the yum command to install the packages for vzctl, vzquota, and ploop on the server.

Restarting the server

The last step you need to perform is rebooting your server by executing the following command. When the server comes back up, your OpenVZ installation will be complete and you will have a running OpenVZ server.

shutdown -r now

Summary

In this chapter, we discussed what OpenVZ is and walked through the system requirements to install OpenVZ, including hardware and networking requirements. Finally, we walked through the steps needed to install OpenVZ—configuring yum, and installing the vzkernel and additional utilities: vzctl and vzquota.

In the next chapter, you are going to learn how to download and use OS templates to create containers on the server as well as how to create a container and set up the hostname, IP address, and DNS for it.

Left arrow icon Right arrow icon

Description

If you are a system administrator or Linux professional who wants to learn to set up, install, and manage OpenVZ containers on a server to implement OS-level virtualization, then this book is for you. Along with elementary knowledge of Linux programming, you need to have a conceptual understanding of system components and functions.

What you will learn

  • Set up OpenVZ for your server infrastructure
  • Download and configure OS templates for containers
  • Understand how to use Vzctl for container administration
  • Create and configure containers as per their utilization
  • Manage resources on your server
  • Install and manage webbased management software on the server
  • Manage multipleserver infrastructure with OpenVZ
  • Discover how to configure your containers effectively
Estimated delivery fee Deliver to Netherlands

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 11, 2014
Length: 110 pages
Edition : 1st
Language : English
ISBN-13 : 9781782167327
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Netherlands

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Publication date : Nov 11, 2014
Length: 110 pages
Edition : 1st
Language : English
ISBN-13 : 9781782167327
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 96.97
OpenVZ Essentials
€18.99
Mastering Proxmox
€35.99
Learning Docker
€41.99
Total 96.97 Stars icon
Banner background image

Table of Contents

7 Chapters
1. Installing OpenVZ Chevron down icon Chevron up icon
2. OS Templates and Creating Containers Chevron down icon Chevron up icon
3. OpenVZ Container Administration Chevron down icon Chevron up icon
4. Server Administration Using OpenVZ Chevron down icon Chevron up icon
5. Using OpenVZ Web Panel – Part One Chevron down icon Chevron up icon
6. Using OpenVZ Web Panel – Part Two Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(4 Ratings)
5 star 50%
4 star 50%
3 star 0%
2 star 0%
1 star 0%
MoneyPit Mar 31, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If your use to Virtual Machines on Windows and Mac, such as VM Workstation or VMWare and you want to do something similar on the Linux side, then this book is for you. It helps your learn and create containers which are very similar to virtual machines. It covers the details of the free OpenVZ with tons of command line references. It also dedicates two chapters to a graphical user interface for managing these OpenVZ containers, or VPS's. Highly recommend this book if your interested in VPS for Linux.
Amazon Verified review Amazon
BT INC. Apr 09, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Prior to reading this book I had no knowledge whatsoever of OpenVZ and after reading the book, I feel very comfortable with how OpenVZ works and with what it can do. As a book for beginners it really does a nice job of starting at zero and building from there. Some books will assume certain knowledge on the user's part and leave out important details that are needed to configure something or get something running. This book doesn't do that at all. Having said that, if you are somewhat familiar with OpenVZ or are comfortable as a system admin then you might feel like some of the information is redundant and unnecessary. Those parts are obvious and easy to jump past without missing anything.As a book written for beginners to intermediate users it is a great starting point and it is very well written. It is organised well enough to be used as reference later on as well. Overall, if you're looking for a good introductory book to OpenVZ I recommend this book.
Amazon Verified review Amazon
Unimon Sep 30, 2021
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
The publish date of this book is 2014. If you're an OpenVZ user, and apparently there aren't many these days despite the usefulness of the system, this book can serve as a handy reference, or if you want to nominate your spouse or kids as the control ops for your operation. OpenVZ is the open source that Virtuozzo is built on (the pay-for version that supports scaling and clustering). OpenVZ is still in Version 7 (10/2021) so surprisingly, this book is still very relevant.Seriously, OpenVZ is a very slick and comfortable-to-user container virtualization system. Some VPS vendors still use it. It is super light-weight, allowing you to get many Linux instances running on your hardware, which can be quite humble and still make use of OVZ.The book does not have information about installing OpenVZ, which is a good thing because if it did, it would already be totally obsolete.Instead, the book focuses on operations on a Virtual Machine in the course of it's life cycle. In this regard, there have been no significant changes over the past 7 years.What has changed drastically is how you obtain and install the software. Currently it comes in three major forms:(1) An instance you can buy in the AWS Marketplace. Spin it up, and you've got your own full-fledged virtualizer in the cloud.(2) OpenVZ version 7 - not your version 7 from 2014 when the book was written, the current release supports its' own distro of Linux: VzLinux.org (!!) When you download OpenVZ, it's already set up for you as a Linux system running OpenVZ v7 under VzLinux. Burn it onto bare metal, virtualize it under VirtualBox, boot it from a USB. There are crazy cool things you can do with this.(3) Virtuozzo is the pay-for version that can be clustered, and the storage scaled.This book will not teach you to do any of the things I've mentioned. It's an operator manual. But, if you're an advanced Linux hacker, you will find this a handy reference for the lightweight powerful tool that OpenVZ is. Think of it as LXC/LXD light.(3)
Amazon Verified review Amazon
Amazon Kunde Jun 16, 2016
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
It is a good book to begin with OpenVZ as a system administrator. It shows all the commands you need to create and configure a machine.Said that, what you are not going to find here is a deeper understading, for exemple:Why OpenVZ uses their own kernel?Who is involved in the development and how often would you find updates?How the UBC Parameters relate to each other?Am I able to change the UBC Parameter is real time?How that affects the machine?Can I use other filesystems or just ploop?vzdump.....Once you have learn the basic, you can use the book as a quick reference if you do not remember the exact parameter.p.s.: The "quota" command does not exist in the last version.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela