Book Image

Mastering Proxmox

By : Wasim Ahmed
Book Image

Mastering Proxmox

By: Wasim Ahmed

Overview of this book

Table of Contents (17 chapters)
Mastering Proxmox
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The Proxmox Graphical User Interface (GUI)


The Proxmox Graphical User Interface, or Proxmox GUI, allows users to interact with the Proxmox cluster graphically using menus and a visual representation of the cluster status. Even though all of the management can be done from the Command-line Interface (CLI), it can be overwhelming at times, and managing a cluster can become a daunting task. To properly utilize a Proxmox cluster, it is very important to have a clear understanding of the Proxmox GUI. The GUI can be easily accessed from just about any browser through a URL similar to https://192.168.1.1:8006, as shown in the following screenshot:

The various fields marked in the previous screenshot are as follows:

  • 1 shows the URL to access the Proxmox GUI through a browser

  • 2 shows the logout button to exit the Proxmox GUI

  • 3 shows the button to open the virtual machine creation dialog box

  • 4 shows the button to open the OpenVZ container creation dialog box

  • 5 shows the Proxmox tabbed menu bar

  • 6 shows the drop-down menu to change the period of the status graphs

  • 7 shows the status information block for Proxmox nodes, virtual machines, or containers

  • 8 shows the OpenVZ containers

  • 9 shows the available virtual machine template for cloning

  • 10 shows the KVM virtual machines

  • 11 shows the Proxmox nodes

  • 12 shows the shared storages

  • 13 shows the resource pools

  • 14 shows the graphical representation of various statuses

  • 15 shows the task log

The GUI menu system

The Proxmox GUI is a one-page administration control panel. This means that no matter which feature one is managing, the browser does not open a new page or leave the existing page. Menus on the admin page change depending on the feature that is being administered. For example, in the previous screenshot, the node pmxvm02 is selected, so the main menu only shows node-specific menus. When a virtual machine is selected, the menu looks like the following screenshot:

