Skip to content

Latest commit

 

History

History
262 lines (170 loc) · 5.87 KB

File metadata and controls

262 lines (170 loc) · 5.87 KB
layout default
title NFS on XCP-ng - Quick Start Guide (Xen Orchestra)

NFS on XCP-ng - Quick Start Guide

This guide walks you through configuring NFS storage on XCP-ng using Xen Orchestra (XO) web interface.

📘 For iSCSI storage: See iSCSI Quick Start or iSCSI GUI Guide


{% include quickstart/disclaimer.md %}


Prerequisites

  • XCP-ng 8.3 with Xen Orchestra installed
  • Pure FlashArray with:
    • NFS file interface configured
    • NFS export policy created with NFSv4.1 enabled (recommended) and no root squash enabled
    • Export path created (e.g., /xcp/VMs)
    • NFS export quota policy created
  • Network connectivity between XCP-ng hosts and Pure FlashArray NFS interface

Step 1: Verify Network Connectivity

Before adding NFS storage, verify connectivity from each XCP-ng host.

Via SSH to Each Host

# Test connectivity to NFS server
ping -c 3 <NFS_SERVER_IP>

# Test NFS port (2049)
nc -zv <NFS_SERVER_IP> 2049

# List available exports
showmount -e <NFS_SERVER_IP>

Expected output from showmount:

Export list for 10.10.3.15:
/xcp/VMs 10.10.3.0/24

Step 2: Add Pure FlashArray NFS

Via Xen Orchestra

Important: Your NFS server or appliance must be set to allow sub-directory mounts, or adding the SR will fail. In FreeNAS/TrueNAS, this is the "All dirs" checkbox in NFS share properties.

  1. Click New → Storage in the top menu

XO New Storage Menu XO New menu showing Storage option

  1. Fill in the initial SR details:
Field Value Description
Host Select pool master Initial host for connection
Name PureNFS Descriptive name for the SR
Description Pure NFS Storage Optional description

Initial SR Details Fill in Host, Name, and Description before selecting storage type

  1. Select NFS from the storage type dropdown

Storage Type Selection Selecting NFS storage type

  1. Enter the NFS connection details:
Field Value Description
Server 10.10.3.15 Pure FlashArray NFS file interface IP
NFS Version 4.1 NFSv4.1 recommended for Pure

NFS Connection Form NFS SR creation form with connection details

  1. Select the NFS export path

NFS Path Selection Selecting VMs path from NFS export

  1. Click Create

Create NFS Button Click Create to add the NFS SR

  1. Wait for the SR to be created - XO will automatically show the SR summary page

SR Details SR General tab showing connected NFS storage repository

  1. Verify host connections in the Hosts tab

SR Hosts Tab SR Hosts tab showing all hosts connected to NFS SR


Step 3: Create a Test VM

Via Xen Orchestra

  1. Click New → VM
  2. Select your template (e.g., Ubuntu, CentOS, Windows)
  3. In the Disks section, select your new NFS SR (in our lab "PureNFS" is the SR)

VM Disk Selection

  1. Complete the VM creation wizard
  2. Start the VM and verify it runs correctly

Verify VM Disk Location

After creating the VM, verify the disk is stored on NFS:

  1. Select the VM in XO
  2. Go to the Disks tab
  3. Verify the disk shows the NFS SR as its location

Step 4: Verify via CLI (Optional)

Connect to a host via SSH to verify the NFS mount:

# List SRs
xe sr-list type=nfs

# Check mount status
mount | grep nfs

# View SR directory
ls -la /var/run/sr-mount/<SR_UUID>/

NFS vs iSCSI Comparison

Feature NFS iSCSI
Protocol File-based Block-based
Setup Complexity Simpler More complex
Multipathing Built-in (TCP) Requires dm-multipath
Performance Good for mixed workloads Better for I/O intensive
Live Migration Supported Supported
Use Case General VM storage, ISO library Database VMs, high IOPS

Troubleshooting

SR Not Connecting

  1. Check network connectivity:

    ping <NFS_SERVER_IP>
    nc -zv <NFS_SERVER_IP> 2049
  2. Check NFS exports:

    showmount -e <NFS_SERVER_IP>
  3. Check firewall on NFS server:

    • Ensure ports 111 (rpcbind) and 2049 (NFS) are open
  4. Check export permissions:

    • Verify XCP-ng host IPs are in the allowed list

Mount Failures

  1. Check NFS version compatibility:

    # Try mounting manually with specific version
    mount -t nfs -o vers=3 <NFS_SERVER_IP>:/path /mnt/test
  2. Check for stale mounts:

    # On XCP-ng host
    mount | grep nfs

Performance Issues

  1. Check NFS options:

    • Use tcp instead of udp
    • Adjust rsize and wsize if needed
  2. Check network:

    # Test throughput
    dd if=/dev/zero of=/var/run/sr-mount/<SR_UUID>/testfile bs=1M count=1024

Quick Reference

Task Xen Orchestra Location
View SRs Home → SRs
Create VM New → VM
Pool Settings Home → Pools → Advanced
Logs Home → Logs

CLI Commands

# List NFS SRs
xe sr-list type=nfs

# Get SR details
xe sr-param-list uuid=<SR_UUID>

# Check PBD status
xe pbd-list sr-uuid=<SR_UUID>

# Reconnect SR
xe pbd-plug uuid=<PBD_UUID>

# Check mounts
mount | grep nfs

Next Steps