39,59 €
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.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 317
Veröffentlichungsjahr: 2015
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: August 2015
Production reference: 1250815
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78398-090-1
www.packtpub.com
Author
Wasim Ahmed
Reviewers
Rudy Jauregui
Jorge Moratilla
Yacine Sebihi
Mark Verboom
Commissioning Editor
Kartikey Pandey
Acquisition Editor
Subho Gupta
Content Development Editor
Samantha Gonsalves
Technical Editor
Rahul C. Shah
Copy Editor
Sonia Michelle Cheema
Project Coordinator
Kinjal Bari
Proofreader
Safis Editing
Indexer
Monica Ajmera Mehta
Graphics
Jason Monteiro
Abhinash Sahu
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta
Wasim Ahmed, born in Bangladesh, is now a citizen of Canada and a veteran of the IT world. He first came into contact with computers in 1992, and since then, he's never looked back. Over the years, he has acquired an in-depth knowledge and understanding of network, virtualization, big data storage, and network security. By profession, Wasim is the CEO of an IT support and cloud service provider company based out of Calgary, Alberta. He provides his services to many companies and organizations on a daily basis. His strength is his experience, which he's gained from learning and serving clients regularly. He strives to find the most effective solution for a problem at the most competitive prices. He has built over 20 enterprise production virtual infrastructures from scratch using Proxmox and the Ceph storage system.
Wasim is well known for his reluctance to accept a technology based on its description alone, and putting it through rigorous tests to check its validity. Any new technology that his company provides goes through months of continuous testing before it is accepted. Proxmox has made the cut superbly.
I would like to thank all the staff at Proxmox for their support and dedication to the hypervisor community. I would also like to thank Packt Publishing for their vision of putting forward this one-of-a kind book on such a subject and their support through the journey of writing this book.
Rudy Jauregui is a site reliability engineer at Adyoulike, a French company providing the first native advertising platform for web editors around the world.
Being a Linux system administrator for important cloud hosting providers, he naturally specializes in DevOps engineering and is now working on large distributed infrastructures that receive a high amount of daily traffic. Since he's very passionate about open source and new technologies, he keeps trying new open source solutions, which are available on GitHub, and is convinced that open source technologies are the key to success in the IT world.
When on vacation, he likes to travel all around the world and meet different kinds of people in a bid to absorb their culture and knowledge. He has also become involved in skydiving and is trying to attain a B Certificate. You can follow him on Twitter at @rustx64.
Jorge Moratilla has a bachelor's degree in computer science and has worked for Internet companies since 1998. He has worked as a contractor for companies such as Sun Microsystems and Oracle. His passions are teaching and optimizing workloads of developers and production systems using automation techniques. He has worked at Sun Microsystems as a certified instructor and field engineer for several years. Jorge has a varied background and has worked with different products, such as Sun Solaris, Linux, LDAP services, and CheckPoint. Recently, he has worked with configuration management products, such as Puppet or Chef, on some assignments and has also taken part in Madrid DevOps (a group of technicians devoted to Continuous Deployment and DevOps culture) as a coordinator. He promotes the adoption of a culture of continuous improvement in enterprises and start-ups as the foundation for achieving great things. You can meet him at the talks and hangouts he organizes for the community.
Jorge has also reviewed Configuration Management with Chef-Solo, Naveed ur Rahman, Packt Publishing.
I would like to thank my wife, Nuria, and sons, Eduardo and Ruben, for being so understanding and supportive while I was reviewing this book. Also, I would like to thank my dear mom, Milagros, and dad, Toñi, who put in the effort of educating me. Finally, I would like to thank all those who have contributed to my personal and professional development through the years.
Yacine Sebihi is an IT consultant and has over 14 years of experience in Linux , open source, and virtualization. He holds certifications in Cisco Data Center, Linux RHEL, HP Storage SAN, and VMware. Currently, he's preparing for his exams (CCIE Data Center and VMware VCAP550-DCA) and is about to pursue his master's degree in expert cloud computing in France.
His personal blog can be found at http://vdatacenter.info/, where he writes technical articles and shares them with the IT world.. You can find out more about Yacine's technical skills and his personal details on his LinkedIn profile page at https://www.linkedin.com/in/sebihiy.
Mark Verboom has been adept at Unix since he first used it in 1992 (ULTRIX on VAX). With a BSc in software engineering and data communications, Mark has worked in numerous positions as a Unix administrator, consultant, and software engineer. He has branched out into areas, such as network design and administration, virtualization, security, and other non-IT fields, such as electronics and car fuel management systems. Because of this, his skills gradually became too broad to fit one job and led to him starting his own company in 2011, called Kram Solutions.
Outside of work, Mark has a keen interest in cars (modifying and upgrading them), audio books, and 3D printing.
I would like to thank Maika for her patience while reviewing this book.
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Proxmox is one of the biggest kept secrets in the world of virtualization. It stands tall with other major virtualization players, such as VMWare, Xen, Hyper-V, and so on. Since the first release of Proxmox in 2005, it has become the standard for open source hypervisors. It is loaded with great features, such as clustering, High Availability, major storage plugins, firewalls, full KVM/OpenVZ support, and a price that cannot be beaten by any other virtualization product in the industry. Proxmox provides a rock solid platform to build virtual environments that are scalable to any size and can be managed entirely from a single GUI. In a matter of minutes, a standard Proxmox cluster can be raised and brought into production without any licensing costs.
This book is written to get you familiar with Proxmox by following step-by-step procedures. The steps are broken down in as simple manner as possible, thereby allowing you to cook up a Proxmox cluster with minimal effort. This book can also be used as a quick reference to fall back on when working with a Proxmox hypervisor. Illustrations have been used wherever possible along with a hands-on approach that enables you to retain the knowledge you've acquired for a longer period of time. Different topics and features are categorized in different chapters, making this book an easy read.
Often, we lack a book that is a reference point to get things done quickly. Although there are other books on Proxmox written in greater detail, a book, such as this one, was needed so that you could be brought on board with regard to Proxmox in the least amount of time. Each chapter is written with the aim of doing more and reading less.
Chapter 1, Installing Proxmox, introduces Proxmox and its features. It also shows the types of hardware needed for a Proxmox node, the required repository, and how to install Proxmox in a few steps. At the end of the chapter, you will have a very basic Proxmox cluster up and running, which can be used throughout the book to practice the knowledge you've acquired.
Chapter 2, Getting to Know the Proxmox GUI, introduces the Proxmox graphical user interface (GUI) through illustrations and guides you through the entire menu system of Proxmox. Explanations of the functions of different categories of menus are also provided. Each menu item of different categories has been presented with visual figures along with a description of their functions.
Chapter 3, Cluster and VM Management, shows you how to create and configure a Proxmox cluster from the ground up. Topics such as virtual machine creation, migration, and cloning are also covered in this chapter. At the end of the chapter, you will be capable enough to manage virtual machines in a Proxmox cluster.
Chapter 4, Network Configurations, shows different network components and how to configure them in Proxmox. In this chapter, you will have a good understanding of how to a create virtual network within a Proxmox cluster and how all the components come together to form a complex network.
Chapter 5, Firewall Configurations, shows how to utilize the Firewall feature of Proxmox. Firewall is a fairly new feature that has enhanced Proxmox significantly. In this chapter, you will learn how to enable and configure a firewall for different entities, such as a data center, node, and VM.
Chapter 6, Storage Configurations, shows different storage plugin options that are available and how to attach them to a Proxmox cluster. Proxmox provides built-in plugins for a major storage type. In this chapter, you will learn how to attach a shared storage with Proxmox and configure it.
Chapter 7, Backup and Restore, shows you how to perform the backup and restore of a virtual machine in a Proxmox cluster. Backup is an important requirement of any network. This chapter shows you how to schedule regular backups, snapshots, and restore data in the event of a disaster.
Chapter 8, Updating and Upgrading Proxmox, shows you the upgrade process to keep a Proxmox node up to date at all times. Keeping a Proxmox node updated is important for an issue-free environment. In this chapter, you will learn the proper procedure to commit updates on a Proxmox node.
Chapter 9, Monitoring Proxmox, shows you the ways in which you can monitor Proxmox and Ceph clusters using the Zabbix and Ceph dashboards. The steps involved in configuring a host or virtual machine that needs to be monitored, are covered along with installation of the Ceph dashboard. At the end of this chapter, you will know how to monitor and configure notifications.
Chapter 10, Advanced Configurations for VMs, shows advanced configuration steps to add features such as sound, PCI passthrough, and more. Advanced configuration extends the ability of a VM beyond just the basics. This chapter shows steps to make this advanced configuration work seamlessly.
Chapter 11, The CLI Command Reference, shows you several lists of the most commonly used commands to manage different aspects of Proxmox, such as a cluster, storage, and so on. This is a reference chapter for quickly finding the most commonly used commands. Commands have been listed in different categories for an easy find.
This book is designed with a hands-on approach in mind. Therefore, access to a Proxmox cluster or having enough hardware to build a cluster will greatly enhance the value of this book. A minimum of two nodes will be sufficient to practice all the steps described herein.
You will also need to download Proxmox VE 3.4 ISO images from the official Proxmox site. To set up a FreeNAS storage system reader, you will also need to download the ISO image of the FreeNAS 9.3 stable release from the official FreeNAS site. We have used PuTTY to log in to a Proxmox node through SSH, so, a copy of the PuTTY program is also needed. You can use any other SSH programs of your choice. All three of these files can be downloaded from the following links:
To download Proxmox, visit http://proxmox.com/en/downloads/category/iso-images-pve.
To download FreeNAS, visit http://www.freenas.org/download-freenas-release.html.
To download Putty, visit http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.
This book is perfect for system administrators who want to learn how 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 the Proxmox VE is required.
In this book, you will find several headings that appear frequently (Getting ready, How to do it, How it works, There's more, and See also).
To give clear instructions on how to complete a recipe, we use these sections as follows:
This section tells you what to expect in the recipe, and describes how to set up any software or any preliminary settings required for the recipe.
This section contains the steps required to follow the recipe.
This section usually consists of a detailed explanation of what happened in the previous section.
This section consists of additional information about the recipe in order to make the reader more knowledgeable about the recipe.
This section provides helpful links to other useful information for the recipe.
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Once you have the information, simply run the apt-get command to install it through CLI."
A block of code is set as follows:
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
Any command-line input or output is written as follows:
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "After the installation is completed, eject the installation disk or the USB media, then click on Reboot."
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.
To send us general feedback, simply e-mail <[email protected]>, and mention the book's title in the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]> with a link to the suspected pirated material.
We appreciate your help in protecting our authors and our ability to bring you valuable content.
If you have a problem with any aspect of this book, you can contact us at <[email protected]>, and we will do our best to address the problem.
In this chapter, we are going to cover the following Proxmox basics:
The Proxmox Virtual Environment (VE) is an open source multinode clustered hypervisor built on Debian Linux, and is able to run on commodity hardware, thus eliminating any vendor lock ins. Proxmox is freely available without any features locked. However, a subscription type license is available to enable a enterprise repository to receive well-tested patches and updates. Subscriptions are recommended for a production-level Proxmox environment.
A hypervisor is a software or firmware that creates a layer between native hardware and an operating system to form a virtual environment to create and run virtual machines. A hypervisor emulates the functions of physical hardware to enable virtual machines to see them as physical resources.
Proxmox can be configured to run a virtual environment of just a few nodes with virtual machines or an environment with thousands of nodes. Supporting both KVM and OpenVZ container-based virtual machines, Proxmox VE is a leading hypervisor today. Proxmox has an extremely vibrant community ready to provide help to any free Proxmox users. Also, the expert technical support team of Proxmox is equally capable of handling all corporate users with their mission critical virtual environment.
As mentioned earlier, Proxmox is a multinode environment, meaning that many nodes can form a single cluster where a virtual machine can be moved around to any node within the cluster, thereby allowing a redundant virtual environment. Through a robust Graphical User Interface (GUI), the entire Proxmox cluster can be managed. As of Proxmox VE 3.4, only one cluster is manageable through the GUI.
Here are some of the notable features of the Proxmox VE:
Proxmox can be installed on just about any commodity hardware, but in order to have a stable platform, some attention is required when selecting nodes. A setup selected for Proxmox learning can be underpowered and less expansive. While this setup is acceptable for very small environments and home usage, it will not be adequate for production-level setups where stability and redundancy is the minimum requirement.
Here are the minimum requirements to install Proxmox on a hardware node:
Based on the minimum requirement of Proxmox, here are examples of Intel and AMD-based hardware configurations that are suitable for learning:
Processor →
Requirement ↓
Intel
AMD
Processor/CPU
i3-4160 3.0 GHz
FX-4300 3.8 GHz
Motherboard
Asus B85M-D Plus 6 x SATA
Asus M5A78L-M/USB3 6 x SATA
Memory
Corsair 1 x 4 GB DDR3
Corsair 1 x 4 GB DDR3
To have a stable performing Proxmox cluster, here are the hardware configurations that are recommended:
For more details on fencing and HA visit https://pve.proxmox.com/wiki/Fencing.
The following table lists the configurations of a server node that can be used in a production environment:
Requirement
Hardware
Processor/CPU
Intel Xeon E5-2630 v3 2.4 GHz
Motherboard
Intel S2600CP2 Dual LGA2011
Memory
Kingston 16 GB DDR3 Registered ECC
Power supply
Redundant
Note that the example configurations are for reference only. Your requirement will vary depending on the work load and expected performance. Adjust the hardware requirements accordingly by keeping in mind that in a hypervisor more core counts will increase performance of virtual machines rather than higher clock counts of a processor that is used. With a higher core count, more threads can be distributed among processors.
It is worth mentioning here that it is better to select a CPU with a higher cache amount for a node with large amount of memory to minimize the main memory access and maximize the performance for each CPU cores.
Proxmox is a clustered hypervisor. In order to set up a cluster, a minimum of two nodes are required. For the purpose of following through this book, when selecting hardware, be sure to have enough components to set up two nodes.
For more details on Proxmox, please visit http://www.proxmox.com/.
Although a Proxmox cluster can be set up with just two nodes, a minimum of three nodes are recommended for a production environment.
In a cluster, a quorum is established with a minimum of three votes. Each node is counted as single vote. The cluster health depends on this democratic system where the majority vote wins. So, in a two node cluster, when one node fails the other node can only cast one vote, creating an unresolved situation. With a three node cluster, when one node fails, the total vote from the remaining nodes is two out of possible three votes. Thus, the cluster operation continues. By any means, a two node cluster is not recommended for a production cluster. However, it is still possible to create using instructions by visiting https://pve.proxmox.com/wiki/Two-Node_High_Availability_Cluster.
Once the necessary hardware is assembled, in this recipe, we are going to see how to prepare ourselves before installing Proxmox.
We are going to use the Proxmox VE installation disk to install Proxmox. First, we need to prepare a disk with the Proxmox installation ISO image.
Here are the steps to install Proxmox:
Some nodes may not have a ROM drive available to install from a disk. In such cases, it is possible to install Proxmox by transferring an ISO image onto a USB flash drive. Note that in order to boot from USB media, your motherboard must support the USB boot option. Check from the motherboard BIOS before proceeding to the following steps. If the motherboard does not support USB boot option, it may not also support an external USB ROM Drive. In this case, the best way to proceed is to install an ROM drive in the computer or use a newer motherboard if possible. Here are the instructions to transfer an ISO image to a USB and use it as bootable drive:
Use the following steps to do this on Windows:
In some Windows 7 versions, the preceding writer may not work. In such scenarios, download and install the ImageUSB from http://www.osforensics.com/tools/write-usb-images.html.
Use the following steps to do this on Linux:
The Proxmox installation process is guided by a fully graphical interface through various prompts. In this recipe, we are going to follow through creating our first Proxmox node.
Power up and boot the physical node using the installation disk or the USB media we created in the preceding recipe. The following screenshot is how the screen looks after the boot:
