Parallels Virtuozzo Containers - 4.7 - Linux User's Guide

Parallels Virtuozzo Containers 4.7 for Linux
User's Guide
Copyright © 1999-2012 Parallels IP Holdings GmbH and its affiliates. All rights reserved.
Parallels IP Holdings GmbH. c/o Parallels International GmbH. Parallels International GmbH Vordergasse 49 CH8200 Schaffhausen Switzerland Tel: + 41 526320 411 Fax: + 41 52672 2010 www.parallels.com
Copyright © 1999-2012 Parallels IP Holdings GmbH and its affiliates. All rights reserved.
This product is protected by United States and international copyright laws. The product’s underlying technology, patents, and trademarks are listed at http://www.parallels.com/trademarks.
Microsoft, Windows, Windows Server, Windows NT, Windows Vista, and MS-DOS are registered trademarks of Microsoft Corporation. Apple, Mac, the Mac logo, Mac OS, iPad, iPhone, iPod touch, FaceTime HD camera and iSight are trademarks of Apple Inc., registered in the US and other countries. Linux is a registered trademark of Linus Torvalds. All other marks and names mentioned herein may be trademarks of their respective owners.
Contents
Introduction ............................................................................................................. 11
About This Guide .......................................................................................................... 11
Organization of This Guide .................................................................................................... 12
Documentation Conventions ................................................................................................. 13
Getting Help .................................................................................................................. 14
Feedback ...................................................................................................................... 14
Parallels Virtuozzo Containers Philosophy ............................................................. 15
About Parallels Virtuozzo Containers Software ............................................................... 15
What is Parallels Virtuozzo Containers ................................................................................... 16
What is Container .................................................................................................................. 17
Parallels Virtuozzo Containers Applications ............................................................................ 18
Distinctive Features of Parallels Virtuozzo Containers ...................................................... 19
OS Virtualization .................................................................................................................... 19
Using Virtuozzo File System ................................................................................................... 20
Templates ............................................................................................................................. 20
Resource Management ......................................................................................................... 21
Main Principles of Parallels Virtuozzo Containers Operation ............................................ 21
Basics of Parallels Virtuozzo Containers Technology ............................................................. 22
Parallels Virtuozzo Containers Configuration .......................................................................... 24
Parallels Virtual Automation Overview .................................................................................... 25
Parallels Power Panel Overview ............................................................................................. 26
Parallels Management Console Overview .............................................................................. 27
Hardware Node Availability Considerations .................................................................... 28
Operations on Containers ....................................................................................... 29
Creating Containers ...................................................................................................... 29
Before You Begin .................................................................................................................. 30
Choosing a Container ID ....................................................................................................... 31
Choosing an OS EZ Template ............................................................................................... 32
List of Supported Linux Distributions for Containers .............................................................. 33
Creating a Container ............................................................................................................. 34
Contents
Configuring Containers .................................................................................................. 35
Setting Startup Parameters ................................................................................................... 35
Setting Network Parameters .................................................................................................. 36
Setting the root Password for Containers .............................................................................. 37
Starting, Stopping, Restarting, and Querying the Status of Containers ............................ 38
Listing Containers ......................................................................................................... 40
Setting Names for Containers ........................................................................................ 43
Storing Extended Information on Containers .................................................................. 45
Migrating Containers ..................................................................................................... 46
Standard Migration ................................................................................................................ 47
Zero-Downtime Migration ...................................................................................................... 50
Migrating Containers Based on Standard Templates ............................................................. 53
Configuring Non-Root Access for Migrating Containers ......................................................... 54
Moving Containers Within the Hardware Node ............................................................... 55
Copying Containers Within the Hardware Node.............................................................. 58
Backing Up and Restoring Containers ........................................................................... 61
Using vzabackup/vzarestore Utilities ...................................................................................... 62
Restoring Containers Based on Standard Templates ............................................................ 64
Managing Backups in Parallels Management Console ........................................................... 65
Reinstalling Containers ................................................................................................ 104
Customizing Container Reinstallation ................................................................................... 106
Deleting Containers ..................................................................................................... 108
Disabling Containers ................................................................................................... 110
Suspending Containers ............................................................................................... 112
Running Commands in Containers .............................................................................. 114
Updating Containers ................................................................................................... 115
Updating EZ Template Packages In Containers ................................................................... 116
Updating OS EZ Template Caches ...................................................................................... 118
Managing Resources ............................................................................................ 120
What are Resource Control Parameters? ..................................................................... 121
Managing Container CPU Resources ........................................................................... 122
Configuring CPU Units ......................................................................................................... 122
Configuring Number of CPUs .............................................................................................. 123
Configuring CPU Limits ....................................................................................................... 125
Contents
Controlling Container CPU Usage With VZASysD Plug-in .................................................... 128
Configuring Containers to Run on Specific CPUs ................................................................ 130
Managing Network Accounting and Bandwidth ............................................................ 131
Network Traffic Parameters ................................................................................................. 132
Configuring Network Classes .............................................................................................. 133
Viewing Network Traffic Statistics ........................................................................................ 135
Turning On and Off Network Bandwidth Management ........................................................ 136
Configuring Network Bandwidth Management for Containers ............................................. 139
Managing Memory Parameters for Containers.............................................................. 141
Configuring Main VSwap Parameters .................................................................................. 142
Configuring the Memory Allocation Limit .............................................................................. 143
Tuning VSwap ..................................................................................................................... 144
Configuring Legacy Containers ............................................................................................ 145
Managing Disk Quotas ................................................................................................ 146
What are Disk Quotas? ........................................................................................................ 146
Disk Quota Parameters ....................................................................................................... 147
Turning On and Off Per-Container Disk Quotas ................................................................... 148
Setting Up Per-Container Disk Quota Parameters ............................................................... 152
Turning On and Off Second-Level Quotas for Containers .................................................... 154
Setting Up Second-Level Disk Quota Parameters ............................................................... 156
Checking Quota Status ....................................................................................................... 158
Cleaning Up Containers ....................................................................................................... 160
Managing Disk I/O Parameters .................................................................................... 162
Configuring Container Disk I/O Priority Levels ...................................................................... 163
Configuring the Disk I/O Bandwidth for Containers .............................................................. 165
Configuring the Number of I/O Operations Per Second ....................................................... 166
Viewing Disk I/O Statistics for Containers ............................................................................ 167
Detecting Disk I/O Bottlenecks ............................................................................................ 168
Setting Disk I/O Limits for Backups and Migrations ............................................................. 170
Managing Container Resources Configurations ............................................................ 171
Splitting the Hardware Node Into Equal Pieces .................................................................... 172
Scaling Container Configuration .......................................................................................... 174
Validating Container Configuration ....................................................................................... 176
Applying New Configuration Samples to Containers ............................................................ 178
Contents
Real-Time Monitoring in Parallels Virtuozzo Containers ...................................... 180
Monitoring Resources with Console ............................................................................. 181
Monitoring Resources with Parallels Management Console .......................................... 183
Using Charts Representation ............................................................................................... 184
Using Table Representation ................................................................................................. 191
Subscribing to Parallels Management Console Alerts ................................................... 192
Managing Services and Processes ...................................................................... 196
What Are Services and Processes ............................................................................... 197
Main Operations on Services and Processes................................................................ 198
Managing Processes and Services .............................................................................. 199
Viewing Active Processes and Services ............................................................................... 200
Monitoring Processes in Real Time ...................................................................................... 203
Changing Services Mode..................................................................................................... 206
Determining Container Identifiers by Process IDs ................................................................ 207
Starting, Stopping, and Restarting Services ........................................................................ 208
Managing Parallels Virtuozzo Containers Network .............................................. 210
Managing Network Adapters on the Hardware Node ................................................... 211
Listing Adapters .................................................................................................................. 212
Creating a VLAN Adapter .................................................................................................... 214
Connecting Adapters to Virtual Networks ............................................................................ 216
Managing Virtual Networks .......................................................................................... 217
Creating a Virtual Network ................................................................................................... 218
Listing Virtual Networks ....................................................................................................... 220
Deleting a Virtual Network ................................................................................................... 221
Managing Virtual Network Adapters ............................................................................. 222
Container Networking Modes .............................................................................................. 222
Creating and Deleting veth Network Adapters ..................................................................... 226
Configuring veth Adapter Parameters .................................................................................. 228
Connecting Containers to Virtual Networks ......................................................................... 231
Managing Private Networks and Subnetworks ............................................................. 233
Learning Private Networks ................................................................................................... 234
Setting Up Private Networks ................................................................................................ 238
Contents
Managing Hardware Nodes .................................................................................. 240
Managing Parallels Virtuozzo Containers Licenses ........................................................ 240
Understanding Licenses ...................................................................................................... 241
Installing Licenses................................................................................................................ 242
Updating Licenses ............................................................................................................... 245
Transferring Licenses to Another Node ................................................................................ 246
Viewing the Current License ................................................................................................ 247
Managing Files ............................................................................................................ 250
Uploading Files to the Hardware Node ................................................................................ 252
Downloading Files to the Local Computer ........................................................................... 255
Setting Permissions for Files on the Node ........................................................................... 256
Updating the Parallels Virtuozzo Containers Software ................................................... 257
Updating Parallels Virtuozzo Containers With vzup2date ..................................................... 258
Updating in Graphical Mode ................................................................................................ 259
Updating in Command-Line Mode ...................................................................................... 266
Using Parallels Management Console to Update Parallels Virtuozzo Containers Software ... 266
Advanced Tasks .................................................................................................... 273
Configuring Capabilities ............................................................................................... 273
Creating VZFS Symlinks Inside a Container ......................................................................... 274
Available Capabilities for Containers .................................................................................... 275
Migrating a Physical Server to a Container ................................................................... 277
Migration Overview .............................................................................................................. 278
Migration Steps ................................................................................................................... 279
Migration Requirements....................................................................................................... 281
Migration Restrictions .......................................................................................................... 282
Migrating in Command Line ................................................................................................. 283
Creating Customized Containers ................................................................................. 290
Using Customized OS EZ Templates ................................................................................... 291
Using EZ OS Template Sets ................................................................................................ 293
Using Customized Application Templates ............................................................................ 295
Contents
Changing System Time From Containers ..................................................................... 297
Setting Up an iSCSI Environment in Parallels Virtuozzo Containers Systems ................. 298
Obtaining the Hardware Node ID From Containers ....................................................... 299
Mounting the /vz Partition via the Parallels Virtuozzo Containers Script ......................... 300
Managing Mount Points In Containers ......................................................................... 301
Preserving Application Data During Container Reinstallation ......................................... 303
Accessing Devices From Inside Containers .................................................................. 305
Moving Network Adapters to Containers ...................................................................... 307
Enabling VPN for Containers........................................................................................ 308
Managing Hardware Node Resources Parameters ....................................................... 309
Setting Immutable and Append Flags for Container Files and Directories ...................... 310
Creating Local Repository Mirrors for vzup2date .......................................................... 310
Parallels Virtuozzo Containers Repository Structure............................................................. 311
Creating a Local Mirror ........................................................................................................ 313
Choosing Updates for Downloading .................................................................................... 316
Managing iptables Modules ......................................................................................... 317
Loading iptables Modules to the Hardware Node ................................................................ 318
Sharing a File System Among Containers ..................................................................... 319
Creating Configuration Files for New Linux Distributions ............................................... 321
Rebooting Containers .................................................................................................. 322
Managing Graphical Applications In Containers ............................................................ 322
Running Graphical Applications in X Windows ..................................................................... 323
Running Graphical Applications via VNC ............................................................................. 329
Contents
Assigning External IP Addresses to Containers ............................................................ 331
Mastering Parallels Management Console ........................................................... 332
Configuring Offline Management Parameters ............................................................... 333
Viewing Summary Pages ............................................................................................. 336
Managing Users and Groups In Containers .................................................................. 337
Configuring Firewall ..................................................................................................... 339
Managing Mount Points............................................................................................... 341
Viewing System and Parallels Virtuozzo Containers Logs .............................................. 342
Managing Files In Containers ....................................................................................... 344
Searching for Containers ............................................................................................. 346
Managing Container Search Domains .......................................................................... 347
Troubleshooting .................................................................................................... 348
General Considerations ............................................................................................... 349
Kernel Troubleshooting ................................................................................................ 351
Using ALT+SYSRQ Keyboard Sequences ........................................................................... 351
Saving Kernel Faults (OOPS) ............................................................................................... 352
Finding a Kernel Function That Caused the D Process State ............................................... 353
Problems With Container Management ........................................................................ 353
Failure to Start a Container .................................................................................................. 354
Failure to Access a Container From Network ....................................................................... 355
Failure to Log In to a Container ............................................................................................ 355
Failure to Back Up a Container in Parallels Management Console ....................................... 356
Failure to Display the List of Container Backups .................................................................. 356
Miscellaneous Problems .............................................................................................. 357
Corrupted Pseudographics in Parallels Virtuozzo Containers Utilities ................................... 357
Timeout When Accessing Remote Hosts ............................................................................ 357
Failure to Start iptables Modules After Physical Server Migration ......................................... 358
Getting Technical Support ........................................................................................... 358
Getting Assistance With Parallels Virtuozzo Containers Installation ...................................... 359
Preparing and Sending Questions to Technical Support ...................................................... 360
Submitting a Problem Report to Technical Support ............................................................. 361
Establishing a Secure Channel to Parallels Support ............................................................. 364
Setting Up the Monitor Node ....................................................................................... 365
Configuring a Serial Console on the Monitor Node .............................................................. 366
Contents
Setting Up netconsole ......................................................................................................... 370
Preparing the Monitor Node for Sending Alerts .................................................................... 376
Using vzstatrep to Monitor Hardware Nodes ....................................................................... 378
Glossary ................................................................................................................. 379
Index ...................................................................................................................... 382
C HAPTER 1

