proxmox-deploy
Use this tool to deploy cloud-init enabled images from various Linux distributions on Proxmox.
Proxmox does not support cloud-init enabled images out of the box. It’s possible to create template from manually installed VMs. However, with the availability of ready to deploy images from most major Linux vendors, why should you install a VM manually?
How it works
cloud-init depends on two things:
A minimal base installation of the distribution, usually in the form of a raw or qcow2 image. I call this a cloud image.
The cloud-init package installed in the image.
cloud-init was originally made for Amazon EC2 and OpenStack. These platforms have native support for cloud-init, and provide a datasource that cloud-init can use to configure the VM. However, there are few alternative datasources available that will work, even if the platform itself has no native support for cloud-init.
proxmox-deploy uses the NoCloud datasource. For this approach, the VM must have a copy of the cloud image as the first disk, and a read-only vfat or iso9660 filesystem as the second disk. On this second disk, there must be two files: user-data and meta-data.
proxmox-deploy takes care of generating the user-data and meta-data files based on user input. proxmox-deploy also takes care of creating a Proxmox VM and uploading the cloud image and cloud-init image into the proper datastore. All that’s left afterwards is turning on the VM.
How to install
All dependencies are installable using pip. To install globally, execute as root:
# pip install proxmox-deploy
Or to install into a virtualenv (as a normal user):
$ virtualenv env
$ . env/bin/activate
$ pip install proxmox-deploy
Make sure to activate your virtualenv before using or upgrading the tool later:
$ . env/bin/activate
To later upgrade it:
$ pip install --upgrade proxmox-deploy
How to use
After installing, simply use:
$ proxmox-deploy --proxmox-host <hostname> --cloud-images-dir <images directory>
And answer the interactive questions.
Tested cloud images
I have tested proxmox-deploy with the following cloud images:
Distribution |
Version |
Status |
|---|---|---|
Ubuntu |
The -amd64-disk1.img images work. |
|
Fedora Server |
The qcow2 image works. |
|
openSUSE |
The -OpenStack-Guest.x86_64.qcow2 image works, provided the VM has at least 512 MB RAM. The minimal disk size is 10 GB. However, the first NIC is called eth1, so make sure to select eth1 to configure. There is no suse user, login as root. |
|
CentOS |
The CentOS 6 image fails to boot, hanging at “Booting from hard disk”. The CentOS 7 -GenericCloud.qcow2.xz image works. The minimal disk size will be 8G. |
|
Debian |
Neither the qcow2 nor the raw image works. The first boot results in a kernel panic and subsequent boots won’t run cloud-init, rendering the VM unreachable. |
|
FreeBSD |
Does not work, cloudbase-init-bsd has no support for the NoCloud datasource. The official VM images boot at least, but cloud-init is not available. It will boot with with DHCP and a default user/password. |
All distributions provide a default user with the name of the distro (ubuntu, fedora, centos, debian, freebsd), except openSUSE which only has a root user.
Dependencies
Proxmox VE 4.1 or later
Python 2.7
proxmoxer as Proxmox API client
openssh-wrapper for communicating with the Proxmox API and executing commands.
Jinja2 for generating the user-data and meta-data files.
configobj for reading configuration files.
pytz for timezone names.
genisoimage (Linux) or mkisofs (FreeBSD) command.
Do note that we need to access the Proxmox server via SSH, to perform the various tasks. We also use the pvesh and pvesm commands over SSH to interface with the Proxmox API and datastores respectively. proxmox-deploy will not ask for passwords to login, so a proper SSH agent and SSH key access must be configured before hand.
Changelog
0.4.0 |
|
0.3 |
|
0.2 |
|
0.1 |
|
License
proxmox-deploy is licensed under the GPLv3 license.
Metadata
Release files for proxmox-deploy 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| proxmox-deploy-0.4.0.tar.gz | 18.6 kB | Without provenance | Details for proxmox-deploy-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| proxmox_deploy-0.4.0-py2-none-any.whl | Python 2 | none | any | Details for proxmox_deploy-0.4.0-py2-none-any.whl |
Total release size: 46.3 kB
Release files / proxmox-deploy-0.4.0.tar.gz
| Download URL | proxmox-deploy-0.4.0.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1a7884ca9b4825e4b94658e0fe612f21f8781eb2b92e34df10aa5e67afab2f8
|
|
BLAKE2b-256 checksum How to use checksums |
c441f4ca6341ddb8e08441cf28f03f92613aec18963535bf81834bcb235c2ab6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / proxmox_deploy-0.4.0-py2-none-any.whl
| Download URL | proxmox_deploy-0.4.0-py2-none-any.whl |
|---|---|
| Size | 27.7 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
4665a9a4842681799c8b9a31f8cd74f031aa29893da1bdcfbfbbea6c5d75fbac
|
|
BLAKE2b-256 checksum How to use checksums |
c5ee41847dee4c94fbae8f86012d81eeb98cba954e56a1388b75c546c627331d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for proxmox-deploy 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.