Home Cloud & Networking Mastering Proxmox - Second Edition

Mastering Proxmox - Second Edition

By Wasim Ahmed
books-svg-icon Book
eBook $43.99 $29.99
Print $54.99
Subscription $15.99 $10 p/m for three months
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $43.99 $29.99
Print $54.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
  1. Free Chapter
    Understanding Proxmox VE and Advanced Installation
About this book
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.
Publication date:
May 2016
Publisher
Packt
Pages
418
ISBN
9781785888243

 

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.

About the Author
  • Wasim Ahmed

    Wasim Ahmed, born in Bangladesh and now a citizen of Canada, is a veteran of the IT world. He first came into close contact with computers in 1992 and never looked back. Wasim has a deep understanding of networks, virtualization, big data storage, and network security. By profession, Wasim is the CEO of a global IT support and cloud service provider based in Calgary, Alberta. He serves many companies and organizations through his company on a daily basis. Wasim's strength comes from his experience, which comes from learning and serving continually. Wasim strives to find the most effective solution at the most competitive price. He has built over 20 enterprise production virtual infrastructures using Proxmox and the Ceph storage system. Wasim and his team are notorious for not simply accepting a technology based on its description alone, but putting it through rigorous testing to check its validity. Any new technology that his company provides goes through months of continuous testing before it is accepted. Proxmox made the cut superbly.

    Browse publications by this author
Latest Reviews (8 reviews total)
unos caras duras cobran y luego espera que te atiendan cada semana.
It's exactly the content I'm looked for. I use Proxmox for a long time, but I wanted to study more deeply some features.
Everything fine ! The Book is helpful.
Mastering Proxmox - Second Edition
Unlock this book and the full library FREE for 7 days
Start now