Introduction

This chapter provides basic information about Parallels Virtuozzo Containers 4.7 and this guide.
In This Chapter
About This Guide ................................................................................................... 11
Getting Help ........................................................................................................... 14
Feedback ............................................................................................................... 14

About This Guide

This guide is meant to provide comprehensive information on Parallels Virtuozzo Containers 4.7— high-end server virtualization software for Linux-based servers. The issues discussed in this guide cover the necessary theoretical conceptions as well as practical aspects of working with Parallels Virtuozzo Containers. The guide will teach you to create and administer Containers (sometimes also called Virtual Environments, or VEs) on servers running the Parallels Virtuozzo Containers software and to employ both graphical and command line interfaces for performing various tasks.
Note: The guide does not familiarize you with the process of installing, configuring, and deploying Parallels Virtuozzo Containers systems. Detailed information on these operations is given in the Parallels Virtuozzo Containers Installation Guide.
According to the task-oriented approach, most topics of this guide are devoted to a particular task and the ways to perform it. However, Parallels Virtuozzo Containers is equipped with as many as three different tools to perform administrative tasks:
the command-line interface
Parallels Management Console with the graphical user interface
Parallels Virtual Automation with the web interface
The given guide describes the ways to administer Parallels Virtuozzo Containers and perform main tasks on Hardware Nodes (servers running the Parallels Virtuozzo Containers software) and in the Container context using Parallels Management Console and the command-line interface. As to Parallels Virtual Automation, it is provided with a comprehensive online help system.
Besides, there is another tool for managing Containers—Parallels Power Panel. This web-based tool is mainly regarded as a means for individual Container users to manage their personal Containers and also has its own online help system.
Introduction

