A simple Python/Bash-based tool for migrating VMs and LXC containers between Proxmox hosts – interactive, safe, and reusable.
Ein einfaches Python-/Bash-basiertes Tool zur Migration von VMs und LXC-Containern zwischen Proxmox-Hosts – interaktiv, sicher und wiederverwendbar.
pve-migrate.py→ Python script for selecting, backing up, and transferring guestssetup-pve-migrate.sh→ Installer for Python + Virtualenv + dependenciesrestore-lxc.sh→ Bash script for restoring LXC containers and VMs
- 🔧 Prompt for the IP of the target Proxmox host
- 📊 Automatically detect all VMs (
qm list) and LXCs (pct list) - ✅ Interactive checkbox selection menu (via
questionary) - 📦 Backup with
vzdump(compressed) - 🚚 File transfer via
scpto the target host
- Proxmox host with Python 3.6+
- Package installation via setup script
- SSH access to the target host (e.g. via SSH key)
git clone git@github.com:krisauseu/proxmox-migration-helper.git
cd proxmox-migration-helper
chmod +x setup-pve-migrate.sh
./setup-pve-migrate.shThen:
source /root/pve-migrate-venv/bin/activate
./pve-migrate.pychmod +x restore-lxc.sh
./restore-lxc.shThis script will:
- Auto-detect LXC and VM backup files
- Restore them into the desired storage (e.g.
local-lvm) - Can be extended to include static IP assignment or autostart
pve-migrate.py→ Python-Script zur Auswahl, Sicherung und Übertragung von Gästensetup-pve-migrate.sh→ Installer für Python + Virtualenv + Abhängigkeitenrestore-lxc.sh→ Bash-Script zur Wiederherstellung von LXC-Containern und VMs
- 🔧 Ziel-IP des neuen Hosts abfragen
- 📊 Alle VMs (
qm list) und LXCs (pct list) automatisch erkennen - ✅ Interaktive Auswahl per Checkbox-Menü (via
questionary) - 📦 Backup mit
vzdump(komprimiert) - 🚚 Dateiübertragung via
scpan den Zielhost
- Proxmox-Host mit Python 3.6+
- Paketinstallation via Script möglich (siehe oben)
- SSH-Zugriff auf Zielhost (z. B. mit SSH-Key)
git clone git@github.com:krisauseu/proxmox-migration-helper.git
cd proxmox-migration-helper
chmod +x setup-pve-migrate.sh
./setup-pve-migrate.shDann:
source /root/pve-migrate-venv/bin/activate
./pve-migrate.pychmod +x restore-lxc.sh
./restore-lxc.shDas Script:
- erkennt LXC- und VM-Backups automatisch
- spielt sie in das gewählte Storage ein (z. B.
local-lvm) - kann um statische IP-Zuweisung oder Autostart erweitert werden
MIT License – Use freely, contribute happily. / Frei verwendbar, Beiträge willkommen 🚀