Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Proxmox. - Second Edition
Mastering Proxmox. - Second Edition

Mastering Proxmox.: Master the skills you need to build a rock-solid virtualization environment with the all new Proxmox 4, Second Edition

By Wasim Ahmed
Mex$902.99 Mex$631.99
Book May 2016 418 pages 2nd Edition
eBook
Mex$902.99 Mex$631.99
Print
Mex$1,128.99
Subscription
Free Trial
eBook
Mex$902.99 Mex$631.99
Print
Mex$1,128.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : May 27, 2016
Length 418 pages
Edition : 2nd Edition
Language : English
ISBN-13 : 9781785888243
Vendor :
Proxmox
Table of content icon View table of contents Preview book icon Preview Book

Mastering Proxmox. - Second Edition

Chapter 1. Understanding Proxmox VE and Advanced Installation

Virtualization, as we all know today, is a decades old technology that was first implemented in mainframes of the 1960s. Virtualization was a way to logically divide the mainframe's resources for different application processing. With the rise in energy costs, running under-utilized server hardware is no longer a luxury. Virtualization enables us to do more with less, thus save energy and money while creating a virtual green data center without geographical boundaries.

A hypervisor is a piece of software, hardware, or firmware that creates and manages virtual machines. It is the underlying platform or foundation that allows a virtual world to be built upon. In a way, it is the very building block of all virtualization. A bare metal hypervisor acts as a bridge between physical hardware and the virtual machines by creating an abstraction layer. Because of this unique feature, an entire virtual machine can be moved over a vast distance over the Internet and be made able to function exactly the same. A virtual machine does not see the hardware directly; instead, it sees the layer of the hypervisor, which is the same no matter on what hardware the hypervisor has been installed.

The Proxmox Virtual Environment (VE) is a cluster-based hypervisor and one of the best kept secrets in the virtualization world. The reason is simple. It allows you to build an enterprise business-class virtual infrastructure at a small business-class price tag without sacrificing stability, performance, and ease of use. Whether it is a massive data center to serve millions of people, or a small educational institution, or a home serving important family members, Proxmox can handle configuration to suit any situation.

If you have picked up this book, no doubt you will be familiar with virtualization and perhaps well versed with other hypervisors, such VMWare, Xen, Hyper-V, and so on. In this chapter and upcoming chapters, we will see the mighty power of Proxmox from the inside out. We will examine scenarios and create a complex virtual environment. We will tackle some heavy day-to-day issues and show resolutions, which might just save the day in a production environment. So, strap yourself in and let's dive into the virtual world with the mighty hypervisor, Proxmox VE.

Understanding Proxmox features


Before we dive in, it is necessary to understand why one should choose Proxmox over the other main stream hypervisors. Proxmox is not perfect but stands out among other contenders with some hard-to-beat features. The following are some of the features that makes Proxmox a real game changer.

It is free!

Yes, Proxmox is free! To be more accurate, Proxmox has several subscription levels among which the community edition is completely free. One can simply download Proxmox ISO at no cost and raise a fully functional cluster without missing a single feature and without paying anything. The main difference between the paid and community subscription level is that the paid subscription receives updates, which goes through additional testing and refinement. If you are running a production cluster with a real workload, it is highly recommended that you purchase support and licensing from Proxmox or Proxmox resellers.

Built-in firewall

Proxmox VE comes with a robust firewall ready to be configured out of the box. This firewall can be configured to protect the entire Proxmox cluster down to a virtual machine. The Per VM firewall option gives you the ability to configure each VM individually by creating individualized firewall rules, a prominent feature in a multi-tenant virtual environment. We will learn about this feature in detail in Chapter 8, The Proxmox Firewall.

Open vSwitch

Licensed under the Apache 2.0 license, Open vSwitch is a virtual switch designed to work in a multi-server virtual environment. All hypervisors need a bridge between VMs and the outside network. Open vSwitch enhances features of the standard Linux bridge in an ever-changing virtual environment. Proxmox fully supports Open vSwitch, which allows you to create an intricate virtual environment all the while, reducing virtual network management overhead. For details on Open vSwitch, refer to http://openvswitch.org/.

