You are previewing Proxmox Cookbook.
O'Reilly logo
Proxmox Cookbook

Book Description

Over 60 hands-on recipes to perform server virtualization and manage virtualized server solutions with Proxmox

About This Book

  • Learn the process of installing, configuring, and managing Proxmox clusters

  • Explore ways of integrating various storage systems with Proxmox

  • Step-by-step and easy-to-learn instructions to build virtual environments of any size using Proxmox

  • Who This Book Is For

    This book is perfect for system administrators who want to learn to implement and administer Proxmox VE environments. Since this book will not cover the basics of Proxmox, a basic understanding of virtualization and networking with Proxmox VE is required.

    What You Will Learn

  • Install and configure an enterprise grade, cluster-based virtual environment using Proxmox

  • Manage a cluster with Graphical User Interface using datacenter, node, KVM, and OpenVZ menus among others

  • Learn different ways of configuring your network and clusters to create complex cloud services

  • Configure and manage the built-in Proxmox firewall to protect your virtual environment

  • Integrate storage systems such as Ceph, Sheepdog, and ZFS for virtual machine management to suit your business needs

  • Backup and restore your data via stop suspend, and snapshot modes

  • Upgrade a Proxmox node with new releases and apply update patches through GUI or CLI

  • Monitor the resources and virtual machines to maintain performance and uptime

  • Explore commands used for Proxmox and Ceph cluster through CLI

  • In Detail

    Proxmox VE goes head to head with big virtualization platforms without bearing the overheads of high costs and vendor lock-ins. Rock solid stability and extremely easy manageability gives Proxmox VE an edge in the world of virtualization. The Proxmox cluster file system (pmxcfs) is designed uniquely for storage of configuration files with high security and reliability. Its simplicity and robustness make it easy for system administrators to manage their systems efficiently.

    Proxmox VE's intuitive interface, high availability, and unique central management system puts it on par with the world’s best virtualization platforms. Its simplicity and high quality of service is what makes it the foremost choice for most system administrators.

    Starting with a step-by-step installation of Proxmox nodes along with an illustrated tour of Proxmox graphical user interface where you will spend most of your time managing a cluster, this book will get you up and running with the mechanisms of Proxmox VE. Various entities such as Cluster, Storage, and Firewall are also covered in an easy to understand format. You will then explore various backup solutions and restore mechanisms, thus learning to keep your applications and servers safe. Next, you will see how to upgrade a Proxmox node with a new release and apply update patches through GUI or CLI.

    Monitoring resources and virtual machines is required on an enterprise level, to maintain performance and uptime; to achieve this, we learn how to monitor host machine resources and troubleshoot common issues in the setup. Finally, we will walk through some advanced configurations for VM followed by a list of commands used for Proxmox and Ceph cluster through CLI.

    With this focused and detailed guide you will learn to work your way around with Proxmox VE quickly and add to your skillset.

    Style and approach

    This book is an inclusive and extensive handbook. It takes a pragmatic approach to complement your system admin skills and accomplish tasks within the Proxmox environment. It consists of illustrations and code-files to help you work with the data as you go from one recipe to the other.

    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 http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. Proxmox Cookbook
      1. Table of Contents
      2. Proxmox Cookbook
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        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. Sections
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Conventions
        6. Reader feedback
        7. Customer support
          1. Errata
          2. Piracy
          3. Questions
      8. 1. Installing Proxmox
        1. Introduction
        2. Hardware requirements
          1. Minimum hardware
          2. Recommended hardware
        3. Preparing for installation
          1. Getting ready
          2. How to do it…
          3. There's more…
        4. Installing Proxmox on a bare metal node
          1. Getting ready
          2. How to do it…
          3. There's more…
        5. Installing Proxmox on a Debian system
          1. Getting ready
          2. How to do it...
          3. There's more…
        6. A Proxmox subscription
        7. Disabling a Proxmox subscription
          1. Getting ready
          2. How to do it…
          3. How it works…
        8. Applying a Proxmox subscription
          1. Getting ready
          2. How to do it…
          3. There's more…
        9. Setting up a Proxmox package repository
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        10. Seeking support
          1. The forum
          2. Wiki/Documentation
          3. Customer portals and tickets
          4. Proxmox mailing lists
          5. The Proxmox bug tracker
      9. 2. Getting to Know the Proxmox GUI
        1. Introduction
        2. Accessing the Proxmox GUI
          1. Getting ready
          2. How to do it…
          3. How it works…
        3. Viewing styles
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. Displaying Server View
            2. Displaying Folder View
            3. Displaying Storage View
            4. Displaying Pool View
        4. Accessing datacenter-specific menus
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. Datacenter | Search menu
            2. Datacenter | Summary menu
            3. Datacenter | Options menu
            4. Datacenter | Storage menu
            5. Datacenter | Backup menu
            6. Datacenter | Users menu
            7. Datacenter | Groups menu
            8. Datacenter | Pools menu
              1. Datacenter | <Pool_name> | Members tab
              2. Datacenter | <Pool_name> | Permissions tab
            9. Datacenter | Permissions menu
            10. Datacenter | Roles menu
            11. Datacenter | Authentication menu
              1. Datacenter | Authentication | Add | Active Directory Server menu
            12. Datacenter | HA menu
            13. Datacenter | Firewall menu
              1. Datacenter | Firewall | Rules menu
              2. Datacenter | Firewall | Security Group menu
              3. Datacenter | Firewall | Alias menu
              4. Datacenter | Firewall | IPSet menu
                1. Datacenter | Firewall | Options menu
            14. Datacenter | Support menu
        5. Accessing node-specific menus
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. Node | Search menu
            2. Node | Summary menu
            3. Node | Services menu
            4. Node | Network menu
            5. Node | DNS menu
            6. Node | Time menu
            7. Node | Syslog menu
            8. Node | Bootlog menu
            9. Node | Task History menu
            10. Node | UBC menu
            11. Node | Subscription menu
            12. Node | Firewall menu
              1. Node | Firewall | Rules menu
              2. Node | Firewall | Options menu
              3. Node | Firewall | Log menu
            13. Node | Updates menu
            14. Node | Ceph menu
              1. Node | Ceph | Status menu
              2. Node | Ceph | Config menu
              3. Node | Ceph | Monitor menu
              4. Node | Ceph | Disks menu
              5. Node | Ceph | OSD menu
              6. Node | Ceph | Pools menu
              7. Node | Ceph | Crush menu
              8. Node | Ceph | Log menu
            15. Node management menu
        6. Accessing KVM-specific menus
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. KVM | Summary menu
            2. KVM | Hardware menu
            3. KVM | Options menu
            4. KVM | Task History menu
            5. KVM | Monitor menu
            6. KVM | Backup menu
            7. KVM | Snapshots menu
            8. KVM | Firewall menu
            9. KVM | Permissions menu
        7. Accessing OpenVZ-specific menus
          1. Getting ready
          2. How to do it…
          3. How it works…
            1. OpenVZ | Summary menu
            2. OpenVZ | Resources menu
            3. OpenVZ | Network menu
            4. OpenVZ | DNS menu
            5. OpenVZ | Options menu
            6. OpenVZ | Task History menu
            7. OpenVZ | UBC menu
            8. OpenVZ | Backup menu
            9. OpenVZ | Firewall menu
            10. OpenVZ | Permissions menu
      10. 3. Cluster and VM Management
        1. Introduction
        2. Creating a Proxmox cluster
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        3. Adding nodes to a cluster
          1. Getting ready
          2. How to do it…
          3. How it works…
        4. Removing nodes from a cluster
          1. Getting ready
          2. How to do it…
        5. Rejoining a removed node into a cluster
          1. Getting ready
          2. How to do it…
          3. There's more…
        6. Understanding the Proxmox cluster filesystem
          1. Getting ready
          2. How it works…
          3. There's more…
          4. See also
        7. Managing the ISO and OpenVZ templates
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        8. Creating a KVM-based virtual machine
          1. Getting ready
          2. How to do it…
          3. There's more…
        9. Creating an OpenVZ container
          1. Getting ready
          2. How to do it…
          3. There's more…
        10. Migrating a virtual machine
          1. Getting ready
          2. How to do it…
          3. How to do it…
          4. How it works…
        11. Cloning a virtual machine
          1. Getting ready
          2. How to do it…
          3. There's more…
        12. Managing a virtual disk image
          1. How to do it…
        13. Managing OpenVZ containers
          1. How to do it…
        14. Understanding OpenVZ user bean counters
          1. How to do it…
          2. How it works…
          3. See also
      11. 4. Network Configurations
        1. Introduction
        2. Configuring a basic network
          1. Getting ready
          2. How to do it…
          3. There's more…
        3. Configuring a bridge
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        4. Configuring VLAN
          1. Getting ready
          2. How to do it…
          3. How it works…
        5. Configuring network bonding
          1. Getting ready
          2. How to do it…
          3. There's more…
        6. Configuring Network Address Translation
          1. Getting ready
          2. How to do it…
          3. How it works…
        7. Configuring Infiniband
          1. Getting ready
          2. How to do it…
          3. How it works…
        8. Configuring a VM network interface
          1. Getting ready
          2. How to do it…
        9. Configuring High Availability
          1. Getting ready
          2. How to do it…
          3. There's more…
      12. 5. Firewall Configurations
        1. Introduction
          1. Zones
          2. Security groups
          3. IPSets
          4. Rules
          5. Macros
          6. Protocols
        2. Configuring a cluster-specific firewall
          1. Enabling a cluster firewall
            1. Getting ready
            2. How to do it…
            3. How it works…
          2. Managing a security group
            1. Getting ready
            2. How to do it…
          3. Managing IPSets
            1. Getting ready
            2. How to do it…
        3. Configuring a host-specific firewall
          1. Getting ready
          2. How to do it…
          3. How it works…
        4. Configuring a VM-specific firewall
          1. Getting ready
          2. How to do it…
          3. How it works…
        5. Integrating a Suricata IPS
          1. Getting ready
          2. How to do it…
          3. How it works…
        6. Commonly-used firewall CLI commands
          1. Getting ready
          2. How to do it...
          3. There's more…
        7. Logging a firewall
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. See also
      13. 6. Storage Configurations
        1. Introduction
          1. Local storage
          2. Shared storage
          3. Ceph storage
            1. MON
            2. OSD
            3. OSD Journal
            4. MDS
            5. CRUSH map
            6. PG
            7. Pools
        2. Basic storage configurations
          1. How to do it…
        3. Installing the FreeNAS storage
          1. Getting ready
          2. How to do it…
          3. There's more…
        4. Connecting the iSCSI storage
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        5. Connecting the LVM storage
          1. Getting ready
          2. How to do it…
            1. Adding the LVM storage with local devices
            2. Creating LVM with a shared storage as the backend
          3. How it works…
          4. There's more…
        6. Connecting the NFS storage
          1. Getting ready
          2. How to do it…
          3. There's more…
        7. Connecting the Ceph RBD storage
          1. Getting ready
          2. How to do it...
            1. Installing Ceph on Proxmox
            2. Initializing the Ceph configuration
            3. Configuring Ceph through the Proxmox GUI
            4. Managing Ceph pools
            5. Connecting RBD to Proxmox
            6. Monitoring the Ceph storage
          3. How it works…
          4. See also
        8. Connecting the ZFS storage
          1. Getting ready
          2. How to do it…
            1. Creating a ZFS pool and attaching it to a Proxmox cluster
            2. Sharing the ZFS storage between Proxmox nodes
          3. How it works…
        9. Connecting the GlusterFS storage
          1. Getting ready…
          2. How to do it…
          3. How it works…
      14. 7. Backup and Restore
        1. Introduction
          1. Types of backup
            1. Full backup
              1. Snapshot
              2. Suspend
              3. Stop
            2. Backup compression
              1. LZO
              2. GZIP
            3. Snapshots
        2. Configuring a backup storage
          1. Getting ready
          2. How to do it...
        3. Scheduling backups
          1. Getting ready
          2. How to do it…
          3. How it works…
        4. Performing a manual backup
          1. Getting ready
          2. How to do it…
        5. Managing snapshots
          1. Getting ready
          2. How to do it…
        6. Restoring a backup
          1. Getting ready
          2. How to do it…
        7. Configuring a backup with vzdump.conf
          1. How to do it...
            1. #bwlimit
            2. #lockwait
            3. #stopwait
            4. #script
            5. #exclude-path
        8. Backing up through the command line
          1. How to do it...
        9. Restoring through the command line
          1. How to do it...
      15. 8. Updating and Upgrading Proxmox
        1. Introduction
        2. Updating Proxmox through the GUI
          1. Getting ready
          2. How to do it…
          3. How it works…
        3. Updating Proxmox through the CLI
          1. How to do it…
        4. Updating after a change in subscription
          1. Getting ready
          2. How to do it…
          3. How it works…
        5. Rebooting dilemmas after an update
          1. How to do it…
          2. There's more…
      16. 9. Monitoring Proxmox
        1. Introduction
        2. Monitoring with Zabbix
          1. Getting ready
          2. Adding a host to the Zabbix server
            1. How to do it…
            2. How it works…
            3. There's more…
          3. Adding the OpenVZ Zabbix template
            1. How to do it…
            2. How it works…
            3. See also
          4. Extending the OpenVZ Zabbix template
            1. How to do it…
            2. How it works…
            3. See also
        3. Proxmox built-in monitoring
          1. How to do it…
        4. Configuring the disk health notifications
          1. How to do it…
        5. Configuring SNMP in Proxmox
          1. How to do it…
        6. Monitoring a Ceph cluster with the Ceph dashboard
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more...
      17. 10. Advanced Configurations for VMs
        1. Introduction
        2. Configuring sound in a KVM VM
          1. Getting ready
          2. How to do it…
        3. Configuring a PCI passthrough
          1. How to do it…
        4. Configuring a PCI Express/GPU passthrough
          1. Getting ready
          2. How to do it…
          3. There's more…
        5. Configuring a USB passthrough
          1. How to do it…
        6. Configuring a hotplug
          1. Getting ready
          2. How to do it…
        7. Nesting virtual machines
          1. Getting ready
          2. How to do it…
        8. Isolating multiple subnets
          1. Getting ready
          2. How to do it…
          3. There's more…
      18. 11. The CLI Command Reference
        1. Introduction
        2. Proxmox commands
          1. How to do it…
            1. Node-related commands
            2. Cluster-related commands
            3. Storage-related commands
            4. KVM-based VM-related commands
          2. There's more...
        3. OpenVZ container-related commands
          1. How to do it…
          2. There's more...
        4. Ceph commands
          1. How to do it…
        5. Gluster commands
          1. How to do it…
          2. There's more...
        6. ZFS commands
          1. How to do it…
          2. There's more...
      19. Index