Learning Proxmox VE

4.3 (6 reviews total)
By Rik Goldman
  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies

About this book

Proxmox VE 4.1 provides an open source, enterprise virtualization platform on which to host virtual servers as either virtual machines or containers.

This book will support your practice of the requisite skills to successfully create, tailor, and deploy virtual machines and containers with Proxmox VE 4.1. Following a survey of PVE's features and characteristics,this book will contrast containers with virtual machines and establish cases for both. It walks through the installation of Proxmox VE, explores the creation of containers and virtual machines, and suggests best practices for virtual disk creation, network configuration, and Proxmox VE host and guest security.Throughout the book, you will navigate the Proxmox VE 4.1 web interface and explore options for command-line management

Publication date:
March 2016
Publisher
Packt
Pages
224
ISBN
9781783981786

 

Chapter 1. Proxmox VE Fundamentals

Proxmox Virtual Environment (PVE) is a mature, complete, well-supported, enterprise-class virtualization environment for servers. It is an open source tool—based in the Debian GNU/Linux distribution—that manages containers, virtual machines, storage, virtualized networks, and high-availability clustering through a well-designed, web-based interface or via the command-line interface.

Note

Developers provided the first stable release of Proxmox VE in 2008; four years and eight point releases later, ZDNet's Ken Hess boldly, but quite sensibly, declared Proxmox VE as Proxmox: The Ultimate Hypervisor (http://www.zdnet.com/article/proxmox-the-ultimate-hypervisor/).Four years later, PVE is on version 4.1, in use by at least 90,000 hosts, and more than 500 commercial customers in 140 countries; the web-based administrative interface itself is translated into 19 languages.

This chapter explores the fundamental technologies underlying PVE's hypervisor features: LXC, KVM, and QEMU. To do so, we will develop a working understanding of virtual machines, containers, and their appropriate use.

We will cover the following topics in this chapter:

  • Proxmox VE in brief
  • Virtualization and containerization with PVE
  • Proxmox VE virtual machines, KVM, and QEMU
  • Containerization with PVE and LXC
 

Proxmox VE in brief


