shrink vm disk?

undead_bob

New Member
Aug 11, 2025
1
0
1
hi i have a promox server with a vm that has 2 vm disks its a truenas vm

when i made the vm i made the disks way to big so i want to make them smaller now

vm disk 0 has the os uses about 16.5gb is 111gb

i would like to make this one about 20 gigs

vm disk 1 has the dockers uses about 11 is 120gb

i would like to make this one about 30 gigs

now on the forrums i found a post that told how to do this but it said use zfs and idk why but i cant find the disks that way

when i do zfs list it says no datasets available

does anyone know how to schrink the disk

thx for any help
 
does anyone know how to schrink the disk
The actual commands depend on the used storage.

In general: It is not as easy as just reducing the space. You always need to shrink the filesystem itself in order to still have a working VM. This depends on the used guest OS and you may want to refer to the guest os handbook in order to shrink the filesystems there. This often also requires you to boot a linux medium to shrink the filesystem itself.

Depending on you proficency, it may be easier to start fresh and copy the files over.

As always: have backups ready!
 
hi i have a promox server with a vm that has 2 vm disks its a truenas vm

when i made the vm i made the disks way to big so i want to make them smaller now

vm disk 0 has the os uses about 16.5gb is 111gb

i would like to make this one about 20 gigs

vm disk 1 has the dockers uses about 11 is 120gb

i would like to make this one about 30 gigs

now on the forrums i found a post that told how to do this but it said use zfs and idk why but i cant find the disks that way

when i do zfs list it says no datasets available

does anyone know how to schrink the disk

thx for any help
Hi! Unfortunately, Proxmox (and most hypervisors) can’t just shrink a virtual disk directly, because doing that would risk data loss if the filesystem inside isn’t resized first.
A safe and relatively simple way to do this is to use Clonezilla to clone your existing disks into smaller ones.

Here’s a step-by-step guide:
  1. Shut down your TrueNAS VM.
  2. In Proxmox, add two new virtual disks to the VM, each with the desired smaller size (e.g., 20 GB for the OS and 30 GB for Docker).
  3. Download Clonezilla ISO and mount it as the VM’s CD/DVD drive.
  4. Boot the VM from Clonezilla.
  5. In Clonezilla, choose:
    • device-device mode (disk to disk copy)
    • Select the source disk (old large disk)
    • Select the target disk (new smaller disk) — make sure the used space on the source is less than the target size.
  6. Repeat for the second disk.
  7. Once both are cloned, remove the old large disks from the VM and set the smaller ones to the same device order as before.
  8. Boot TrueNAS and confirm everything works.
  9. Finally, delete the old large disks in Proxmox storage to free up space.

Tip: Before starting, take a snapshot or backup of the VM, just in case.