To change the disk size of a Proxmox VE LXC container, follow these steps:

  1. Stop the LXC container:

pct stop <lxc_id>


2. **Resize the LXC container disk image:**

qemu-img resize /var/lib/vz/images/<lxc_id>/vm-<lxc_id>-disk-1.qcow2 +<new_size>G

Replace '<lxc_id>' with the ID of your LXC container and '<new_size>' with the desired new size in gigabytes.

3. **Start the LXC container:**

pct start <lxc_id>


4. **Log in to the LXC container:**

pct enter <lxc_id>


5. **Resize the partition inside the LXC container:**

resize2fs /dev/sdaX

Replace 'X' with the partition number where the root filesystem resides. You can check the partition layout using the 'lsblk' command.

6. **Verify the new disk size:**

df -h

This command will display the updated disk size.

You have successfully changed the disk size of the Proxmox VE LXC container.
Resize Proxmox VE LXC Container Disk | Step-by-Step Guide

原文地址: https://www.cveoy.top/t/topic/qx1O 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录