Resize disk

Inferno

Member
Mar 31, 2012
6
0
21
Hi

I'd like to resize the raw disk from 50GB to 20GB. (VM OS - Linux)
I shutdown the VM, then I resize zith command:
qemu-img resize diskimage.zzz -- -30G

Then I try to start the VM, it starts but only in grub command line, so there is something bad zith partation or so...

How can I do it correctly? Maybe I forgot something?

Thanks.
 
I think you must resize the filesystem inside your VM before resize the disk.

Now your VM continues with a filesystem with 50GB but the disk was shrink to 20GB, so I think you lose info/partitions.
 
I think you must resize the filesystem inside your VM before resize the disk.

Now your VM continues with a filesystem with 50GB but the disk was shrink to 20GB, so I think you lose info/partitions.
Right,
resize filesystem inside VM (boot an live-cd like partition magic or grml). Then resize the partition inside the VM and after that, you can shrink the "real" VM-disk.

To expand an disk vice versa.

Udo
 

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!