With Proxmox VE, Proxmox Server Solutions GmbH (https://www.proxmox.com/en/about) provides us with an enterprise-ready, open source type 2 Hypervisor. Later, you'll find some of the features that make Proxmox VE such a strong enterprise candidate.

  • The license for Proxmox VE is very deliberately the GNU Affero General Public License (V3) (https://www.gnu.org/licenses/agpl-3.0.html). From among the many free and open source compatible licenses available, this is a significant choice because it is "specifically designed to ensure cooperation with the community in the case of network server software."
  • PVE is primarily administered from an integrated web interface, from the command line locally, or via SSH. Consequently, there is no need for a separate management server and the associated expenditure. In this way, Proxmox VE significantly contrasts with alternative enterprise virtualization solutions by vendors such as VMware.
  • Proxmox VE instances/nodes can be incorporated into PVE clusters, and centrally administered from a unified web interface.
  • Proxmox VE provides for live migration—the movement of a virtual machine or container from one cluster node to another without any disruption of services. This is a rather unique feature of PVE and not common in competing products.

Features

Proxmox VE

VMware vSphere

Hardware requirements

Flexible

Strict compliance with HCL

Integrated management interface

Web- and shell-based (browser and SSH)

No. Requires dedicated management server at additional cost

Simple subscription structure

Yes; based on number of premium support tickets per year and CPU socket count

No

High availability

Yes

Yes

VM live migration

Yes

Yes

Supports containers

Yes

No

Virtual machine OS support

Windows and Linux

Windows, Linux, and Unix

Community support

Yes

No

Live VM snapshots

Yes

Yes

Contrasting Proxmox VE and VMware vSphere features

Note

For a complete catalog of features, see the Proxmox VE datasheet at https://www.proxmox.com/images/download/pve/docs/Proxmox-VE-Datasheet.pdf.

Like its competitors, PVE is a hypervisor: a typical hypervisor is software that creates, runs, configures, and manages virtual machines based on an administrator or engineer's choices.

PVE is known as a type 2 hypervisor because the virtualization layer is built upon an operating system.

As a type 2 hypervisor, Proxmox VE is built on the Debian project. Debian is a GNU/Linux distribution renowned for its reliability, commitment to security, and its thriving and dedicated community of contributing developers.

A type 2 hypervisor, such as PVE, runs directly over the operating system. In Proxmox VE's case, the operating system is Debian; since the release of PVE 4.0, the underlying operating system has been Debian "Jessie."

By contrast, a Type I Hypervisor (such as VMware's ESXi) runs directly on bare metal without the mediation of an operating system. It has no additional function beyond managing virtualization and the physical hardware.

A type I hypervisor runs directly on hardware, without the mediation of an operating system.

Note

Debian-based GNU/Linux distributions are arguably the most popular GNU/Linux distributions for the desktop.

One characteristic that distinguishes Debian from competing distributions is its release policy: Debian releases only when its development community can ensure its stability, security, and usability.

Debian does not distinguish between long-term support releases and regular releases as do some other distributions.

Instead, all Debian releases receive strong support and critical updates throughout the first year following the next release. (Since 2007, a major release of Debian has been made about every two years. Debian 8, Jessie, was released just about on schedule in 2015.

Proxmox VE's reliance on Debian is thus a testament to its commitment to these values: stability, security, and usability during scheduled releases that favor cutting-edge features.

PVE provides its virtualization functionality through three open technologies managed through a unified web-based interface:

  • LXC
  • KVM
  • QEMU

To understand how this foundation serves Proxmox VE, we must first be able to clearly understand the relationship between virtualization (or, specifically, hardware virtualization) and containerization (OS virtualization). As we proceed, their respective use cases should become clear.

 

Virtualization with Proxmox VE


It is correct to ultimately understand containerization as a type of virtualization. However, here, we'll look first to conceptually distinguish a virtual machine from a container by focusing on contrasting characteristics.

Simply put, virtualization is a technique through which we provide fully-functional, computing resources without a demand for the resources' physical organization, locations, or relative proximity.

Virtualization technology allows us to share and allocate the resources of a physical computer with multiple execution environments. Without context, virtualization is a vague term. It encapsulates the abstraction of such resources as storage, networks, servers, desktop environments, and even applications from their concrete hardware requirements through software implementation solutions called hypervisors.

Virtualization thus affords us more flexibility, more functionality, and a significant positive impact on our budgets which are often realized with merely the resources we have at hand.

In terms of PVE, virtualization most commonly refers to the abstraction of all aspects of a discrete computing system from its hardware. In this context, virtualization is the creation, in other words, of a virtual machine or VM, with its own operating system and applications.

A VM may be initially understood as a computer that has the same functionality as a physical machine. Likewise, it may be incorporated and communicated with via a network exactly as a machine with physical hardware would. Put yet another way, from inside a VM, we will experience no difference from which we can distinguish it from a physical computer.

The virtual machine, moreover, hasn't the physical footprint of its physical counterparts. The hardware it relies on is, in fact, provided by software that borrows from the hardware resources of a host installed on a physical machine (or bare metal).

Nevertheless, the software components of the virtual machine, from the applications to the operating system, are distinctly separated from those of the host machine. This advantage is realized when it comes to allocating physical space for resources.

For example, we may have a PVE server running a web server, database server, firewall, and log management system—all as discrete virtual machines. Rather than consuming physical space, resources, and labor of maintaining four physical machines, we simply make physical room for the single Proxmox VE server and configure an appropriate virtual LAN as necessary.

In a white paper entitled Putting Server Virtualization to Work, AMD articulates well the benefits of virtualization to businesses and developers (https://www.amd.com/Documents/32951B_Virtual_WP.pdf):

Top 5 business benefits of virtualization:

Increases server utilization

Improves service levels

Streamlines manageability and security

Decreases hardware costs

Reduces facility costs

The benefits of virtualization with a development and test environment:

Lowers capital and space requirements

Lowers power and cooling costs

Increases efficiencies through shorter test cycles

Faster time-to-market

To these benefits, let's add portability and encapsulation: the unique ability to migrate a live VM from one PVE host to another—without suffering a service outage.

Proxmox VE makes the creation and control of virtual machines possible through the combined use of two free and open source technologies: Kernel-based Virtual Machine (or KVM) and (Quick Emulator (QEMU). Used together, we refer to this integration of tools as KVM-QEMU.

KVM

KVM has been an integral part of the Linux kernel since February 2007. This kernel module allows GNU/Linux users and administrators to take advantage of an architecture's hardware virtualization extensions; for our purposes, these extensions are AMD's AMD-V and Intel'sVT-X for the x86_64 architecture.

To really make the most of Proxmox VE's feature set, you'll therefore want to install on an x86_64 machine with a CPU that has integrated virtualization extensions. For a full list of AMD and Intel processors supported by KVM, visit Intel at http://ark.intel.com/Products/VirtualizationTechnology or AMD at http://support.amd.com/en-us/kb-articles/Pages/GPU120AMDRVICPUsHyperVWin8.aspx.

QEMU

QEMU provides an emulation and virtualization interface that can be scripted or otherwise controlled by a user.

Visualizing the relationship between KVM and QEMU

Without Proxmox VE, we could essentially define the hardware, create a virtual disk, and start and stop a virtualized server from the command line using QEMU.

Alternatively, we could rely on any one of an array of GUI frontends for QEMU (a list of GUIs available for various platforms can be found at http://wiki.qemu.org/Links#GUI_Front_Ends).

Of course, working with these solutions is productive only if you're interested in what goes on behind the scenes in PVE when virtual machines are defined. Proxmox VE's management of virtual machines, is itself, managing QEMU through its API.

Note

Managing QEMU from the command line can be tedious. The following is a line from a script that launched Raspbian, a Debian remix intended for the architecture of the Raspberry Pi, on an x86 Intel machine running Ubuntu. When we see how easy it is to manage VMs from Proxmox VE's administrative interfaces, we'll sincerely appreciate that relative simplicity:qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda ./$raspbian_img -hdb swap

If you're familiar with QEMU's emulation features, it's perhaps important to note that we can't manage emulation through the tools and features Proxmox VE provides—despite its reliance on QEMU. From a bash shell provided by Debian, it's possible. However, the emulation can't be controlled through PVE's administration and management interfaces.

OS Virtualization with Proxmox VE

Containers are another type of virtualization. Synonymous with OS virtualization, containers have enjoyed a recent renaissance. In contrast to VMs, containers share operating system components, such as libraries and binaries, with the host operating system; a virtual machine does not.

Visually contrasting virtual machines with containers

Tip

The container advantage

This arrangement potentially allows a container to run leaner and with fewer hardware resources borrowed from the host. For many authors, pundits, and users, containers also offer a demonstrable advantage in terms of speed and efficiency. (However, it should be noted here that as resources such as RAM and more powerful CPUs become cheaper, this advantage will diminish.)

The Proxmox VE container is made possible through LXC from version 4.0 onwards (it's made possible through OpenVZ in previous PVE versions). LXC is the third fundamental technology serving Proxmox VE's ultimate interest. Like KVM and QEMU, LXC (or Linux Containers) is an open source technology. It allows a host to run, and an administrator to manage, multiple operating system instances as isolated containers on a single physical host. Conceptually then, a container very clearly represents a class of virtualization, rather than an opposing concept. Nevertheless, it's helpful to maintain a clear distinction between a virtual machine and a container as we come to terms with PVE.

The ideal implementation of a Proxmox VE guest is contingent on our distinguishing and choosing between a virtual machine solution and a container solution.

Since Proxmox VE containers share components with the host operating system which offers advantages in terms of efficiency, this text will guide you through the creation of containers whenever the intended guest can be fully realized with Debian Jessie as our hypervisor's operating system without sacrificing features.

When our intent is a guest running a Microsoft Windows operating system, for example, a Proxmox VE container ceases to be a solution. In such a case, we turn, instead, to creating a virtual machine. We must rely on a VM precisely because the operating system components that Debian can share with a Linux container are not components that a Microsoft Windows operating system can make use of.

 

Summary


In this chapter, we have come to terms with the three open source technologies that provide Proxmox VE's foundational features: containerization and virtualization with LXC, KVM, and QEMU.

Along the way, we've come to understand that containers, while being a type of virtualization, have characteristics that distinguish them from virtual machines.

These differences will be crucial as we determine which technology to rely on for a virtual server solution with Proxmox VE.

The next chapter will guide you through the installation and configuration of your first Proxmox VE server. It will thus introduce Proxmox VE hardware specifications and installation methods. Finally, it will provide a thorough walkthrough of the Proxmox Installer.

Let's move forward and prepare our first PVE instance, which we will use to host both containers and virtual machines.

About the Author

  • Rik Goldman

    Rik Goldman had 18 years of professional IT experience and 17 years of teaching experience when he became the director of technology and a teacher of advanced computing at Chelsea School in 2012.

    Throughout his 10 years at the university, he concentrated on literary computing, new media, humanities computing, and virtuality. At first, Rik supported his studies by developing institutional websites and database applications; eventually, however, he became the administrator of Solaris and Irix servers for West Virginia University's Center for Literary Computing, a lab committed to the study of electronic texts, virtuality, and digital composition and rhetoric.

    In the classroom, Rik's commitment to authentic teaching and learning as well as his advocacy of social justice and equity have placed him at the vanguard of technology education. Working with and learning from his students, he has overseen projects that have provided real solutions for school infrastructure, data management, and programming. His many accomplishments reveal an educator who strives to provide authentic opportunities for learning and engagement, but his true legacy lies in what he has engendered in his students: a desire for knowledge, a critical urge, and an analyst's zeal for complex abstractions. Through this work with students and his responsibilities as a systems administrator, Rik has enjoyed a productive preoccupation with virtualization technologies and their impact on popular culture.

    Since his full-time adoption of Red Hat 5 at home, he has been committed to GNU/Linux and the underlying philosophies that have made it so  successful. Consequently, he is a passionate advocate of open source and free software. Together with his students, he has contributed to the success of a myriad open source endeavors by developing documentation, writing code, and mentoring communities of young developers from around the world.

    In his free time, Rik enjoys reading literature, exploring critical theory, listening to records, and traveling to concerts with his family.

    Browse publications by this author

Latest Reviews

(6 reviews total)
aun no he podido disfrutar de mi producto no funciona
Alles geht ganz easy und schnell.
Great! I just found contents what I want.

Recommended For You

Book Title
Unlock this full book FREE 10 day trial
Start Free Trial