You are previewing OpenVZ Essentials.
O'Reilly logo
OpenVZ Essentials

Book Description

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

In Detail

OpenVZ (Open Virtuozzo) is an OS-level virtualization technology based on the Linux kernel and OS written in C. It creates multiple secure and isolated Linux containers on a single physical server, enabling better server utilization and ensuring that applications do not conflict. OpenVZ is the only highly scalable virtualization technology with near-zero overhead, strong isolation, and rapid customer provisioning that's ready for production use right now.

Starting with the very basics of OpenVZ, you will learn to configure templates, create containers, administer your server infrastructure, and utilize the OpenVZ Web Panel.

Packed with practical examples and precise instructions, this book helps you to set up and configure OpenVZ. An easy-to-follow guide that will help you with real-world container administration tasks. The book has a natural flow from one topic to another and will ensure that you gain expertise in the effective implementation of OpenVZ.

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 web-based management software on the server
  • Manage multiple-server infrastructure with OpenVZ
  • Discover how to configure your containers effectively
  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you.

    Table of Contents

    1. OpenVZ Essentials
      1. Table of Contents
      2. OpenVZ Essentials
      3. Credits
      4. About the Author
      5. About the Reviewers
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      8. 1. Installing OpenVZ
        1. What is OS-level virtualization?
        2. What is OpenVZ?
        3. System requirements
        4. The disk partition scheme
        5. The yum configuration
        6. Installing vzkernel
        7. Installing vzctl and vzquota
        8. Restarting the server
        9. Summary
      9. 2. OS Templates and Creating Containers
        1. Getting started with OS templates
          1. Downloading OS templates
            1. Using vztmpl-dl to download OS templates
            2. Manually downloading OS templates
          2. Selecting a container ID
        2. Selecting an OS template
          1. Creating a container
        3. Container configuration
          1. Configuring a container to start on boot
          2. Setting the hostname
          3. Setting an IP address
          4. Setting a name server
          5. Setting the root password
            1. VE configuration files
        4. Summary
      10. 3. OpenVZ Container Administration
        1. Using vzlist
          1. Listing all the containers on the server
        2. The vzctl command
          1. Starting a container
          2. Stopping a container
          3. Restarting a container
        3. Using vzctl to suspend and resume a container
          1. Suspending a container
          2. Resuming a container
          3. Destroying a container
        4. Using vzctl to mount and unmount a container
          1. Mounting a container
          2. Unmounting a container
        5. Disk quotas
          1. Setting quotaon and quotaoff for a container
            1. Turning on disk quota for a container
            2. Turning off disk quota for a container
          2. Setting disk quotas with vzctl set
        6. Further use of vzctl set
          1. --onboot
          2. --bootorder
          3. --userpasswd
          4. --name
          5. --description
          6. --ipadd
          7. --ipdel
          8. --hostname
          9. --disable
          10. --ram
          11. --swap
        7. Summary
      11. 4. Server Administration Using OpenVZ
        1. Important system files
          1. Understanding the /etc/vz directory
          2. Understanding the /vz directory
          3. Understanding the /proc/user_beancounters file
            1. Resources
        2. Managing and configuring the CPU
          1. CPU share
          2. vzcpucheck
          3. Setting up a container to use a set amount of CPU units
          4. Configuring the number of CPUs used by a container
        3. Memory management
          1. vzmemcheck
          2. LowMem
          3. MemSwap
          4. Allocated
            1. vzmemcheck with the -v flag
            2. vzmemcheck with the -A flag
        4. The /var/log/vzctl.log file
          1. Understanding the /var/log/vzctl.log file
        5. Summary
      12. 5. Using OpenVZ Web Panel – Part One
        1. OpenVZ Web Panel
          1. Installing OpenVZ Web Panel
          2. Configuring /etc/owp.conf
        2. Configuring /opt/ovz-web-panel/config/config.yml
          1. Hardware daemon
          2. LDAP
        3. Logging in to OpenVZ Web Panel
        4. Dashboard
        5. Physical servers
          1. Localhost
            1. OS templates
              1. Installing a new OS template
              2. Removing a template
            2. Server templates
              1. Adding a server template
              2. Changing a server template
              3. Removing a server template
            3. Virtual servers list
            4. Managing the virtual server
              1. Making a virtual server
              2. Changing the settings
              3. Removing a virtual server
              4. Changing the state of the container
        6. Summary
      13. 6. Using OpenVZ Web Panel – Part Two
        1. Understanding the virtual server information page
          1. Change state
          2. Change settings
          3. Limits
          4. Tools
            1. Reinstall
            2. Backup
              1. Backing up a container
              2. Restoring the container
              3. Deleting the backup
            3. Clone
            4. Create Template
            5. Console
        2. IP Addresses
          1. IP pools list
          2. Create IP pool
          3. Edit IP pool
          4. Remove IP pool
          5. IP addresses list
        3. My Profile
          1. Users
          2. Add User
          3. Edit User
          4. Enable/disable user account
            1. Disabling a user's account
            2. Enabling a user's account
          5. Delete User
        4. Requests
          1. Create Request
          2. Details
            1. Add comment
            2. Close request
          3. Delete Request
        5. Tasks
        6. Events Log
        7. Logout
        8. Summary
      14. Index