Reduce disk Virtual Machine

Proxmoxgoogle

Member
Mar 21, 2017
74
0
11
33
Hi !

Can you help me with the reduction of a disk of a machine

I have tried to reduce but I have not been able, I have tried with these commands:

qemu-img resize -f raw vm-100 -30G

qm resize 100 scsi0 -30G

qemu-img resize vm-100-disk-0.raw -30G

and with none I have not had luck

Can somebody help me
 

Attachments

  • foro1.png
    foro1.png
    29.8 KB · Views: 4
  • foro2.png
    foro2.png
    13.5 KB · Views: 3

Dunuin

Famous Member
Jun 30, 2020
7,301
1,762
149
Germany
You can't make a virtual harddisk smaller, only bigger.
You need to create a new virtual harddisk and use a Live CD to copy all data from the old to the new drive. Then edit all mount options and rebuild the bootloader + initramfs. Its really complicated and time consuming but it works.
Using dd to copy stuff would be much easier but I've read that the new drive needs to be atleast the size of the old drive so I think that is not an option.
 

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 your own in 60 seconds.

Buy now!