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
$15.99 per month
Book May 2016 418 pages 2nd Edition
eBook
$43.99 $29.99
Print
$54.99
Subscription
$15.99 Monthly
eBook
$43.99 $29.99
Print
$54.99
Subscription
$15.99 Monthly

What do you get with a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

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 a Packt Subscription?

Free for first 7 days. $15.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

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

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.