We will learn about Open vSwitch management in Proxmox in Chapter 7, Network of Virtual Networks.

The graphical user interface

Proxmox comes with a fully functional graphical user interface, or GUI, out of the box. The GUI allows an administrator to manage and configure almost all the aspects of a Proxmox cluster. The GUI has been designed keeping simplicity in mind with functions and features separated into menus for easier navigation. The following screenshot shows an example of the Proxmox GUI dashboard:

We will dissect the Proxmox GUI dashboard in Chapter 2, Exploring the Proxmox GUI.

KVM

KVM or Kernel-based virtual machine is a kernel module that is added to Linux for full virtualization to create isolated fully independent virtual machines. KVM VMs are not dependent on the host operating system in any way, but they do require the virtualization feature in BIOS to be enabled. KVM allows a wide variety of operating systems for virtual machines, such as Linux and Windows. Proxmox provides a very stable environment for KVM-based VMs. We will learn how to create KVM VMs and also how to manage them in Chapter 5, KVM Virtual Machines.

Linux containers or LXC

Introduced recently in Proxmox VE 4.0, Linux containers allow multiple Linux instances on the same Linux host. All the containers are dependent on the host Linux operating system and only Linux flavors can be virtualized as containers. There are no containers for the Windows operating system. LXC replace prior OpenVZ containers, which were the primary containers in the virtualization method in the previous Proxmox versions. If you are not familiar with LXC, and for details on LXC, refer to https://linuxcontainers.org/.

We will learn how to create LXC containers and manage them in Chapter 6, LXC Virtual Machines.

Storage plugins

Out of the box, Proxmox VE supports a variety of storage systems to store virtual disk images, ISO templates, backups, and so on. All plug-ins are quite stable and work great with Proxmox. Being able to choose different storage systems gives an administrator the flexibility to leverage the existing storage in the network. As of Proxmox VE 4.0, the following storage plugins are supported:

  • The local directory mount points

  • iSCSI

  • LVM Group

  • NFS Share

  • GlusterFS

  • Ceph RBD

  • ZFS

We will learn the usage of different storage systems and the types of file they can store in detail in Chapter 4, Storage Systems.

Vibrant culture

Proxmox has a growing community of users who are always helping others to learn Proxmox and troubleshoot various issues. With so many active users around the world and through active participation of Proxmox developers, the community has now become a culture of its own. Feature requests are continuously being worked on, and the existing features are being strengthened on a regular basis. With so many users supporting Proxmox, it is here to stay.

The basic installation of Proxmox


