XenServer \ XCP-ng: How to Create a Virtual Disk Larger than 2tb

So recently I ran into an issue where I needed to create a virtual disk 20TB in size. Unfortunately, XCP-ng does not allow doing this through its manager because it uses an older disk system. However, you can manually create an LVM partition and map it to the VM. Here is what you need to do:


Grab your SR UUID from the management console. The UUID I will be using for example commands is f8f32ef5-81d7-9154-d0f2-b92559b8ecbc. You will need to replace it with your UUID.


Now we need to get the volume group device name:

vgs | awk '{print $1}' | grep f8f32ef5-81d7-9154-d0f2-b92559b8ecbc


Now we create the volume. Make to change the “20T” to your desired size in TB:

lvcreate -L20T -n"LV-"$(uuidgen) VG_XenStorage-f8f32ef5-81d7-9154-d0f2-b92559b8ecbc --config global{metadata_read_only=0}


Finally, scan the SR and you should see a no name virtual disk.

xe sr-scan uuid=f8f32ef5-81d7-9154-d0f2-b92559b8ecbc


Now you can attach the created disk to your VM. Just make sure to change the name in the management center.


There might be a way to thin provision it, but I don’t know how to do that. If you have found a way to do so, please comment down below.


About: Ryan Parker

I currently work as a system administrator for the local school district. I also have a side job helping small to medium business with their technology. One of my hobbies is building out infrastructures for myself, friends, and clients.

Leave a Reply

Your email address will not be published. Required fields are marked *