Post

Proxmox CLI "Disk Container"

Proxmox CLI "Disk Container"

Get the Container’s Current Disk Usage

1
pct df <vmid>

Run a Filesystem Check (fsck) on a Container Volume

1
pct fsck <vmid> [OPTIONS]

Run fstrim on a Chosen CT and Its Mountpoints

1
pct fstrim <vmid> [OPTIONS]

Mount the Container’s Filesystem on the Host

This will hold a lock on the container and is meant for emergency maintenance only as it will prevent further operations on the container other than start and stop.

1
pct mount <vmid>

Move a rootfs-/mp-Volume to a Different Storage or to a Different Container

1
pct move-volume <vmid> <volume> [<storage>] [<target-vmid>] [<target-volume>] [OPTIONS]

Unmount the Container’s Filesystem

1
pct unmount <vmid>

Resize a Container Mount Point

1
pct resize <vmid> <disk> <size> [OPTIONS]

Rescan All Storages and Update Disk Sizes and Unused Disk Images

```shpct rescan [OPTIONS]

1
2
3
## Launch a Console for the Specified Container
```sh
pct console <vmid> [OPTIONS]

Launch a Shell for the Specified Container

1
pct enter <vmid>

Launch a Command Inside the Specified Container

1
pct exec <vmid> [<extra-args>]

Copy a File from the Container to the Local System

1
pct pull <vmid> <path> <destination> [OPTIONS]

Copy a Local File to the Container

1
pct push <vmid> <file> <destination> [OPTIONS]
This post is licensed under CC BY 4.0 by the author.