XCP-NG storage - possible to reduce size of a VDI?

Running XCP-NG with XOA on my home lab. There is just one host which uses a 1TB NVME drive as local storage.

Recently I increased the size of the VDI storage allocated to a particular VM. I then increased size of the VM’s partition using GPartEd. But space never actually used for files - so I reduced the partition size with GPartEd.

But now I do not seem to be able to reduce the size of that VDI storage - it gives me an error when I try to edit the size - “cannot set new size 444444 below the current size 555555”.

If I look at the single bar display which shows the various volumes in the Host’s storage repository it shows accurately the amount of space used by that VDI.

So is it possible to reduce the size of a VDI “in place”? Or does one have to create a new VDI of the required new size and copy across the contents of the original one?


I don’t think downsizing it is possible.

1 Like

I tried to do this a while ago with a files server that had (mostly) been moved to One Drive. Never found a way to do it.

I ended up creating a temporary VM, attaching a smaller disk, booting ubuntu copying with rsync, detatch current (big) disk, attach new smaller disk.

Now I come to think about it I probably didn’t really need a separate VM, I could have just done it on the original VM, updated fstab and rebooted…