Organization of This Guide

Chapter 2, Parallels Virtuozzo Containers Philosophy, is a must-read chapter that helps you grasp the general principles of Parallels Virtuozzo Containers operation. It provides an outline of Parallels Virtuozzo Containers architecture and main features, of the way Parallels Virtuozzo Containers stores and uses configuration information, and of the Parallels Virtuozzo Containers licensing policy.
Chapter 3, Operations on Containers, describes operations you can perform on Containers: creating and deleting Containers, starting and stopping them, backing up and restoring Containers, and so on. You will also learn how to migrate Containers from one Hardware Node to another.
Chapter 4, Managing Resources, focuses on configuring and monitoring the resource control parameters for Containers. These parameters comprise disk quotas, network accounting and shaping, CPU and system resources.
Chapter 5, Real-Time Monitoring in Parallels Virtuozzo Containers, explains the way to keep track of the resources consumption by running Containers and the Hardware Node itself in real time.
Chapter 6, Managing Services and Processes, describes the operations you can perform on processes and services in Parallels Virtuozzo Containers by using both the command-line utilities and Parallels Management Console graphical interface.
Chapter 7, Managing Parallels Virtuozzo Containers Network, familiarizes you with the Parallels Virtuozzo Containers network structure, enumerates Parallels Virtuozzo Containers networking components, and explains how to manage these components in Parallels Virtuozzo Containers­based systems.
Chapter 8, Managing Hardware Nodes, centers on all those operations you can perform on Hardware Nodes.
Chapter 9, Advanced Tasks, enumerates those tasks that are intended for advanced system administrators who would like to obtain deeper knowledge about Parallels Virtuozzo Containers capabilities.
Chapter 10, Mastering Parallels Management Console, focuses on those tasks that are most comfortably accomplished using not the command-line utilities, but Parallels Management Console graphical interface.
Chapter 11, Troubleshooting, suggests ways to resolve common inconveniences should they occur during your work with the Parallels Virtuozzo Containers software.
12
Introduction
Preformatted
Saved parameters for Container
Monospace Bold
C:\vzlist -a

