Re-Sized VM Hard Disk too large - how to make smaller?

voodooutt

New Member
May 14, 2020
12
1
3
49
I was making the image larger, was originally 400G and wanted to make it total 700G. I used GUI to try and make larger. When I was resizing, I thought one was supposed to type in the actual size wanted and not the number that one would want to increase. I wanted 700G total, but got 1100G. How to re-size back to 700G? The physical disk it's on has total size of 932G.

I've been poking around on the site here, but see many different and numerous ways of doing this. I am a bit shy with doing any method because I don't want the info on the VM ruined.


1590358678142.png
 
Hi,
make sure there is no data on the image beyond 700G (i.e. the filesystem partition ends before that point).
Then you can use qemu-img resize --shrink vm-110-disk-0.qcow2 700G and afterwards qm rescan --vmid 110 to update the configuration file.
 
  • Like
Reactions: voodooutt
Ah, yes! I saw the --shrink argument but was implementing it wrong. All is good with the image now, thank you!
 

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!