I faced a problem. I deployed a VM by size of 500GB on Citrix XenServer and now I want to shrink it, because I don't have enough space for snapshots. Now I want to perform an export/import to do this. I'm wondering if it's possible to import the OVF or OVA image on a smaller Virtual HD? or HD should be the same size?
In XenServer the process is to use XenConvert. (You convert with a shrinked HDD, and you re-import the image into the XenServer)
Please see that KB. How to Resize a XenServer Virtual Disk
The KB was created in 2014, but in old XenServer that tip worked. The tip state to use XenConvert 2+, but in 2011 it was already released.
To complete the following procedure, you need the access to Access to XenConvert 2.x.
1.Download and install XenConvert on the Windows VM.
2.Attach a secondary disk that is 205 percent times the size of the existing VDI. The secondary drive is to be used as temporary space for XenConvert.
3.Format the secondary disk with an NTFS file system and add a drive letter to the disk.
4.Open XenConvert and click Next.
5.Adjust the free space size as the following:
•Example for original size: 14406
•Example for New size: 5000
Description of the fields in the preceding figures:
•Used Space: The space currently being used in the VDI.
•Free Space: The new size for the VDI. So if you want to make it 10GB, you change the value to 10240 MB.
•Unallocated space: The additional space you give to the VM and that is displayed as unallocated space.
•Capacity: The value in the last row is the VM VDI total size:
Proceed with the XenConvert utility to create a disk to import later or to create the new VDI on the XenServer.
I almost got my answer from Citrix manual:
When you create an OVF package, the virtual hard disk images are, by default, allocated the same amount of space as the exported VM. For example, a VM that is allocated 26 GB of space will have a hard disk image that consumes 26 GB of space, regardless of whether or not the VM actually requires it.
So, I can't shrink it in this way! The link below suggests a technique: How to Shrink a Windows VM in XenServer