1

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?

1

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.

KB's text:

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.

User-added image

5.Adjust the free space size as the following:

•Example for original size: 14406

User-added image

•Example for New size: 5000

User-added image

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:

User-added image

Proceed with the XenConvert utility to create a disk to import later or to create the new VDI on the XenServer.

0

What you should do is to first shrink the related disk from Windows. Then try to shrink it from XenServer.

  • Currently xenserver does not support shrinking VDI's. – Mert Gülsoy Sep 14 '15 at 14:44
0

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

  • 1
    This is an example of why link-only answers are bad. The link went away and had to be replaced with the Wayback Machine. – chicks Jan 8 '18 at 16:54

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.