Book Image

Proxmox Cookbook

By : Wasim Ahmed, Ravi K Jangid
Book Image

Proxmox Cookbook

By: Wasim Ahmed, Ravi K Jangid

Overview of this book

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.
Table of Contents (18 chapters)
Proxmox Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

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.

What this book covers

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.

What you need for this book

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.

Who this book is for

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.

Sections

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:

Getting ready

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.

How to do it…

This section contains the steps required to follow the recipe.

How it works…

This section usually consists of a detailed explanation of what happened in the previous section.

There's more…

This section consists of additional information about the recipe in order to make the reader more knowledgeable about the recipe.

See also

This section provides helpful links to other useful information for the recipe.

Conventions

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:

[OPTIONS]
enable: 1
policy_in: DROP

[RULES]
IN ACCEPT –p tcp –dport 22
IN ACCEPT –p tcp –dport 8006

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

auto vmbr0
iface vmbr0 inet static
address 192.168.10.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0

Any command-line input or output is written as follows:

# cat /etc/apt/sources.list
deb http://ftp.ca.debian.org/debian wheezy main contrib
deb http://download.proxmox.com/debian wheezy pve-no-subscription
deb http://security.debian.org / wheezy/updates main contrib

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."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

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 , 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.

Customer support

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.

Errata

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

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 with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.