Developer Documentation

From Proxmox VE
Jump to navigation Jump to search


Please coordinate your efforts with us before starting any development. It is important to have a common view of the problem and the corresponding solution – just to avoid duplicated or unnecessary efforts.

We will only include software which matches our quality criteria. The source code repository is read only. To include some code, send it as patch (git diff) to the pve-devel mailing list. We will review your code and commit after a successful review (and possible corrections/additions).

Mailing List

This is the primary communication channel for developers, discussing new features and implementation details. If you are a developer and you want to develop additional features, this is the place to start.

PVE Development List:


Access to Code Repository (git)

Build instructions

You could find build instructions here :;a=blob_plain;;hb=HEAD

Development Package Repository

Some packages required for development can only be found in the devel repository. This is a cross project repository and may be used for all Proxmox Projects.

Add the following to the /etc/apt/sources.list file:

For Proxmox VE 7.x based on Debian 11 Bullseye

 deb bullseye main

For Proxmox VE 6.x based on Debian 10 Buster

 deb buster main

Checking out a git repository

To clone a repository run 'git clone' with the repository name prefixed with the common URL: git://

# git clone git://

To update an already cloned project to the current version use:

# git pull

Working on the code

Coding guidelines

The codebase mostly contains perl code, with javascript for the user interface, and C for the Proxmox Cluster Filesystem. For Perl we recommend to have a look at our perl style guide.

For JavaScript we use eslint to check code standards, note that not all repositories got switched over to eslint yet, pve-manager still emits errors and warnings. Check out Javascript Style Guide

We use the ExtJS framework for the Gui Components, its API documentation can be found here.

Using git

If you are not familiar with git it could be worth to take a look at this interactive tutorial: and read a brief introduction chapter from the official git documentation: to gain basic knowledge on it.

First, configure your real name and email address for git, if not done already:

$ git config --global "John Doe"
$ git config --global

This will be used to sign off commits as your work.

It is recommended to start a feature branch before working on the code locally:

# git checkout -f -b my_branch master

After this you can start working on your improvements. You'll be able to compare your changes to the current PVE master branch easily with

# git diff master..my_branch

Commits and Commit Messages

Then, make your commit (try to make small, but self-contained, commits) and include a sign-off line (-s).

  • Make sure the line-length (text-width, column count) of the commit's message is not longer than 70 characters. Note, HTTPS links are an exception and should not be split.
  • If it fixes a bug start with that information in this form: fix #1234: summary here
  • If it implements a feature tracked on Bugzilla you can also use: close #1234: summary here albeit fix #1234: is more commonly used and also fine
  • Try to add a tag denoting the subsystem at start, if an obvious choice exists.
    • For example, if you changed the QEMU UI component in pve-manager, a possible tag could be ui: qemu: summary here
    • Don't add tags for things that are already clear from context, for example, adding a qemu tag for a patch in the qemu-server repository has no use.
    • But, do not just paste the affected files including path and file ending as tag, that has no use (already contained in diff stat) and just makes it harder to read

You can always edit the commit message of the most recent commit using ammend:

# git commit --amend

If you work on a series you can use rebase to re-order, drop, squash/fixup and edit both the whole commit or just rewording its message:

git rebase -i --autosquash --autostash origin/master

The autostash is not required, but convenient if there are still pending changes, it will stash before rebase starts and apply again after rebase is done. The autosquash is also not required, but very convenient to auto squash fixups (git commit --fixup=<ref>) made for older commits in a development series

The following command will take all changes of tracked files and add it to the commit:

# git commit -s -a

New files won't get added automatically. To do that, or to just add some changed files to a commit, use

# git add

You can always look at what will get into commit with:

# git diff --staged

Preparing Patches

Yellowpin.svg Note: Note that we need a valid CLA to include your changes

Since we have several projects in our git repository and only one development mailing list, we ask you to clarify which repository your patches are meant for by specifying it in the subject prefix. Since some names are long it's fine if you shorten them (eg. remove the 'pve-' prefix).

Creating the raw patch series, for instance for the pve-container package:

# rm -rf my-patches/       # to clean left-overs
# git format-patch -o my-patches/ --subject-prefix="PATCH container" master..my_branch --cover-letter

