So about a month ago I started to looking at PfSense to become our VM firewall, After a few issues with upload speeds we got it working but noticed that VLANs did not have parent interface it as blank.

So I turned to PfSense documentation and xcp-ng forums but sadly no one else posted about this issue. So after doing some digging I found a fix and a work around.

Fix

You can edit this file via CLI and nano or using the web interface, however I will be editing via Nano in CLI.

nano /etc/inc/interfaces.inc

Find is_jumbo_capable

/ **** f * interfaces / is_jumbo_capable
 * NAME
 * is_jumbo_capable - Test if interface is jumbo frame capable. Useful for determining VLAN capability.
 * INPUTS
 * $ int - string containing interface name
 * RESULT
 * boolean - true or false
 ****** /
function is_jumbo_capable($iface) {
        $iface = trim($iface);
        $capable = pfSense_get_interface_addresses($iface);
 
        if (isset($capable['caps']['vlanmtu'])) {
                return true;
        }
 
        // hack for some lagg modes missing vlanmtu, but work fine w/VLANs
        if (substr($iface, 0, 4) == "lagg") {
                return true;
        }
 
        // hack for XenServer xn interfaces
        if (substr ($iface, 0, 2) == "xn"){
                return true;
        }
 
        return false;
}```

Add the following code where is saying //hack for XenServer xn interfaces, save the file and reboot. Now you should be able to login back in the web interface and create your VLAN's.

Work Around

SSH to PfSense then choose option 8 (shell) and execute the following command to create your VLAN.

ifconfig vlanXX create
ifconfig vlanXX vlan XX vlandev xn0

Where XX is the VLAN id.

After that you will be able to use the VLAN on your XenServer I would not recommend this way unless the fix did not work.