Documentation Conventions

Before you start using this guide, it is important to understand the documentation conventions used in it.
The table below presents the existing formatting conventions.
Formatting convention Type of Information Example
Special Bold
Italics
Monospace
Key+Key Key combinations for which the
Items you must select, such as menu options, command buttons, or items in a list.
Titles of chapters, sections, and subsections.
Used to emphasize the importance of a point, to introduce a term or to designate a command-line placeholder, which is to be replaced with a real name or value.
The names of commands, files, and directories.
On-screen computer output in your command-line sessions; source code in XML, C++, or other programming languages.
What you type, as contrasted with on-screen computer output.
user must press and hold down one key and then press another.
Go to the Resources tab.
Read the Basic Administration chapter.
These are the so-called OS templates.
To remove a Container, type vzctl delete ctid.
Use vzctl start to start a Container.
101
Ctrl+P, Alt+F4
Besides the formatting conventions, you should also know about the document organization convention applied to Parallels documents: chapters in all guides are divided into sections, which, in their turn, are subdivided into subsections. For example, About This Guide is a section, and Documentation Conventions is a subsection.
13
Introduction

Getting Help

In addition to this guide, there are a number of other resources shipped with Parallels Virtuozzo Containers 4.7 that can help you use the product more effectively. These resources include:
Getting Started With Parallels Virtuozzo Containers 4.7 for Linux. This guide provides basic
information on installing Parallels Virtuozzo Containers 4.7 on your server, creating new Containers, and performing the main operations on them.
Parallels Virtuozzo Containers 4.7 for Linux Installation Guide. This guide provides exhaustive information on the process of installing, configuring, and deploying your Parallels Virtuozzo Containers system. Unlike the Getting Started With Parallels Virtuozzo Containers 4.7 for Linux guide, it contains a more detailed description of the operations needed to install and set Parallels Virtuozzo Containers to work (e.g., planning the structure of your network and performing the Parallels Virtuozzo Containers unattended installation). Besides, it does not include the description of any Container-related operations.
Parallels Virtuozzo Containers 4.7 for Linux Templates Management Guide. This guide is meant to provide complete information on Parallels Virtuozzo Containers templates—an exclusive Parallels technology allowing you to efficiently deploy standard Linux applications inside Containers and to greatly save the server resources (physical memory, disk space, and so on).
Parallels Virtuozzo Containers 4.7 for Linux Reference Guide. This guide is a complete reference on all Parallels Virtuozzo Containers configuration files and command-line utilities.
Parallels Management Console Help. This help system provides detailed information on Parallels Management Console—a graphical user interface tool for managing Hardware Nodes and Containers.
Parallels Virtual Automation Online Help. This help system shows you how to work with Parallels Virtual Automation—a tool providing you with the ability to manage Hardware Nodes and Containers with the help of a standard Web browser on any platform.
Parallels Power Panel Online Help. This help system deals with Parallels Power Panel—a means for administering individual Containers through a common Web browser on any platform.

