QCOW2 files differeing in size

jonc

Member
Jul 3, 2013
40
0
6
I did a direct copy of /var/lib/vz/images/* over SSH from one server to another so that I can decommission the older server.

I need some help understanding this because the file sizes of the QCOW2 files on both the old and new server differ in size.

[TABLE="class: grid, width: 500"]
[TR]
[TD]Old Server
[/TD]
[TD]VM Size
[/TD]
[TD]New Server
[/TD]
[TD]VM Size
[/TD]
[/TR]
[TR]
[TD]100
[/TD]
[TD]32G
[/TD]
[TD]100
[/TD]
[TD]91G
[/TD]
[/TR]
[TR]
[TD]101
[/TD]
[TD]45G
[/TD]
[TD]101
[/TD]
[TD]97G
[/TD]
[/TR]
[TR]
[TD]102
[/TD]
[TD]19G
[/TD]
[TD]102
[/TD]
[TD]46G
[/TD]
[/TR]
[TR]
[TD]103
[/TD]
[TD]18G
[/TD]
[TD]103
[/TD]
[TD]81G
[/TD]
[/TR]
[TR]
[TD]104
[/TD]
[TD]1.3G
[/TD]
[TD]104
[/TD]
[TD]11G
[/TD]
[/TR]
[TR]
[TD]105
[/TD]
[TD]15G
[/TD]
[TD]105
[/TD]
[TD]81G
[/TD]
[/TR]
[TR]
[TD]106
[/TD]
[TD]14G
[/TD]
[TD]106
[/TD]
[TD]81G
[/TD]
[/TR]
[TR]
[TD]107
[/TD]
[TD]26G
[/TD]
[TD]107
[/TD]
[TD]26G
[/TD]
[/TR]
[TR]
[TD]108
[/TD]
[TD]4.5G
[/TD]
[TD]108
[/TD]
[TD]4.5G
[/TD]
[/TR]
[TR]
[TD]109
[/TD]
[TD]24G
[/TD]
[TD]109
[/TD]
[TD]46G
[/TD]
[/TR]
[TR]
[TD]110
[/TD]
[TD]5.0G
[/TD]
[TD]110
[/TD]
[TD]121G
[/TD]
[/TR]
[/TABLE]

I think that what has happened is the file copy has copied the empty space in the VM itself.
Is there a way to reduce the filesizes once again without destroying data?