A curated collection of useful scripts, tools, and tips for managing Proxmox VE environments. This repository aims to simplify common administrative tasks and provide handy utilities for Proxmox administrators.
scripts/
├── management/
│ └── lxc-shrink-lv.sh # Script to shrink LXC container disk volumes safely
│ └── enable-xtermjs.sh # Script to enable serial port for VM
Currently, the repository contains:
A bash script to safely shrink the disk size of LXC containers in Proxmox VE. It handles:
- 🛑 Stopping the container if running
- 💾 Creating optional LVM snapshots before shrinking
- ✅ Running filesystem checks (
e2fsck) - 📏 Resizing the filesystem (
resize2fs) - 🔧 Reducing the logical volume (
lvreduce) - 🗂 Updating the container configuration in
/etc/pve/lxc/<CTID>.conf ▶️ Starting the container after completion- 📦 Maintaining backups and snapshot info
Warning
Works with ext2/3/4 filesystems. XFS or other filesystems require different procedures.
A bash script to Enable serial port for VM in Proxmox VE. It handles:
- 🛑 Adding serial port to the VM
- 💾 Optionally updating the guest OS:
- Enabling serial-getty@ttyS0
- Adding console=ttyS0,115200 to GRUB
Warning
Requires qemu-guest-agent installed and running on the guest VM for automatic OS configuration.
Feel free to contribute!
- Add new scripts or utilities
- Suggest improvements for existing scripts
- Share tips and tricks for Proxmox administration
Please submit pull requests or open issues for discussion.