Feedback

If you spot a typo in this guide, or if you have an opinion about how to make this guide more helpful, you can share your comments and suggestions with us by completing the Documentation Feedback form on our website (http://www.parallels.com/en/support/usersdoc/).
14
C HAPTER 2

Parallels Virtuozzo Containers Philosophy

This chapter describes the general principles of Parallels Virtuozzo Containers operation. It provides an outline of the Parallels Virtuozzo Containers architecture and lets you understand the Parallels Virtuozzo Containers licensing policy.
In This Chapter
About Parallels Virtuozzo Containers Software ........................................................ 15
Distinctive Features of Parallels Virtuozzo Containers ............................................... 19
Main Principles of Parallels Virtuozzo Containers Operation ..................................... 21
Hardware Node Availability Considerations.............................................................. 28

About Parallels Virtuozzo Containers Software

This section provides general information about the Parallels Virtuozzo Containers software and its applications.
Parallels Virtuozzo Containers Philosophy

What is Parallels Virtuozzo Containers

Parallels Virtuozzo Containers is a patented OS virtualization solution. It creates isolated partitions or Containers on a single physical server and OS instance to utilize hardware, software, data center and management effort with maximum efficiency. The basic Parallels Virtuozzo Containers capabilities are:
Intelligent Partitioning. Divide a server into as many as hundreds of Containers with full server functionality.
Complete Isolation. Containers are secure and have full functional, fault and performance isolation.
Dynamic Resource Allocation. CPU, memory, network, disk and I/O can be changed without rebooting.
Mass Management. Suite of tools and templates for automated, multi-Container and multi­server administration.
The diagram below represents a typical model of the Parallels Virtuozzo Containers-based system structure:
16
Parallels
Virtuozzo Containers Philosophy
The Parallels Virtuozzo Containers OS virtualization model is streamlined for the best performance, management, and efficiency. At the base resides a standard Host operating system which can be either Windows or Linux. Next is the virtualization layer with a proprietary file system and a kernel service abstraction layer that ensure the isolation and security of resources between different Containers. The virtualization layer makes each Container appear as a standalone server. Finally, the Container itself houses the application or workload.
The Parallels Virtuozzo Containers OS virtualization solution has the highest efficiency and manageability making it the best solution for organizations concerned with containing the IT infrastructure and maximizing the resource utilization. The Parallels Virtuozzo Containers complete set of management tools and unique architecture makes it the perfect solution for easily maintaining, monitoring, and managing virtualized server resources for consolidation and business continuity configurations.

What is Container

A Container is a virtual private server that is functionally identical to an isolated standalone server:
Each Container has its own processes, users, files and provides full administrative access.
Each Container has its own IP addresses, port numbers, filtering and routing rules.
Each Container can have its own configuration for the system and application software, as well
as its own versions of system libraries. It is possible to install or customize software packages inside a Container independently from other Containers or the host system. Multiple distributions of a package can be run on one and the same server.
Each Container has its own unique root user with full control over the given Container and full access to other user accounts inside this Container.
17
Parallels Virtuozzo Containers Philosophy

Parallels Virtuozzo Containers Applications

Parallels Virtuozzo Containers 4.7 can be efficiently applied in a wide range of areas: enterprise server consolidation, web and applications hosting, software development and testing, user training, and so on.
If you administer a number of Linux dedicated servers within an enterprise, you can benefit from the Parallels Virtuozzo Containers solution in the following ways:
Reduce the number of required physical servers and corresponding support by grouping a multitude of your enterprise servers onto a single server without losing a bit of valuable information and without compromising performance.
Increase server utilization and maximize server potential.
Provision servers in minutes by using the technology of Parallels Virtuozzo Containers
templates.
Migrate Containers in the time of network data transfer, nearly eliminating the planned downtime and enabling fast reaction to unplanned downtime situations.
Monitor OS and application versions and update/upgrade the current software easily across all of your physical servers running the Parallels Virtuozzo Containers software and their Containers.
Guarantee Quality-of-Service in accordance with a corporate service level agreement (SLA).
Automate routine tasks such as upgrades and updates.
Minimize software license and support requirements.
Due to its unique efficiency and completeness, Parallels Virtuozzo Containers has also a wide variety of profitable uses for hosting service providers allowing them to:
Provide complete self-administration panels (Parallels Power Panel) including system backup/restore and monitoring tools.
Have a multitude of customers with their individual full-featured Containers sharing a single physical server.
Transparently move customers and their environments between servers, without any manual reconfiguration.
Increase profitability through the better management and leverage of hardware and software investments.
Automate service provisioning by using the technology of Parallels Virtuozzo Containers templates.
Besides, Parallels Virtuozzo Containers proves invaluable for IT educational institutions that can now provide every student with a personal Linux server, which can be monitored and managed remotely. Software development companies may use Containers for testing purposes and the like.
18
Parallels
Virtuozzo Containers Philosophy

Distinctive Features of Parallels Virtuozzo Containers

The concept of Parallels Virtuozzo Containers is distinct from the concept of traditional virtual machines in the respect that Containers always run the same OS kernel as the host system (that is, Linux on Linux or Windows on Windows). This single-kernel implementation technology allows you to run Containers with a near-zero overhead. Thus, Parallels Virtuozzo Containers offer an order of magnitude higher efficiency and manageability than traditional virtualization technologies.

OS Virtualization

From the point of view of applications and Container users, each Container is an independent system. This independence is provided by a virtualization layer in the kernel of the host OS. Note that only a negligible part of the CPU resources is spent on virtualization (around 1-2%). The main features of the virtualization layer implemented in Parallels Virtuozzo Containers are the following:
Container looks like a normal Linux system. It has standard startup scripts, software from vendors can run inside Container without Parallels Virtuozzo Containers-specific modifications or adjustment.
A user can change any configuration file and install additional software.
Containers are fully isolated from each other (file system, processes, Inter Process
Communication (IPC), sysctl variables).
Containers share dynamic libraries, which greatly saves memory.
Processes belonging to a Container can be scheduled for execution on all available CPUs.
Consequently, Containers are not bound to only one CPU and can use all available CPU power.
19
Parallels Virtuozzo Containers Philosophy

Using Virtuozzo File System

Virtuozzo File System (VZFS) is a legacy file system that allows sharing common files among multiple Containers without sacrificing flexibility. Container users can modify, update, replace, and delete shared files. When a user modifies a shared file, VZFS creates a private copy of that file transparently for the user. Thus, modifications do not affect other users of the same file.
Although VZFS can help you save disk space and memory, it also has a number of limitations:
You cannot store Containers using VZFS in Parallels Cloud Storage clusters.
To migrate or restore a Container, you always need to have a corresponding OS template
installed on the destination server.
VZFS-based Containers lack some functionality provided by Parallels Virtuozzo Containers 4.7 (like creating and managing snapshots).
Note: For more information on VZFS, see the documentation for Parallels Server Bare Metal 5.0.

Templates

A template (or a package set) in Parallels Virtuozzo Containers is a set of original application files repackaged for mounting over Virtuozzo File System. Usually, it is just a set of RPM packages for Red Hat like systems. Parallels Virtuozzo Containers provides tools for creating templates, installing, upgrading, adding them to and removing them from a Container. Using templates lets you:
Share the RAM among similar applications running in different Containers to save hundreds of megabytes of memory.
Share the files comprising a template among different Containers to save gigabytes of disk space.
Deploy applications simultaneously in many Containers.
Use different versions of an application in different Containers (for example, perform an upgrade
only in certain Containers).
There are two types of templates in Parallels Virtuozzo Containers 4.7. These are OS templates and application templates. An OS template is an operating system and the standard set of applications to be found right after the installation. Parallels Virtuozzo Containers uses OS templates to create new Containers with a preinstalled operating system. An application template is a set of repackaged software packages optionally accompanied with configuration scripts. Parallels Virtuozzo Containers uses application templates to add extra software to an existing Container. For example, you can create a Container on the basis of the CentOS 5 OS template and add the MySQL application to it using the MySQL application template.
For detailed information on Parallels Virtuozzo Containers templates, see the Parallels Virtuozzo Containers 4.7 Templates Management Guide.
20
Parallels
Virtuozzo Containers Philosophy

Resource Management

Parallels Virtuozzo Containers resource management controls the amount of resources available to Containers. The controlled resources include such parameters as CPU power, disk space, a set of memory-related parameters. Resource management allows Parallels Virtuozzo Containers to:
effectively share available Hardware Node resources among Containers
guarantee Quality-of-Service in accordance with a service level agreement (SLA)
provide performance and resource isolation and protect from denial-of-service attacks
simultaneously assign and control resources for a number of Containers
manage a multitude of Hardware Nodes in a unified way by means of Parallels Management
Console and Parallels Virtual Automation
collect usage information for system health monitoring
Resource management is much more important for Parallels Virtuozzo Containers than for a standalone server since server resource utilization in a Parallels Virtuozzo Containers-based system is considerably higher than that in a typical system.

Main Principles of Parallels Virtuozzo Containers Operation

This section describes the basics of Parallels Virtuozzo Containers technology and discusses the main tools for managing Parallels Virtuozzo Containers-based systems.
21
Parallels Virtuozzo Containers Philosophy

Basics of Parallels Virtuozzo Containers Technology

In this section, we will try to let you form a more or less precise idea of the way the Parallels Virtuozzo Containers software operates on your computer. Please see the figure below:
22
Parallels
Virtuozzo Containers Philosophy
This figure presumes that you have a number of physical servers united into a network. In fact, you may have only one dedicated server to effectively use the Parallels Virtuozzo Containers software for the needs of your network. If you have more than one Parallels Virtuozzo Containers-based physical server, each one of the servers will have a similar architecture. In Parallels Virtuozzo Containers terminology, such servers are called Hardware Nodes (or just Nodes), because they represent hardware units within a network.
Parallels Virtuozzo Containers 4.7 is installed on a Linux operating system configured in a certain way. For example, such customized configuration should include the creation of a /vz partition, which is the basic partition for hosting Containers and which must be way larger than the root partition.
Note: For the full list of supported operating systems and detailed instructions on installing Linux (called
Host Operating System in the picture above) on physical servers, see the Parallels Virtuozzo Containers
4.7 Installation Guide.
Once Parallels Virtuozzo Containers is installed, you can run Parallels Virtuozzo Containers services supporting virtualization on your server. This support is presented above as Parallels Virtuozzo Containers Layer. The Parallels Virtuozzo Containers layer ensures that Containers, sharing the same Hardware Node and the same OS kernel, are isolated from each other. A Container is a kind of ‘sandbox’ for processes and users.
Before you are able to create a Container, you need to install the corresponding OS template in Parallels Virtuozzo Containers 4.7. This is displayed as Parallels Templates in the scheme above. Different Containers can be based on different OS templates and thus run different version of Linux (for example, Ubuntu 10.4 or Fedora 13). Once you install at least one OS template, you can create any number of Containers with the help of various Parallels management tools (the Parallels Virtuozzo Containers command-line tools, Parallels Virtual Automation, or Parallels Management Console), configure their network and/or other settings, and work with these Containers as with fully functional LInux servers.
23
Parallels Virtuozzo Containers Philosophy

Parallels Virtuozzo Containers Configuration

Parallels Virtuozzo Containers 4.7 allows you to flexibly configure various settings for your Parallels Virtuozzo Containers system in general as well as for each and every Container. Among these settings are disk and user quota, network parameters, default file locations and configuration sample files, and others.
Parallels Virtuozzo Containers stores the configuration information in two types of files: the global configuration file /etc/vz/vz.conf and Container configuration files /etc/vz/conf/<CT_ID>.conf. The global configuration file defines global and default parameters for Container operation, for example, logging settings, enabling and disabling disk quota for Containers, the default configuration file and OS template on the basis of which a new Container is created, and so on. On the other hand, a Container configuration file (/etc/vz/conf/CT_ID) defines the parameters for a particular Container, such as disk quota and allocated resources limits, IP address and host name, and so on. If a parameter is configured in both the global configuration file and the Container configuration file, the Container configuration file takes precedence. For the list of parameters that can be configured in the global and Container configuration files, see the Parallels Virtuozzo Containers 4.7 Reference Guide.
The configuration files are read when the Parallels Virtuozzo Containers software and/or Containers are started. However, Parallels Virtuozzo Containers standard utilities (for example, vzctl) allow you to change many configuration settings “on-the-fly”, either without modifying the corresponding configuration files or with their modification (if you want the changes to apply the next time the Parallels Virtuozzo Containers software and/or Containers are started).
Some Parallels Virtuozzo Containers utilities have their own configuration files. For example, vzbackup, which is responsible for backing up Container private areas and configuration files, has its own global configuration file /etc/vzbackup.conf and can have a number of per-Node configuration files located in the backup directory. This directory is defined in the backup global configuration file. Both the global backup configuration file and per-Node ones are located on a central Backup Node. There are a number of other specific configuration files. All of them are described in detail in the Parallels Virtuozzo Containers 4.7 Reference Guide.
24
Parallels
Virtuozzo Containers Philosophy

Parallels Virtual Automation Overview

Parallels Virtual Automation is designed for Hardware Node administrators and provides them with the ability to manage multiple Hardware Nodes and all Containers residing on them with the help of a standard web browser on any platform. The list of supported browsers is given below:
Internet Explorer 6 and above
Firefox 2.0 and above
Safari 3.0 and above
Chances are that you will also be able to use other browsers, but Parallels Virtuozzo Containers has not been extensively tested with them.
The Parallels Virtual Automation interface has been designed to let the Parallels Virtuozzo Containers server administrator quickly perform all possible tasks through an intuitive navigation system:
25
Parallels Virtuozzo Containers Philosophy
The main components the Parallels Virtual Automation interface include:
The left menu frame listing and allowing to access all your Hardware Nodes and Containers and the main types of operations to be performed on them with the help of Parallels Virtual Automation.
The toolbar on top of the right frame allowing to perform on your Hardware Nodes and Containers the actions most frequently called for in your routine management work and, when necessary, a few more buttons allowing to perform additional actions on the objects listed in the content part of the right frame (Container backups, packages updates, etc.).
The content part on the right frame displaying the currently accessed Hardware Nodes or Containers, the key information (their statuses, configuration, etc.) and links to advanced actions.
Note: Detailed information on Parallels Virtual Automation is given in its comprehensive online help system and the Parallels Virtual Automation Administrator's Guide.

Parallels Power Panel Overview

Wherever Parallels Virtuozzo Containers is applied, there are people who are supposed to be administrators of particular Containers only, with no access rights to Hardware Nodes. Such people can be subscribers to a hosting provider, university students, administrators of a particular server within an enterprise, etc. Personal Containers can be managed with the help of Parallels Power Panel. Power Panel is a means for administering personal Containers through a common browser: Internet Explorer, Mozilla, and others. It allows Container administrators to do the following:
Start, stop, or restart the Container.
Back up and restore the Container.
Change the Administrator password of the Container.
Start, stop, or restart certain services inside the Container.
View the processes currently running in the Container and send signals to them.
View the current resources consumption and resources overusage alerts.
Connect to the Container by means of RDP.
View the system logs.
For more information on Parallels Power Panel, see its online help system.
Note: Apart from Parallels Power Panel, Container administrators are able to use the standard Windows Remote Desktop Connection (RDP) or MS Terminal Service Client (MS TSC) to connect to their Containers and work inside them.
26
Parallels
Virtuozzo Containers Philosophy

Parallels Management Console Overview

Parallels Management Console is a remote management tool for Parallels Virtuozzo Containers with a graphical user interface. You can use to control Hardware Nodes, to manage Containers, and to monitor the system. The main window of Management Console consists of two parts: the tree pane on the left, and view pane on the right. There is a list of Hardware Nodes in the tree pane. The Hardware Node subtree represents various aspects of its management, for example, Logs, Services, and Templates. The content of the view pane depends on the selected item in the tree pane.
27
Parallels Virtuozzo Containers Philosophy
Below the view pane on the right, there is also a small Actions/Messages/Operations pane. You can switch between the modes by clicking the corresponding buttons to the right of this pane. The Actions pane displays the progress of Parallels Management Console actions. The Messages pane displays the detailed diagnostics of various Management Console errors. The Operations pane shows the result of various asynchronous tasks performed with Hardware Nodes and their Containers.
Parallels Management Console uses a typical client/server architecture. The client Management Console program runs on Microsoft Windows XP/2003/2008/2008 R2. The client application with the graphical user interface connects to the Parallels Agent software, which is running on the Hardware Node. Parallels Agent communicates with the client via the well-documented open Parallels Agent XML API and controls the Hardware Node itself and its Containers.
The client can control multiple Hardware Nodes simultaneously by connecting to multiple Parallels Agents. As the communications between the client and Parallels Agents are secure, the Management Console workstation may be located virtually anywhere on the network.
More detailed information on installing Parallels Management Console is given in the Parallels Virtuozzo Containers 4.7 Installation Guide.

Hardware Node Availability Considerations

Hardware Node availability is more critical than the availability of a typical server. Since it runs multiple Containers providing a number of critical services, Hardware Node outage may be very costly. Hardware Node outage can be as disastrous as the simultaneous outage of a number of servers running critical services.
To increase the availability of your Hardware Node, we suggest you follow the recommendations below:
Use RAID storage for critical Container private areas. Do prefer hardware RAID, but software mirroring RAID might suit too as a last resort.
Do not run software on the Hardware Node itself. Create special Containers where you can host necessary services such as BIND, FTPD, HTTPD, and so on. On the Hardware Node itself, you need only the SSH daemon. Preferably, the Node should accept connections from a pre­defined set of IP addresses only.
Do not create users on the Hardware Node itself. You can create as many users as you need in Containers. Remember: compromising the Hardware Node means compromising all Containers as well.
28
C HAPTER 3

Operations on Containers

This chapter describes how to perform day-to-day operations on Containers.
Note: We assume that you have successfully installed, configured, and deployed your Parallels Virtuozzo Containers system. If you have not, refer to the Parallels Virtuozzo Containers 4.7 Installation Guide.
In This Chapter
Creating Containers ................................................................................................ 29
Configuring Containers ........................................................................................... 35
Starting, Stopping, Restarting, and Querying the Status of Containers ..................... 38
Listing Containers ................................................................................................... 40
Setting Names for Containers ................................................................................. 43
Storing Extended Information on Containers ............................................................ 45
Migrating Containers ............................................................................................... 46
Moving Containers Within the Hardware Node ......................................................... 55
Copying Containers Within the Hardware Node ....................................................... 58
Backing Up and Restoring Containers ..................................................................... 61
Reinstalling Containers ............................................................................................ 104
Deleting Containers ................................................................................................. 108
Disabling Containers ............................................................................................... 110
Suspending Containers ........................................................................................... 112
Running Commands in Containers .......................................................................... 114
Updating Containers ............................................................................................... 115

Creating Containers

This section guides you through the process of creating a Container. We assume that you have successfully installed Parallels Virtuozzo Containers and prepared at least one OS EZ template. If you do not have any OS EZ templates prepared for creating Containers, see the Parallels Virtuozzo Containers 4.7 Templates Management Guide first.
Operations on Containers

Before You Begin

Before you start creating a Container, do the following:
Check that the Hardware Node is visible on your network. You should be able to connect to/from other hosts. Otherwise, Containers will not be accessible from other servers.
Check that you have at least one IP address per Container and the addresses belong to the same network as the Hardware Node or routing to the Containers has been set up via the Hardware Node.
To create a new Container, you need to complete the following tasks:
1 Choose an ID for the Container.
2 Choose an OS template for the Container.
3 Create the Container.
30
Loading...
+ 359 hidden pages