XenServer - VMs on a Cisco USC host do not receive the DHCP settings

XenServer - VMs on a Cisco USC host do not receive the DHCP settings

book

Article ID: CTX693220

calendar_today

Updated On:

Description

When running VMs on a XenServer 8.4 host running on Cisco UCS hardware, the VMs do not receive the DHCP settings.

Resolution

You can work around this issue by using an Open vSwitch rule that matches all traffic on the xapi network bridge and forces all packets to have a VLAN Priority Code Point (PCP) of 0.

This method only injects VLAN 0 tags with priority 0 on incoming packets. These tags are properly processed by the XenServer VM Tools for Windows when the packets subsequently enter the VM.

To set up this rule, complete the following steps:

  1. Find the UUID of the VM by running the following command: xl vm-list
    For example:

    $ xl vm-list
    UUID ID name
    009e0a27-c76b-4906-91a9-19ed8be1bf16 0 Domain-0
    4fc1dab8-1cdb-ef6c-2d87-90c310c93237 1 pvsfarm
    b8c7c14b-36b7-72c1-132b-7b9ba40ca953 2 pvsserver
    e1582d4d-7d37-f933-e31f-797a5f49a9f5 4 d-win10-x64
    1a6ccfb8-20ec-101f-403d-e27eb575511f 6 d-ws22-x64
    ea13d5c2-7c59-4ea3-1d98-448472f02c3f 10 pvsguest

     

  2. Use the UUID of the VM to find the network-uuid of the VIF of the VM by running the following command: xe vif-list vm-uuid=<UUID>

    For example:

    $ xe vif-list vm-uuid=ea13d5c2-7c59-4ea3-1d98-448472f02c3f
    uuid ( RO) : 8c634eec-bbaa-9330-5ee5-331ef4e25285
    vm-uuid ( RO): ea13d5c2-7c59-4ea3-1d98-448472f02c3f
    device ( RO): 0
    network-uuid ( RO): 1df80050-def1-61a6-4f09-1f9576e9b9c6
    uuid ( RO) : bb1d6024-27e5-8eda-e36d-c0e5a5deac1d
    vm-uuid ( RO): ea13d5c2-7c59-4ea3-1d98-448472f02c3f
    device ( RO): 1
    network-uuid ( RO): 7206754b-ca4a-803e-d8ff-4ed34a3379ab

     

  3. Use the network-uuid of the DHCP network device to find the bridge name for the device. Run the following command: xe network-list uuid=<network_UUID>

    For example:

    $ xe network-list uuid=7206754b-ca4a-803e-d8ff-4ed34a3379ab
    uuid ( RO) : 7206754b-ca4a-803e-d8ff-4ed34a3379ab
    name-label ( RW): Bond 0+1
    name-description ( RW):
    bridge ( RO): xapi2
  4. With this bridge name, create the Open vSwitch rule. For example:

    $ ovs-ofctl add-flow xapi2 "priority=100,actions=mod_vlan_pcp:0,normal"
  5. The rule does not persist through host reboots or Open vSwitch service restarts. To ensure that the rule is persistent, set up a service to preserve the custom flow:
    1. Create the service by running the following command:
      $ vi /etc/systemd/system/ovs-custom-flow.service
      [Unit]
      Description=Add custom flow to Open vSwitch
      After=openvswitch.service
      Requires=openvswitch.service
      PartOf=openvswitch.service
      [Service]
      ExecStart=/usr/bin/ovs-ofctl add-flow xenbr0 "priority=100,actions=mod_vlan_pcp:0,normal"
      Restart=on-failure
      RestartSec=5
      [Install]
      WantedBy=multi-user.target
    2. Enable the service by running the following commands:
      $ systemctl daemon-reload
      $ systemctl enable ovs-custom-flow.service
      $ systemctl start ovs-custom-flow.service

Problem Cause

The update of XenServer 8.4 to use a newer version of Open vSwitch (2.17.7) has caused a change in behavior. Open vSwitch 2.17.7 drops the DHCP offer, while the previous version of Open vSwitch in XenServer processed it successfully.

In Open vSwitch version 2.17.7, the following behavior is the default:

  • When both the VLAN ID and the priority are set to zero, the 802.1Q header is omitted.
  • When the VLAN ID is 0 but the priority is non-zero, the 802.1Q header is included.​

Issue/Introduction

When running VMs on a XenServer 8.4 host running on Cisco UCS hardware, the VMs do not receive the DHCP settings. You can work around this issue by using an Open vSwitch rule that matches all traffic on the xapi network bridge and forces all packets to have a VLAN Priority Code Point (PCP) of 0.