Explain in the cover letter the aim of your patches:

edit my-patches/0000-cover-letter.patch

Sending patches:

# git send-email  my-patches/00*.patch
# rm -rf my-patches/       # to clean left-overs

If you wish to write comments for individual patches, you can do that either in the cover-letter, or in the patch's commit summary section (between the line consisting of 3 consecutive dashes ending your commit message and before the list of files with their change-counts.


From 12345abcde Mon Sep 12 00:00:00 2001
From: Git Committer <some email address>
Date: Fri, 7 Oct 2016 08:30:17 +0200
Subject: [PATCH v2 container 1/2] Fix #1013: this and that

Here is your commit message.
It explains the bugfix and ends after this line.

Signed-off-by: Firstname Lastname <>

 ***HERE*** you can write your comments.
 If this is a new version of an old patch, explain your changes here,
 for example:
 changes since v1:
 * fixed an error in the new regex
 * reworked algorithm to be O(n)
 src/PVE/ | 2 +-

diff --git a/src/PVE/ b/src/PVE/

If you want to send several related patches for one feature but different repositories, you can first iterate over all involved repositories, save the patches into one directory and then do a single git send-email over all generated patches. For example, lets go to a few repos and format the most recent commit as patch to /tmp/patchq, then send it:

# cd pve-manager; git format-patch -s -o /tmp/patchq -1 
# cd ../pve-guest-common; git format-patch -s -o /tmp/patchq -1 
# cd ../pve-docs; git format-patch -s -o /tmp/patchq -1 
# git send-email --compose /tmp/patchq/*

Using "start-number" and the like can improve this further, but it's a good start.

Versioned Patches

If an updated version of your patch series is called for, it should be sent as a new series rather than as reply to the old series. Always send the whole series with all patches showing the same version. Please mark your versions in your subject prefix with a small 'v' followed by the version number like this:

# git format-patch -o my-patches/ --subject-prefix="PATCH v2 container" master..my_branch

Please list all the changes to the previous versions in the commit summary section as shown in the above example.

For patches with no changes to the previous version, you should mention that there were no changes in the summary section, like no changes since last version

If your series has a cover letter, also summarize all changes in it as well.

Reviewing patches

After reviewing patches which affect a subsystem you maintain, you can notify with

Acked-by: name / email address

committers that you reviewed the patch and are OK with the changes.

Convenience Settings

For convenience you can store the pve-devel email address and the repository's default subject prefixes in your repository clones' configurations as follows:

$ git config --local
$ git config --local format.subjectprefix 'PATCH container'
$ git config --local format.signoff true

Now the commands to create and send patches become:

# git format-patch -o my-patches/ master..my_branch
# git send-email --compose my-patches/00*.patch

Sending Patches

Always use git send-email to sent out patches, else the indentation and formatting will get mangled and the patch cannot be applied anymore.


See for an interactive tutorial to setup git send-email.

Using Authenticated SMTP Server

Git send mail can be instructed to use a specific SMTP server for sending, the following shows an anonymized config section example:

        confirm = always

Add this to your global user ~/.gitconfig or to the or to the per project .git/config. git send-email will then use these settings by default and ask you for the password once on sending.


To send the last two commits for a Proxmox VE project to the Proxmox VE development list you could then execute:

 git send-email --to="" -2

If you're not used to git send-email it can be a good test to first send the patches to a email address of yourself, that allows to ensure all details and commands are correct.

Bugtracker (bugzilla)

Software License and Copyright

We only include code licensed under GNU Affero General Public License, version 3

Additionally, we require that contributors send us a contributor license agreement form by email to This agreement establishes a relationship between us and the contributor, gives details on what it means when the contributor grants permission for their work to be included in a project, and enables us to be better stewards of these projects.

With the contributor agreement chosen by Proxmox, the Harmony CLA, the contributor gives Proxmox a license to use their contributions. The contributor continues to own the copyright in the contribution, with full rights to re-use, re-distribute, and continue modifying the contributed code, allowing them to also share that contribution with other projects.

We've tried to keep the agreement as simple and comprehensible as possible. It comes in two flavors:

If you are making a contribution that is not your work (for example, a patch or library written by someone else), please contact for guidance on whether any additional steps are needed.

See Also