VMs Unable to Retrieve Metadata From Cloud-Init

Problem

Virtual machines in a specific subnet fail to reach metadata service on 169.254.169.254. As a result, cloud-init did not apply user-data configurations such as password injection.

Environment

  • Private Cloud Director Virtualization - v2025.4 and Higher
  • Private Cloud Director Kubernetes – v2025.4 and Higher
  • Self-Hosted Private Cloud Director Virtualization - v2025.4 and Higher
  • Self-Hosted Private Cloud Director Kubernetes - v2025.4 and Higher
  • Component:
    • Networking ( Neutron/OVN)

Cause

The root cause of the issue is missing distributed Neutron port used for metadata routing. This port, with IP [IP-Address] and device owner network:distributed, is critical for OVN to route metadata requests from VMs to the metadata proxy service.

Diagnostics

  1. VMs failed to reach 169.254.169.254 via ping or curl.
  2. Gateway IP was also unreachable from within the instance.
  3. ip netns ls command on impacted hosts showed no namespaces.
  4. Found no distributed Neutron port on the host.
  5. pf9-neutron-ovn-metadata-agent service was confirmed to be listening on port 8775.

Resolution

  1. Manually create the missing distributed Neutron port using the command:
Command
Copy

The [IP-Address] is any free IP Address available in the DHCP pool of the subnet.

  1. Restarted pf9-neutron-ovn-metadata-agent on all impacted compute nodes.
Affected Host
Copy
  1. Verified that ip netns ls showed namespaces post-restart.
Affected Host
Copy
  1. Re-tested metadata access from inside VMs using curl.
  2. Spawned a new VM with Ubuntu image and confirmed that cloud-init correctly applied the configured password and user-data.

Cirros OS image do not have cloud init service for handling the user data injection. Use image with cloud init service ex: Ubuntu or Rocky Linux for validation

Validation

  • From within the VM, below curl command returns the expected user-data content :
Getting meta_data within the VM
Copy
Getting user_data within the VM
Copy
  • Cloud-init logs inside the Ubuntu VM (/var/log/cloud-init.log) confirmed successful metadata retrieval and password configuration.
  • VM SSH access was successful using credentials configured via user-data.

Additional Information

  • In OVN-based OpenStack environments, the distributed metadata port must be explicitly present for each subnet requiring metadata access.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard