O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Mastering Proxmox

Book Description

Master Proxmox VE to effectively implement server virtualization technology within your network

In Detail

Proxmox is an open source virtualization management solution for servers. This book starts by guiding you through how to set up your very first Proxmox virtualization platform with minimal configuration.

The book will then make you familiar with the Proxmox GUI and the directory structure. We will then take a look at the shared storage system that Proxmox supports and its pros and cons. As we move on, you will learn how to configure virtual machines beyond the basic default setup as well as how networking is handled.

Setting up a Proxmox cluster in a production environment with minimum downtime will also be explained. Towards the end of the book, you will also learn about troubleshooting by looking at real-life problems.

We will also look at how to tackle the day-to-day challenges of an administrator managing Proxmox clusters.

What You Will Learn

  • Provide big business virtualization technology at small business prices by using Proxmox
  • Configure virtual machines beyond the basic default setup
  • Set up virtual environments of any size
  • Set up scalable, distributed shared storage systems using Ceph
  • Analyze real-world virtual environment scenarios and formulate Proxmox-based solutions
  • Monitor resources and virtual machines to maintain performance and uptime
  • Troubleshoot a virtual environment based on real-life scenarios

Table of Contents

  1. Mastering Proxmox
    1. Table of Contents
    2. Mastering Proxmox
    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. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Dive into the Virtual World with Proxmox
      1. Proxmox cluster required
      2. The Proxmox Graphical User Interface (GUI)
        1. The GUI menu system
        2. Menu chart
        3. The Datacenter menu
          1. The Search tab
          2. The Storage tab
          3. The Backup tab
        4. Node-specific tabs
          1. The Summary tab
          2. The Network tab
          3. The Syslog tab
          4. The UBC tab
          5. The Subscription tab
          6. The Updates tab
          7. The Ceph tab
        5. Virtual machine tabs
          1. The Summary tab
          2. The Hardware tab
          3. The Options tab
          4. The Backup tab
          5. The Snapshots tab
          6. The Permissions tab
      3. Setting up a basic cluster
        1. The hardware list
        2. The software list
        3. Hardware setup
        4. Proxmox installation
        5. Cluster creation
        6. Proxmox subscription
        7. Attaching shared storage
        8. Adding virtual machines
          1. Main virtual machine
          2. Creating a KVM virtual machine
          3. Creating an OpenVZ virtual machine
        9. Proxmox cloning/template
          1. Introducing cloning using a template
          2. Transforming VM into a template
          3. Cloning using a template
            1. Full Clone versus Linked Clone
        10. VM migration
      4. Summary
    9. 2. Proxmox Under the Hood
      1. The Proxmox cluster directory structure
      2. Dissecting the configuration files
        1. The cluster configuration file
        2. The storage configuration file
          1. Local directory-based storage
          2. NFS-shared storage
          3. iSCSI/LVM shared storage
      3. User configuration files
        1. The password configuration file
        2. The virtual machine configuration file
          1. Arguments in the KVM configuration file
        3. The Proxmox OpenVZ configuration file
        4. The version configuration file
      4. Member nodes
        1. The .members file
      5. The virtual machine list file
      6. The cluster logfile
      7. Summary
    10. 3. Shared Storages with Proxmox
      1. Local storage versus shared storage
        1. Live migration of a virtual machine
        2. Seamless expansion of multinode storage space
        3. Centralized backup
        4. Multilevel data tiering
        5. Central storage management
      2. Local and shared storage comparison
      3. Virtual disk image
        1. Supported image formats
        2. The .qcow2 image type
        3. The .raw image type
        4. The .vmdk image type
        5. Image file manipulation
          1. Resizing virtual disk image
          2. Moving a virtual disk image
      4. Storage types in Proxmox
        1. Directory
        2. Logical Volume Management
        3. Network File System
        4. RADOS Block Device
        5. GlusterFS
      5. Noncommercial/commercial storage options
      6. FreeNAS – budget shared storage
      7. Summary
    11. 4. A Virtual Machine for a Virtual World
      1. Creating a VM from a template
      2. Advanced configuration options for a VM
        1. The hotplugging option for a VM
          1. The hotplugging option for <vmid>.conf
          2. Loading modules
          3. Adding virtual disk/vNIC
      3. Nested virtual environment
        1. Enabling KVM hardware virtualization
        2. Network virtualization
      4. Backing up a virtual machine
        1. Proxmox backup and snapshot options
          1. Backing up a VM with a full backup
            1. Creating a schedule for Backup
            2. Node
            3. Storage
            4. Day of Week
            5. Start Time
            6. Selection mode
            7. Send email to
            8. Compression
            9. Mode
          2. Creating snapshots
          3. Deleting old backups
          4. Restoring a virtual machine
        2. Command-line vzdump
        3. Backup configuration file – vzdump.conf
          1. #bwlimit
          2. #lockwait
          3. #stopwait
          4. #script
          5. #exclude-path
      5. Summary
    12. 5. Network of Virtual Networks
      1. Introduction to a virtual network
      2. Physical network versus virtual network
        1. Physical network
        2. Virtual network
      3. Networking components in Proxmox
        1. Virtual Network Interface Card (vNIC)
        2. Virtual bridge
        3. Virtual LAN (VLAN)
        4. Network Address Translation/Translator (NAT)
        5. Network bonding
        6. Components naming convention
      4. Network configuration file
        1. bridge_stp
        2. bridge_fd
      5. Adding a virtual bridge
      6. Adding a bonding interface
      7. Adding NAT/masquerading
      8. Adding VLAN
      9. Sample virtual networks
        1. Network #1 – Proxmox in its simplest form
        2. Network #2 – multitenant environment
        3. Network #3 – academic institution
      10. Multitenant virtual environment
        1. Multitenant network diagram
      11. Summary
    13. 6. Proxmox HA – Zero Downtime
      1. Understanding High Availability
      2. High Availability in Proxmox
        1. Requirements for HA setup
          1. Fencing
      3. Configuring Proxmox HA
        1. Setting up node BIOS
        2. Creating an APC-managed PDU user
        3. Configuring Proxmox fencing
        4. Configuring virtual machine HA
        5. Testing Proxmox HA
        6. Fencing manually
      4. Proxmox HA need to know
      5. Summary
    14. 7. High Availability Storage for High Availability Cluster
      1. Introducing the Ceph storage
        1. Object Storage
        2. Block Storage
        3. Filesystem
      2. Reasons to use Ceph
      3. Virtual Ceph for training
      4. The Ceph components
        1. Physical node
        2. Maps
        3. Cluster map
        4. CRUSH map
        5. Monitor
        6. OSD
        7. OSD Journal
        8. MDS
        9. Placement Group (PG)
        10. Pool
        11. Ceph components summary
      5. The Ceph cluster
        1. Hardware requirements
        2. Software requirements
      6. Installing Ceph using an OS
        1. Installing and setting up Ubuntu
        2. Creating an admin user
        3. Assigning SUDO permission to a user
        4. Updating Ubuntu
        5. Generating an SSH Key
        6. Installing ceph-deploy
        7. Creating a Ceph cluster
        8. Installing Ceph on nodes
        9. Creating Monitors (MONs)
        10. Gathering the admin keys
        11. Creating OSDs
        12. Connecting Proxmox to a Ceph cluster
      7. Installing Ceph on Proxmox
        1. Preparing a Proxmox node for Ceph
        2. Installing Ceph
        3. Creating MON from the Proxmox GUI
        4. Creating OSD from the Proxmox GUI
        5. Creating a new Ceph pool using the Proxmox GUI
      8. Creating a Ceph FS
        1. Setting up an MDS daemon
        2. Setting up Ceph FS using FUSE
        3. Mounting Ceph FS
        4. Connecting Proxmox to Ceph FS
      9. Learning Ceph's CRUSH map
        1. Extracting the CRUSH map
        2. Decompiling the CRUSH map
        3. Editing the CRUSH map
        4. Compiling the CRUSH map
        5. Injecting the CRUSH map into the cluster
        6. Verifying the new CRUSH map
      10. Managing Ceph pools
        1. Creating a new Ceph pool using the CLI
        2. Verifying the new Ceph pool
        3. Adding OSDs to a pool
        4. Assigning a pool to the ruleset
        5. Connecting Proxmox to the new pool
      11. Ceph benchmarking
      12. The Ceph command list
      13. Summary
    15. 8. Proxmox Production Level Setup
      1. Defining a production level
        1. Key parameters
          1. Stable and scalable hardware
          2. Current load versus future growth
          3. Budget
          4. Simplicity
          5. Tracking the hardware inventory
          6. Hardware selection
        2. An entry-level Proxmox production setup
          1. An i7-based Proxmox node
          2. A Xeon-based Proxmox node
        3. An entry-level Ceph production setup
        4. An advanced-level Proxmox production setup
          1. A Xeon-based Proxmox node
        5. An advanced-level Ceph production setup
        6. Desktop class versus server class
      2. Brand servers
        1. Hardware tracking
      3. AMD-based hardware selection
        1. An AMD-based entry-level Proxmox
        2. An AMD-based advanced-level Proxmox
        3. An AMD-based Ceph setup
        4. Performance comparison
      4. Summary
    16. 9. Proxmox Troubleshooting
      1. Main cluster issues
        1. GUI shows everything is offline
        2. Rejoining a Proxmox node with the same IP address
        3. Disabling fencing temporarily
        4. The occurrence of kernel panic when disconnecting USB devices
        5. The occurrence of VM shutdown error when initiated from GUI
        6. Kernel panic on Proxmox 3.2 with HP NC360T
        7. VMs not booting after you restart the network service
        8. Proxmox cluster is out of Quorum and cluster filesystem is read only
        9. Proxmox boot failure due to the getpwnam error
        10. Cannot log in to GUI as ROOT
        11. Booting with a USB stick fails in Proxmox
        12. The Upgrade from Proxmox 3.1 to Proxmox 3.2 is disabled through GUI
        13. VZ kernel 2.6.32-28-pve breaks libnl/netlink in host and VM
        14. Nodes not visible on the Proxmox GUI after an upgrade
        15. GRUB is in an endless loop after Proxmox installation
        16. SSH access is possible but Proxmox node does not reboot
      2. Storage issues
        1. Deleting damaged LVM with error read failed from 0 to 4096
        2. Proxmox cannot mount NFS share due to time-out error
        3. Removing stale NFS shares when a stale file handle error occurs
        4. The occurrence of '--mode session exit code 21' errors while accessing iSCSI target
        5. Cannot read an iSCSI target even after it has been deleted from Proxmox storage
        6. OSDs still show up in Proxmox after you remove the Ceph node
        7. The 'No Such Block Device' error that shows up during creation of an OSD
        8. The fstrim command does not trim unused blocks for Ceph
        9. The 'RBD Couldn't Connect To Cluster (500)' error when connecting Ceph with Proxmox
        10. Changing the storage type from ide to virtio
        11. The 'pveceph configuration not initialized (500)' error for the Ceph tab
        12. Ceph FS storage disappears after a Proxmox node reboots
        13. VM cloning does not parse in Ceph storage
      3. Network connectivity issues
        1. No connectivity on Realtek RTL8111/8411 Rev. 06 NIC
        2. Network performance is slower with e1000 vNIC
      4. KVM virtual machine issues
        1. Windows 7/XP machine converted to Proxmox KVM hangs during boot
        2. Windows 7 VM only boots when rebooted manually
        3. The Proxmox 3.2 upgrade adds two com ports and one parallel port to the Windows VM
        4. The qemu-img command does not convert the .vmdk image files created with the .ova template in Proxmox VE 3.2
        5. Online migration of a virtual machine fails with a 'Failed to sync data' error
        6. Change in memory allocation is not initialized after a VM is rebooted
        7. The virtio virtual disk is not available during the Windows Server installation
      5. OpenVZ container issues
        1. The creation of OpenVZ container takes a long time on NFS or GlusterFS storage
        2. OpenVZ containers are no longer shown after a cluster is created
        3. Header error during the installation of PF_RING in Proxmox
      6. Backup/restore issues
        1. A Proxmox VM is locked after backup crashes unexpectedly
        2. Backing up only the primary OS virtual disk
        3. Backup of VMs stops prematurely with an 'Operation Not Permitted' error
        4. A backup task takes a very long time to complete, or it crashes when multiple nodes are backing up to the same backup storage
        5. Backup of virtual machines aborts a backup task prematurely
        6. Backup storage has a lot of .dat files and .tmp directories using the storage space
      7. VNC/SPICE console issues
        1. The mouse pointer is not shared with SPICE-VIEWER on Windows 8 VM
        2. The SPICE console has become unstable after the Proxmox VE 3.2 update
        3. Remote Viewer is unable to connect to a SPICE-enabled virtual machine on Windows OS
      8. Summary
    17. 10. Putting It All Together
      1. Scenario #1 – academic institution
      2. Scenario #2 – multitier storage cluster using Proxmox cluster
      3. Scenario #3 – virtual infrastructure for multitenant cloud service provider
      4. Scenario #4 – a nested virtual environment for a software development company
      5. Scenario #5 – a virtual infrastructure for the public library
      6. Scenario #6 – multifloor office virtual infrastructure with virtual desktops
      7. Scenario #7 – virtual infrastructure for hotel industry
      8. Scenario #8 – virtual infrastructure for a geological survey organization
      9. Network diagrams for scenarios
      10. Summary
    18. Index