Skip to main content

Proxmox ve - Single reinstall without full VM backup


TODO WORK IN PROGRESS

Warning: This method only works if your VMs and LXCs are stored on a separate ZFS pool from the Proxmox boot pool (rpool).
Never select your data pool disks during reinstallation --- doing so will erase all VM/container data.

Baseline Scenario

  • Host Type: Single Proxmox VE node using ZFS
    * Boot Pool: rpool --- ZFS Mirror (2× SSD)
    * Data Pool: zfs-data --- ZFS RAIDZ2 (4× NVMe) --- contains all VM and LXC disks
    * Goal: Reinstall Proxmox VE without backing up full VM disk images

Step 1: Backup Critical Configuration Files

The VM and LXC "shells" (metadata) are stored in /etc/pve. These files define names, hardware, disks, and settings.

VM Configuration Files

/etc/pve/qemu-server/*.conf

Example:

root@pmx02:/etc/pve/qemu-server# ls
100.conf  101.conf  102.conf  104.conf  106.conf  119.conf  132.conf

LXC Configuration Files

/etc/pve/lxc/*.conf

Example:

root@pmx02:/etc/pve/lxc# ls
103.conf

Optional but Recommended Backups

/etc/network/interfaces
/etc/hosts
/etc/pve/storage.cfg

Tip: Use scp, rsync, or WinSCP to copy these to a safe location (e.g., NAS, laptop).

Step 2: Gracefully Shut Down All Resources

Ensure data consistency before reinstall:

# Stop all VMs
qm stop $(qm list | awk 'NR>1 {print $1}')

# Stop all LXCs
pct stop $(pct list | awk 'NR>1 {print $1}')

Then shut down the host:

shutdown -h now

Step 3: Reinstall Proxmox VE (Carefully!)

  1. Boot from Proxmox VE ISO (via USB or IPMI).\
    • During disk selection:
    • Only select the 2× SSDs used for rpool
      * Do NOT select NVMe drives from zfs-data\
      • Complete installation normally.

Critical: Selecting the wrong disks will wipe your VM data.

Step 4: Import the Existing ZFS Data Pool

After first boot:

zpool import -f zfs-data

Verify import:

zpool status zfs-data
zfs list

The -f flag forces import if the pool was exported uncleanly.

Step 5: Restore VM and LXC Configuration Files

Using SCP/WinSCP/rsync, copy the backed-up .conf files back:

# VM configs
scp *.conf root@<new-proxmox-ip>:/etc/pve/qemu-server/

# LXC configs
scp *.conf root@<new-proxmox-ip>:/etc/pve/lxc/

Files appear instantly in the web UI after placement.

Step 6: Re-Add ZFS Pool as Storage (GUI or Config)

Option A: Via Web GUI (Recommended)

  1. Log in to Proxmox web interface\
    • Datacenter → Storage → Add → ZFS\
    • Select pool: zfs-data\
    • Set content: Disk image, Container\
    • Enable if needed

Option B: Restore from Backup (if you saved storage.cfg)

scp storage.cfg root@<new-proxmox-ip>:/etc/pve/storage.cfg

Restart pve-cluster service if changes don't reflect:

systemctl restart pve-cluster

Final Check: Start a Test VM/LXC

qm start 100
pct start 103

If they boot successfully --- you're done!

Summary:
By preserving only the configuration files and re-importing the ZFS data pool, you can fully reinstall Proxmox without migrating terabytes of VM disk images.