"qemu-img: Cannot resize device files" when trying to shrink vm disk

kakao73

Member
Aug 1, 2018
20
1
8
I tried below:
Bash:
$ qemu-img resize -f raw --shrink $(pvesm path <lvm-thin-storage>:<vm-disk>) -1G
qemu-img: Cannot resize device files

How can I shrink it?
 
AFAIK, qemu-img doesn't handle LVM(-thin). You will need to use the lvreduce command directly.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!