Reduce disk Virtual Machine

Proxmoxgoogle

Member
Mar 21, 2017
74
0
11
36
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
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.