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.