Some features of the Proxmox GUI, such as VNC console and shell, require Java or IcedTea (http://icedtea.classpath.org/wiki/Main_Page) to be installed on the computer you are accessing the GUI from. The GUI works great with Firefox and Google Chrome. The latest version of Internet Explorer may have an issue with functioning properly if not in compatibility mode. The Proxmox GUI also works with the Opera browser.

Menu chart

The following chart is a visual representation of a Proxmox GUI menu system. Some menu options need to be set up once and do not need any regular attention, such as DNS, Time, Services, and so on. Other menus, such as Summary, Syslog, Backup, Permissions, and so on, are regularly used to ensure healthy cluster environment.

In this book, we will mostly look at the menu options relevant for regular maintenance of a Proxmox cluster. We will also look at some of the advanced menu options that are needed to create a complex network infrastructure, such as VLAN, bridge, and so on. The rest of the menu options are very basic in nature and are very much self-explanatory.

The Datacenter menu

In the Proxmox GUI, Datacenter is the main level folder of Proxmox nodes'/VMs' tree. Each Datacenter folder can only hold one Proxmox cluster.

The Search tab

To use the Search tab, navigate to GUI | Server View | Datacenter | Search Tab | Search Box.

It is very easy to manage a cluster with a small number of virtual machines with an even smaller number of Proxmox and storage nodes. When maintaining hundreds or thousands of virtual machines with several dozen Proxmox nodes in a cluster, the Search option makes it easier to find a particular virtual machine. Scrolling through a list of virtual machines to find a particular one is very time consuming. The following screenshot shows the Search option:

The search box under Datacenter | Search shows the result in real time as you type in the box. It can search with any string in the Type or Description columns. It can be the partial name of a VM, VMID, or VM type (qemu, openvz). The preceding screenshot shows all the virtual machines that have the word ceph in the description.

The Storage tab

To use the Storage tab, navigate to GUI | Server View | Datacenter | Storage.

The Storage tab is probably one of the most important options in the Proxmox GUI. This is where the Proxmox cluster and storage systems come together. This is the only menu to attach any storage system with Proxmox. Whether it is local/shared storage, NFS/RBD/LVM, all are done here. The following screenshot shows the Storage tab:

As of Version 3.2, Proxmox supports the following storage types:

  • Directory: This is mostly local storage

  • LVM: These are local or shared iSCSI targets

  • NF: This can be OmniOS, FreeNAS, Ubuntu, and so on

  • GlusterFS: Visit www.gluster.org for more information

  • RBD: Visit www.ceph.com for more information

In this book, we will be using NFS for basic low-end setup and RBD for advanced, distributed storage with a high level of redundancy. The following screenshot shows the storage types:

Tip

Although storage can be changed at a later time, it is very important to have a clear understanding of all storage types for better planning in the beginning. All storage types have both advantages and disadvantages. The ultimate decision will come down to performance, stability, and redundancy.

The Backup tab

Cluster-wide backup schedules are created through this menu. Backup is the first line of defense against any form of cluster disaster. With a good backup plan, downtime can be minimized and valuable data can be saved. Although Proxmox backup system cannot do a granular file backup of a virtual machine, the ability to do full virtual machine backup is one of the strengths of Proxmox. This inclusion of a backup system is one of the best in the industry, and it "just works". The backup menu can be found in the following menu system.

To use the Backup tab, navigate to GUI | Server View | Datacenter | Backup. The following screenshot shows the Backup tab:

Proxmox only allows schedule creation on a daily and weekly basis. Select VMs to be backed up, day of the week, and time of the day, and backup will do the job on its own. The following screenshot shows the dialog box to create a schedule:

LZO compression and Snapshot mode are default in the Proxmox backup. Compression can be selected as None, LZO, and GZIP. In most cases, LZO works great. It has less compression but it is fast and easier on the hardware. GZIP can compress further, but it also takes up lot of CPU resources during backup.

The Snapshot mode allows live backup without needing to shut down running VM, thus minimizing downtime. In an always-on network environment, downtime may not be permitted. Other modes, such as Suspend and Stop may be used in special cases where shutting down the VM during backup is absolute necessary to ensure data integrity.

Please note that this Snapshot mode is not the same as the Snapshots option for a virtual machine. During full backup of a live virtual machine, LVM Snapshot is used, whereas Live Snapshots are used to preserve the state of a KVM-based virtual machine. Live Snapshots can be done for the OpenVZ container in Proxmox.

Tip

If the selected VMs are scattered over multiple nodes, it is very important to keep in mind that when backup starts at the scheduled time, it will simultaneously create a backup of VMs on multiple nodes to a single backup storage. If the backup storage is not powerful enough to handle all the incoming data from multiple Proxmox nodes, the backup process may fail.

Node-specific tabs

The node-specific tabs are specific to each node in the cluster. New menu tabs become visible when the node is selected.

The Summary tab

To use the Summary tab, navigate to GUI | Server View | Node | Summary.

The Summary tab for a node is a visual representation of the node's health. It shows vital information, such as Uptime and Resource Consumption. As you can see in the following screenshot, the Summary screen also shows CPU usage, Server Load, Memory Usage, and Network Traffic in a very easy-to-understand graph. An administrator can get the necessary information about a node just by glancing at the summary. Summary can be viewed on hourly, daily, weekly, monthly, and yearly bases.

The Network tab

To use the Network tab, navigate to GUI | Server View | Node | Network.

The Network menu acts as glue between all virtual machines, nodes, and shared storage systems. Without a proper Network Interface Card (NIC) or Virtual NIC (vNIC) and a virtual bridge setup, no communication can take place. Deeper understanding of this menu will allow you to create a very complex web of clusters, nodes, and virtual machines. Due to the importance of this menu option, we will look into this menu in greater detail later in this chapter.

Tip

The concept of virtual network depends on the building block of the virtual bridge, virtual vNIC, and virtual LAN. Network virtualization is the future transformation of physical networks as server virtualization had been for physical servers.

The Syslog tab

To use the Syslog tab, navigate to GUI | Server View | Node | Syslog.

The Syslog option allows an administrator to view the system log in real time. Syslog gives feedback as it happens in the node. It also allows scrolling up to view logs in the past. More importantly, if any error occurs in the node, Syslog gives that information in real time with the time and date stamp. This helps to pinpoint an issue exactly when it occurred. Here's an example of a Syslog menu visit scenario: if the node cannot connect to a storage system, the Syslog screen will show the error that is preventing connection.

The following screenshot shows the Syslog option:

The UBC tab

To use the UBC tab, navigate to GUI | Server View | Node | UBC.

User Bean Counters (UBC) is a set of limits, which guarantees resources control per container. This is a vital component for OpenVZ/container resource management. The UBC menu option in the Proxmox GUI is for viewing only. There is no option to edit any of the limits.

The UBC screen only gets populated when an OpenVZ container is selected, as shown in the following screenshot:

The Subscription tab

To use the Subscription tab, navigate to GUI | Server View | Node | Subscription. Proxmox can be downloaded and used for free without any restriction for any feature. It is by no means a trialware, shareware, or an n-day evaluation hypervisor. However, Proxmox also has a subscription model, which allows enterprise-class repositories. The free version of Proxmox only comes with standard repositories. The main difference between enterprise and standard repositories is that enterprise repositories go through a higher level of testing to ensure a very stable cluster environment. The following screenshot shows the Subscription tab:

Note

Keep in mind that even with the free version, Proxmox is still very stable. Do not let the subscription level fool you to think the free version is not even worth considering.

This level of tests is mandatory for an enterprise-class network environment where a small issue can cost a company a lot of money. A highly stable environment is usually not needed in a home-based platform or small business environment. The Subscription tab allows activating purchased subscription on a node.

Tip

Proxmox has the very best prices per subscription in the virtualization product industry. The operating cost of Proxmox cluster is very minimal compared with a giant virtual product such as VMware. Proxmox provides big business virtualization at small business cost. For details of different subscription levels, visit the link http://proxmox.com/proxmox-ve/pricing.

The Updates tab

To use the Updates tab, navigate to GUI | Server View | Node | Updates.

The Proxmox node can be updated right from the GUI through the Updates tab. Each node checks daily for any available updates and alerts administrator through e-mail if there are any new updates. It is important to keep all nodes up to date by updating regularly. The Updates menu enables upgrading by just using a few mouse clicks. The following screenshot shows the Updates tab:

Tip

Always update one node at a time. Some updates require the node to be restarted. If uptime is important, then migrate all running virtual machines to a different node before restarting the upgraded node.

The Ceph tab

Ceph is a robust and powerfully distributed storage system that can be used as shared storage for Proxmox cluster. Ceph provides the RADOS Block Device (RBD) storage backend. A Ceph storage cluster can scale out to several petabytes. Ceph is powerful enough to handle infrastructure of any size while being resilient enough to provide great storage redundancy. Understanding the true potential of Ceph, we have dedicated an entire chapter in this book to show you how to set up a Ceph cluster using both command line and the Proxmox GUI to build truly enterprise class complex virtual infrastructures.

Starting with Proxmox VE 3.2, Ceph server is added as technology preview. This allows both Proxmox and Ceph to co-exist on the same node. Ceph itself does not come with any graphical user interface to manage Ceph storage, with the exception being the subscription version of Ceph. Proxmox enables us to manage Ceph cluster almost entirely from the Proxmox GUI. Currently CrushMAP cannot be edited and multiple Ceph clusters cannot be managed through the GUI. The following screenshot shows the Ceph menu tab along with Ceph-related tabs:

We will look into the Ceph tab in greater detail in Chapter 7, High Availability Storage for High Availability Cluster. The following list is a short description of Ceph-related tabs and their functions:

  • Status: This shows the current status or health of a Ceph storage

  • Config: This displays the content of the Ceph cluster configuration file cluster.conf

  • Monitor: This starts, stops, creates, removes, and displays a list of Ceph Monitors (MONs)

  • Disks: This displays the available drives attached to the Proxmox nodes and creates new OSDs

  • OSD: This manages OSDs of Ceph clusters

  • Pools: This creates, removes, and displays the list of pools

  • Crush: This displays the content of CrushMAP

  • Log: This displays the Ceph cluster log in real time

Virtual machine tabs

The following menu tabs are available when a virtual machine is selected.

The Summary tab

The Summary menu tab represents similar information such as the one accessed by navigating to Node | Summary. Valuable information can be gathered, which shows the real-time status of a virtual machine. One additional feature this menu has is the addition of the Notes textbox. By double-clicking on the Notes box, it brings up a multiline textbox where an administrator can enter data such as the department, the usage the VM is intended for, or just about any other information that needs to be on hand.

The Hardware tab

The initially created and configured virtual machine sometimes needs further resource allocation. As the functions of VM rise, it becomes necessary to add additional virtual drives or network interfaces. The Hardware menu tab under the virtual machine is where the adding and removing of devices happens. The following screenshot shows the Hardware tab:

Through the Add menu, additional CD drives, hard drives, and network interfaces (bridge, vNIC, and so on) can be added to a virtual machine, as shown in the following screenshot:

Each of these additions requires the virtual machine to be fully powered off and not just the restart/reboot process. Ejecting an ISO image file to attach a different one does not require any VM power cycle. By adding some configuration arguments in the virtual machine configuration file, it is possible to hot swap a virtual hard disk into a VM. This configuration is further explained in Chapter 4, A Virtual Machine for a Virtual World.

Besides the Add menu, other menus such as Remove, Edit, Resize Disk, and Move Disk are also available through the Hardware menu. All these additional menus except Add require a hardware item to be selected. Resize Disk and Move Disk will be enabled for clicking when a virtual drive is selected. We will see these in greater detail in later chapters.

Tip

Move Disk is the safest way to move a virtual hard drive from one storage to another. If the virtual disk is on a shared storage, then live migration of the virtual disk is possible, allowing a great amount of time saving.

The Options tab

The Options menu under virtual machine allows further tweaking, such as changing name, boot order, and so on. Most of the options here can be left to default.

Tip

If you want the virtual machine to auto-start as soon as the Proxmox node reboots, set the Start at boot option to Yes.

The Options tab is shown in the following screenshot:

The Backup tab

A good backup plan is the first line of defense against any disaster, which can cause major or minor data loss. In our ultra-modern digital world, data is much more valuable than ever before. Every virtual environment administrator struggles with backup strategy of his/her virtual environment. The following screenshot shows the Backup tab:

The fine line between granular files and an entire machine backup is somewhat diminished in a virtual environment. To take the daily struggle of backup plan out of the equation, Proxmox added an excellent backup system right in the hypervisor itself. Although the backup system cannot backup individual files inside a virtual machine, it works well while backing up an entire virtual machine.

Note

Proxmox backup system can only do full backup of a virtual machine and cannot be used to backup individual files inside the virtual machine at the granular level.

Proxmox backups can be scheduled over multiple storage systems and multiple days. A backup system is only as good as the ability to restore the backup. Both backup and restore can be done from single menu under virtual machine. It also allows backups browsing and manual deletion of any backups. All these are done from a single interface with a few mouse clicks. Due to the importance of backup strategy in a virtual environment, we will look into Proxmox backup system in much greater detail in Chapter 4, A Virtual Machine for a Virtual World.

The Snapshots tab

Proxmox Snapshots is a way to roll back a KVM-based virtual machine to a previous state. Although it provides similar protection to Proxmox Backup, it comes with speed. Proxmox Snapshot is extremely fast when compared with Proxmox Backup, thus allowing a user to take several snapshots a day. The following screenshot shows the Snapshots tab:

A common scenario where Snapshots can be used is when a user wants to install or update a software. He or she can take a snapshot, execute the program, and if anything goes wrong, then simply roll back to the previous state. It creates Snapshot with the RAM itself, so the virtual machine stays exactly the same as it is running. Live snapshots are not included in full virtual machine backups.

Note

Never depend solely on Snapshots. Snapshots are not a full backup. It is merely a state when the virtual machine is frozen in time. Always do a full backup of virtual machines for maximum protection.

The Permissions tab

The Permissions menu allows the management of user permissions for a particular virtual machine. It is possible to give multiple users access to the same virtual machine. Click on Add to add users or groups to the permission. The following screenshot shows the Permissions tab:

A common scenario of permission usage is in an office setup where there is one accounting virtual machine and multiple staff need to access data. A permission can be set either at the user or the group level.