Moving XCP-NG VM to new hardware - slightly smaller disk

Hi Guys,

We recently purchased new servers to refresh/retire our existing production machines. However, I’ve hit a bit of a problem. VM’s on current system are on RAID1 configured 400gb SSD drives based on EXT4 so are thin provisioned. The drive size is 365.96GB and is showing around 283GB free due to the thin provisioning (OS using about 82GB). My new configured system/servers with the RAID1 configured 400gb SSD’s on EXT4 are coming in at 365.08GB (slightly smaller). I hadn’t anticipated a difference which is probably a foolish mistake to make. My question is, will I have to go through the process of using Clonezilla to move the VM over or will the fact that its thin provisioned allow me to native copy from XCP-NG across. I’m not on site until tommorrow but thought I would ask so I know what to prepare for.

Thanks for your time.


You can try this solution posted in XCP-NG forum:

How do you clone a VM to another host? | XCP-ng and XO forum

Thanks for your reply. I have copied/migrated many VM’s over the years so I have no issues with that.

My problem is more related to different size SSD’s betwen the new and old host - the old host SSD being slightly bigger. Therefore the partition size is slightly bigger. With thin provisioning I know the actual size of the OS is much less therefore was wondering whether this was possible by simply copying over the VM and the partitions/different sizes would sort themselves out.

Hope I’m explaining properly.


At least with my NAS, pool size did not matter! How that differs with local drives, not really sure. Also I’ve moved things from NAS to local with no issues (local is only 70gb), I don’t think the system really cares as long as there is enough room to store the data that is in actual use.

I’d make a test VM and migrate it, the worst that can happen is this test VM breaks.

Hi Greg,

That’s what I was hoping, but wasn’t sure how data space vrs partition size vrs drive size behaves when copying VM’s

Thanks for your insight.

Hi Guys,

Have moved over first VM. It copied and starts, however my concern is that its likely to cause me headaches in future. This is becuase the partition sizes don’t match.

Here is how my disk looks:

Again, this is on a 400GB RAID 1 EXT4 drive. However the drive size states 916.18GB

On the actual server it shows:

Its never going to need the extra space, but will this come back to bite me at some point?


If you try to fill it, then it will indeed be a problem. But to do that you’d need to use all that unallocated space. If you never intend to use that space, then the thin provisioned disk should never grow to be a problem. It looks like the maximum that VM can grow to be is around 270GB so you should be OK.

Thanks Greg,

I hate things being messy like this … tweaks my OCD.

It was suggested I try : How to shrink a virtual disk | XCP-ng Documentation … got from XCP forum

I tried Clonezilla a couple of times with this guide (had to modify platform device ID to get display to work) but ultimately it failed midway. Me thinks I’ll have to stump up for bigger SSD’s.

Thanks for your input.


Shrinking should be similar to expanding, it’s going to take something like booting a linux disk and use gparted to move things around. I haven’t tried shrinking, but I have enlarged disks before.

Windows (server?) normally installs 3 partitions, you may only see 2 in Disk Manager. Boot, OS, recovery. If you add disk space in XCP-NG, it adds at the end of the disk. Now you can’t simply merge the unused into the OS partition because it isn’t contiguous. So you “offset” the recovery partition to the end of the disk, then write changes. When you reboot you now have contiguous space that you can merge into the OS partition. I would expect shrinking to be similar but in reverse (in a way).

And as long as you don’t try to fill that unformatted space, you should be fine on the smaller storage.

I may need to try shrinking a VM disk in the same condition you disk is in and see if I can make it work. Won’t be for a while though, too many other projects I need to get done in the next month.

Thanks Greg. Like you, I have loads of experience expanded disks, with this being my first time of shrinking Windows partitions. Have shrunk Linux parts. before with GParted which was relatively easy once you get your head around moving the swap part. around if it ends up in the middle.

Might have a go on a test system to see how I get on.

Again, thanks for your comments.