The installation of a Proxmox node is very straightforward. Simply accept the default options, select localization, and enter the network information to install Proxmox VE. We can summarize the installation process in the following steps:

  1. Download ISO from the official Proxmox site and prepare a disk with the image (http://proxmox.com/en/downloads).

  2. Boot the node with the disk and hit Enter to start the installation from the installation GUI. We can also install Proxmox from a USB drive.

  3. Progress through the prompts to select options or type in information.

  4. After the installation is complete, access the Proxmox GUI dashboard using the IP address, as follows:

    https://<proxmox_node_ip:8006
  5. In some cases, it may be necessary to open the firewall port to allow access to the GUI over port 8006.

The advanced installation option


Although the basic installation works in all scenarios, there may be times when the advanced installation option may be necessary. Only the advanced installation option provides you the ability to customize the main OS drive.

A common practice for the operating system drive is to use a mirror RAID array using a controller interface. This provides drive redundancy if one of the drives fails. This same level of redundancy can also be achieved using a software-based RAID array, such as ZFS. Proxmox now offers options to select ZFS-based arrays for the operating system drive right at the beginning of the installation. For details on ZFS, if you are not familiar with it, refer to https://en.wikipedia.org/wiki/ZFS.

Note

It is a common question to ask why one should choose ZFS software-based RAID over tried and tested hardware-based RAID. The simple answer is flexibility. A hardware-based RAID is locked or fully dependent on the hardware RAID controller interface that created the array, whereas a ZFS software-based RAID is not dependent on any hardware, and the array can easily be ported to different hardware nodes. Should a RAID controller failure occur, the entire array created from that controller is lost unless there is an identical controller interface available for replacement. The ZFS array is only lost when all the drives or maximum tolerable number of drives are lost in the array.

Besides ZFS, we can also select other filesystem types, such as ext3, ext4, or xfs, from the same advanced option. We can also set the custom disk or partition sizes through the advanced option. The following screenshot shows the installation interface with the Target Harddisk selection page:

Click on Options, as shown in the preceding screenshot, to open the advanced option for the Hard disk. The following screenshot shows the options window after clicking on the Options button:

In the preceding screenshot, we selected ZFS RAID1 for mirroring and the two drives, Harddisk 0 and Harddisk 1 respectively, to install Proxmox. If we pick one of the filesystems such as ext3, ext4, or xfs instead of ZFS, the Harddisk options dialog box will look like the following screenshot, that is, with different set of options:

Selecting a filesystem gives us the following advanced options:

  • hdsize: This is the total drive size to be used by the Proxmox installation.

  • swapsize: This defines the swap partition size.

  • maxroot: This defines the maximum size to be used by the root partition.

  • minfree: This defines the minimum free space that should remain after the Proxmox installation.

  • maxvz: This defines the maximum size for data partition. This is usually /var/lib/vz.

Debugging the Proxmox installation


Debugging features are part of any good operating system. Proxmox has debugging features that will help you during a failed installation. Some common reasons are unsupported hardware, conflicts between devices, ISO image errors, and so on. Debugging mode logs and displays installation activities in real time. When the standard installation fails, we can start the Proxmox installation in debug mode from the main installation interface, as shown in the following screenshot:

The debug installation mode will drop us in the following prompt. To start the installation, we need to press Ctrl + D. When there is an error during the installation, we can simply press Ctrl + C to get back to this console to continue with our investigation:

From the console, we can check the installation log using the following command:

# cat /tmp/install.log

From the main installation menu, we can also press e to enter edit mode to change the loader information, as shown in the following screenshot:

At times, it may be necessary to edit the loader information when normal booting does not function. This is a common case when Proxmox is unable to show the video output due to UEFI or a non-supported resolution. In such cases, the booting process may hang. One way to continue with booting is to add the nomodeset argument by editing the loader. The loader will look as follows after editing:

linux/boot/linux26 ro ramdisk_size=16777216 rw quiet nomodeset

Customizing the Proxmox splash screen


When building a custom Proxmox solution, it may be necessary to change the default blue splash screen to something more appealing in order to identify the company or department the server belongs to. In this section, we will see how easily we can integrate any image as the splash screen background.

The splash screen image must be in the .tga format and must have fixed standard sizes, such as 640 x 480, 800 x 600, or 1024 x 768. If you do not have any image software that supports the .tga format, you can easily convert an jpg, gif, or png image to the .tga format using a free online image converter (http://image.online-convert.com/convert-to-tga).

Once the desired image is ready in the .tga format, the following steps will integrate the image as the Proxmox splash screen:

  1. Copy the .tga image in the Proxmox node in the /boot/grub directory.

  2. Edit the grub file in /etc/default/grub to add the following code, and click on save:

    GRUB_BACKGROUND=/boot/grub/<image_name>.tga
  3. Run the following command to update the grub configuration:

    # update-grub
    
  4. Reboot.

The following screenshot shows an example of how the splash screen may look after we add a custom image to it:

Picture courtesy of www.techcitynews.com

We can also change the font color to make it properly visible, depending on the custom image used. To change the font color, edit the debian theme file in /etc/grub.d/05_debian_theme, and find the following line of code:

set_background_image "${GRUB_BACKGROUND}" || set_default_theme

Edit the line to add the font color, as shown in the following format. In our example, we have changed the font color to black and highlighted the font color to light blue:

set_background_image "${GRUB_BACKGROUND}" "black/black" "light-blue/black" || set_default_theme

After making the necessary changes, update grub, and reboot to see the changes.

Summary


In this chapter, we looked at why Proxmox is a good option as a hypervisor, what advanced installation options are available during an installation, and why we choose software-based RAID for the operating system drive. We also looked at the cost of Proxmox, storage options, and network flexibility using Open vSwitch. We learned the presence of the debugging features and customization options of the Proxmox splash screen.

In next chapter, we will take a closer look at the Proxmox GUI and see how easy it is to centrally manage a Proxmox cluster from a web browser.

Left arrow icon Right arrow icon

Key benefits

  • Formulate Proxmox-based solutions and set up virtual machines of any size while gaining expertise even on the most complex multi-cluster setups
  • Master the skills needed to analyze, monitor, and troubleshoot real-world virtual environments
  • This is the most up-to-date title on mastering Proxmox, with examples based on the new Linux Kernel 4.2 and Debian Jessie (8.x)

Description

Proxmox is an open source server virtualization solution that has enterprise-class features to manage virtual machines, to be used for storage, and to virtualize both Linux and Windows application workloads. You begin with refresher on the advanced installation features and the Proxmox GUI to familiarize yourself with the Proxmox VE hypervisor. You then move on to explore Proxmox under the hood, focusing on the storage systems used with Proxmox. Moving on, you will learn to manage KVM Virtual Machines and Linux Containers and see how networking is handled in Proxmox. You will then learn how to protect a cluster or a VM with a firewall and explore the new HA features introduced in Proxmox VE 4 along with the brand new HA simulator. Next, you will dive deeper into the backup/restore strategy followed by learning how to properly update and upgrade a Proxmox node. Later, you will learn how to monitor a Proxmox cluster and all of its components using Zabbix. By the end of the book, you will become an expert at making Proxmox environments work in production environments with minimum downtime.

What you will learn

[*] Install the basic Proxmox VE nodes [*] Get to know the Proxmox Graphical User Interface (GUI) [*] See and understand Proxmox's internal structure and mechanics [*] Create and manage KVM- or LXC-based virtual machines [*] Understand advanced virtual networks [*] Leverage the power of the built-in Proxmox firewall to provide protection at any level [*] Configure high availability Proxmox nodes [*] Learn different backup strategies and to restore a VM in the event of a disaster to ensure data safety [*] Monitor a Proxmox cluster and all of its components using Zabbix [*] Plan large virtual environments for mission critical virtual environments [*] Work through real-world scenarios to troubleshoot Proxmox

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : May 27, 2016
Length 418 pages
Edition : 2nd Edition
Language : English
ISBN-13 : 9781785888243
Vendor :
Proxmox

Table of Contents

21 Chapters
Mastering Proxmox - Second Edition Chevron down icon Chevron up icon
Credits Chevron down icon Chevron up icon
About the Author Chevron down icon Chevron up icon
About the Reviewer Chevron down icon Chevron up icon
www.PacktPub.com Chevron down icon Chevron up icon
Preface Chevron down icon Chevron up icon
Understanding Proxmox VE and Advanced Installation Chevron down icon Chevron up icon
Exploring the Proxmox GUI Chevron down icon Chevron up icon
Proxmox under the Hood Chevron down icon Chevron up icon
Storage Systems Chevron down icon Chevron up icon
KVM Virtual Machines Chevron down icon Chevron up icon
LXC Virtual Machines Chevron down icon Chevron up icon
Network of Virtual Networks Chevron down icon Chevron up icon
The Proxmox Firewall Chevron down icon Chevron up icon
Proxmox High Availability Chevron down icon Chevron up icon
Backup/Restore VMs Chevron down icon Chevron up icon
Updating and Upgrading Proxmox Chevron down icon Chevron up icon
Monitoring a Proxmox Cluster Chevron down icon Chevron up icon
Proxmox Production-Level Setup Chevron down icon Chevron up icon
Proxmox Troubleshooting Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.