Servers & Storage
How to give a Fedora Server VM on XCP-ng more disk space. XCP-ng VMs use Xen's paravirtual disk driver, so the disk is /dev/xvda, not /dev/sda. Fedora Server keeps the root filesystem (XFS) on LVM: xvda → partition xvda3 → volume group fedora → logical volume root.
Check the current layout
lsblk
sudo vgs
sudo lvs
df -h /
A typical UEFI install looks like this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
xvda 202:0 0 50G 0 disk
├─xvda1 202:1 0 600M 0 part /boot/efi
├─xvda2 202:2 0 1G 0 part /boot
└─xvda3 202:3 0 48.4G 0 part
└─fedora-root 253:0 0 15G 0 lvm /
Note the LVM partition number (here 3) and the volume group name (fedora on current releases; older installs may use fedora_<hostname>).
Grow the virtual disk in XCP-ng
XCP-ng can't resize the disk of a running VM, so shut the VM down first.
In Xen Orchestra
- Shut down the VM.
- Open the VM → Disks tab.
- Click the disk's size, enter the new size (e.g.
100 GiB) and confirm. - Start the VM.
Or from the XCP-ng host console
xe vm-shutdown vm="fedora-server"
xe vm-disk-list vm="fedora-server" # copy the VDI uuid of the disk
xe vdi-resize uuid=<vdi-uuid> disk-size=100GiB
xe vm-start vm="fedora-server"
Grow the partition
sudo dnf install -y cloud-utils-growpart
sudo growpart /dev/xvda 3
Note the space between the disk and the partition number. CHANGED: partition=3 … means it worked.
Without growpart you can use parted instead: sudo parted /dev/xvda resizepart 3 100%
Grow the physical volume
sudo pvresize /dev/xvda3
sudo vgs # VFree should now show the new space
Grow the root volume and filesystem
sudo lvextend -r -l +100%FREE /dev/fedora/root
-r also grows the XFS filesystem while it's mounted, so no reboot is needed. If you'd rather keep some free space in the volume group (for LVM snapshots or another volume later), give a size instead, e.g. -L +40G.
Confirm
df -h /
Troubleshooting
lsblkstill shows the old disk size – the VM was running during the resize, or it hasn't been restarted. Shut it down completely (not just reboot) and start it again.growpartsays NOCHANGE – the partition already fills the disk. Checklsblk; the space may already be in the volume group (see the box at the top).- "Volume group not found" – use the exact name shown by
sudo vgsin thelvextendpath, e.g./dev/fedora_myhost/root. - The disk is
/dev/sdaor/dev/vda– the VM isn't using Xen's paravirtual disk driver (or isn't on XCP-ng). The steps are the same; just swap the device name.
See also: Expand an LVM Disk (Ubuntu).

