Foreman plugin to add Proxmox compute resource based on fog-proxmox gem
Clone or download
tristanrobert Update
Main tests with Foreman 1.20 pass.
Latest commit 9722aa6 Nov 27, 2018


Build Status Maintainability Test Coverage


Foreman plugin that adds Proxmox compute resource: managing virtual machines and containers using the fog-proxmox module.

It is intended to satisfy this feature.

If you like it and need more features you can support it.


Tested with:

  • Foreman >= 1.17 and <= 1.20
  • Fog-proxmox >= 0.5.3
  • Proxmox >= 5.1
  • Ruby >= 2.3



You need nodejs installed in order to use foreman-assets package.

From gem

See complete details in plugin installation from gem

Here is a Debian sample:

sudo apt install -y foreman foreman-compute foreman-sqlite3 foreman-assets
  • Use only foreman user (not root!) sudo -u foreman ...
  • In /usr/share/foreman/bundler.d directory, add Gemfile.local.rb file and add this line in it:
echo "gem 'foreman_fog_proxmox'" | sudo -u foreman tee /usr/share/foreman/bundler.d/Gemfile.local.rb
  • Install the gem plugin:
sudo -u foreman /usr/bin/foreman-ruby /usr/bin/bundle install
  • Precompile plugin assets:
/usr/bin/foreman-ruby /usr/bin/bundle exec bin/rake plugin:assets:precompile[foreman_fog_proxmox]
  • Compile plugin translations if (french) needed :
/usr/bin/foreman-ruby /usr/bin/bundle exec bin/rake plugin:gettext[foreman_fog_proxmox]
  • Complete installation of foreman 1.17+ with foreman-installer:
sudo apt install -y foreman-installer
sudo foreman-installer

If you don't want to have HTTP 503 errors when apt is trying to install puppetserver, then add this before launching foreman-installer:

echo 'Acquire::http::User-agent "Mozilla/5.0 (Linux)";' | sudo tee /etc/apt/apt.conf.d/96useragent

See complete details in plugin installation from gem

Then you can check plugin installation after login into your new foreman server seeing the about foreman page:

About resources About greffon

From OS packages

Deb, rpm: work in progress...

Please see the Foreman manual for complete instructions:




  • You need a Proxmox VE >= 5.1 server running.
  • You need ruby >= 2.3. You can install it with rbenv.
  • You also need nodejs in your dev machine to run webpack-dev-server. You can install it with nvm.


  • Fork this github repo.
  • Clone it on your local machine
  • Install foreman v1.17.3 or later on your machine:
git clone
git checkout tags/1.17.3
  • Create a Gemfile.local.rb file in foreman/bundler.d/
  • Add this line:
gem 'foreman_fog_proxmox', :path => '/your_path_to/foreman_fog_proxmox'
gem 'fog-proxmox', :path => '/your_path_to/fog-proxmox' # optional if you need to modify fog-proxmox code too
gem 'ruby-debug-ide' # dev
gem 'debase' # dev
gem 'simplecov' # test
  • In foreman directory, install dependencies:
bundle install --without libvirt postgresql mysql2
  • Configure foreman settings:
cp config/settings.yaml.test config/settings.yaml
  • Install foreman database (sqlite is default in rails development):
cp config/database.yaml.example config/database.yaml
bundle exec bin/rake db:migrate
bundle exec bin/rake db:seed
  • You can reset admin password if needed:
bundle exec bin/rake permissions:reset
  • You sholud write tests and you can execute those specific to this plugin:
export DISABLE_SPRING=true
bundle exec bin/rake test:foreman_fog_proxmox
  • In foreman directory, after you modify foreman_fog_proxmox specific assets (proxmox.js, etc) you have to precompile it:
bundle exec bin/rake plugin:assets:precompile[foreman_fog_proxmox]
  • In foreman directory, after you modify foreman_fog_proxmox translations (language, texts in new files, etc) you have to compile it:
bundle exec bin/rake plugin:gettext[foreman_fog_proxmox]
  • In foreman directory, run rails server:
rails server
  • In foreman directory, run in a new terminal the webpack-dev-server:
./node_modules/.bin/webpack-dev-server --config config/webpack.config.js

See details in foreman plugin development


You can reach the contributors. Bug reports and pull requests are welcome on GitHub at ForemanFogProxmox. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Please read how to contribute.


The code is available as open source under the terms of the GNU Public License v3.

Code of Conduct

Everyone interacting in the ForemanProxmox project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.