Tips and Tricks for OVM – 2. Fakeuuid it

part 2 in the “Tipd and Tricks for OVM” series. Part 1 is here


Every OVM Server receives an unique ID when the agent starts. Without this ID, a server can’t join a cluster and the manager can’t dispatch commands to the agent. But how does this ID get set?

Well if you look into the OVM source RPM’s for the ovs-agent-3.1.1-89.src, you’ll see in the file linux_xen/Extensions/discover.c file the following :

/* agent_unique_id – report a unique 16 byte identifier for this node
* Generates a 16 byte response string containing a unique 16 byte
* identifier for this node. Uses the SMBIOS UUID if it appears to be valid.
* Otherwise generate a fallback value based on ethernet MAC addresses.
* Returns non-zero status if no id can be constructed.

And a bit further

/* generate_fallback_unique_id – create a unique ID without using SMBIOS UUID

// Try using a sequence of ethernet MAC addresses as the unique ID.
// MAC’s are not good because the NIC could be replaced, or worse
// moved between systems. Using multiple MACs will catch a few
// more cases (unless it’s a multiport NIC, sigh).

So We can conclude that the agent will :

  • Ask SMBIOS for an id and if it’s valid use it. If not valid or no ID then
  • Get the MAC address of physical eth devices on the system and concatenate in an UUID

This poses a great risk because if for some reason you change the motherboard ( other SMBIOS ) or 1 of the network devices on the system ( other MAC ), you’ll have a new UUID.

How to detect a changed UUID?

The following points to a changed uuid :

  • Unable to join cluster after reboot
  • “Unable to send notification” messages on the console
  • The OVM Manager fails to rediscover the server after reboot ( tries 5 times and gives up )
  • The OVM Server in OVM Manager will become in ERROR state with an error that looks like : “The server has changed IP or is unreachable”

Fakeuuid it !

In order to solve this issue, the agent has a ini parameter you can set to ensure the same UUID all the time. You can find it in the file /etc/ovs-agent/agent.ini. Get the server uuid from OVM Manager and set it in this parameter.


I personally set this on every OVM install i’m doing to ensure there are no issues with this ID changing.