Jump to content

Shrinking a qcow2 image


Recommended Posts

  • 3 months later...

I did the exact same thing. 

I immediately discovered the error before starting the VM and attempted to resize it from 15T to 1500G
The unraid UI will not allow me resize it smaller even though I have not restarted the Windows VM.  The size remains at 15T

My entire unraid server is only 12T.

The VM is important. I can't wipe it and start all over. 


Looking for suggestions on how to reduce the vdisk from 15T --> 1500G or revert back to the original size of 1000G

Edited by JackSafari
Link to comment

Since you haven't expanded the partitions yet you should be able to do a 

qemu-img resize vdisk.qcow2 --shrink 1500G

Back up the vdisk first.

 

Or just restore a vdisk backup from before the change.

Edited by Kilrah
  • Like 1
Link to comment

Thanks. This solved it. 👍

 

qemu-img resize vdisk.qcow2 --shrink 1500G

 

The unraid UI reports 1500G as being 1TB. I checked using qemu-img info and it reports the correct size of 1500G, and Windows 10 recognizes it at 1500G

Edited by JackSafari
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...