Libro sobre Proxmox maestria
Proxmox Under the Hood
We now know where all the important files that hold a Proxmox cluster together are placed. We will now go inside some of these files for better understanding of what they do and the command arguments they use. You can use any Linux editor to view/edit these configuration files. In this book, we will use #nano to view and edit. During the learning process, it will be a good idea to make a backup of the configuration files before editing them. In case something goes wrong, you will be able to replace it with the original working configuration file. Simply copy a configuration file using the following command:
#cp /etc/pve/<config_file> /home/<any_folder>
We can also use the SCP command to back up files to another node:
#scp /etc/pve/<config_file> <user>@<ip_or_hostname>:/<folder>
The following code is what our cluster.conf file currently looks like from the cluster we created earlier in Chapter 1, Dive into the Virtual World with Proxmox. The Proxmox cluster configuration file is located under /etc/pve/cluster.conf. Its contents are as follows:
<clusternode name="pmxvm01" votes="1" nodeid="1"/> <clusternode name="pmxvm02" votes="1" nodeid="2"/> </clusternodes>
Now, let us see what function each XML tag performs in this configuration file.
Corosync uses XML for configuration files. Since all cluster messaging between nodes is handled by Corosync, XML syntaxes are used in the Proxmox cluster configuration file. The <?xml > tag shows the XML version number as shown:
<?xml version="1.0"?>
Now let us take a look at the following code:
<cluster name="pmx-cluster" config_version="2">
</cluster>