Tips and Tricks for OVM – 2. Fakeuuid it

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

The UUID

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.

[server]
fakeuuid=34:45:4c:4c:5a:00:10:20:80:59:b5:c0:4a:42:35:45

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

Advertisements

5 responses to “Tips and Tricks for OVM – 2. Fakeuuid it

  1. Hello,

    thank for your insight

    i would like to know how to refresh ip address of manager inside ovs-agent db
    cause i have this error:

    Error initializing notification server: ‘Invalid URL Request (send) https://192.168.1.104:7002/ovm/core/OVMManagerCoreServlet&c=1&s=-1&lb=p&t=2&p=00112233445566778899aabbccddeeff%2Cb91e2eba796644fd8c270e7d931004ab

    and

    ERROR (notification:44) Unable to send notification: (2, ‘No such file or directory’)

    OVM manager uses dhcp, the actual ip is 192.168.1.128

    When i do cat /etc/ovs-agent/db/server
    i have

    192.168.1.35q.registered_ipU{https://00112233445566778899aabbccddeeff:b91e2eba796644fd8c270e7d931004ab@192.168.1.104h^I01/ovm/core/OVMManagerCoreServletq.manager_core_api_urlUOfflineq.cl.is_masterUed_poolq.pool_aliasU 0004fb0000010000353be1a42c1faaeaq.manager_uuidc__builtin__
    set

    Any ideas
    If you can help ?

    • Hi,

      It is generaly a bad idea to have your manager or your servers set with dhcp. I would either set a static ip to the 104 address you need, or reinstall somewhere you can use a static ip.

      A reinstallation of the ovm manager can be done with the –uuid parameter to ensure you can just rediscover servers, storage and vms.

      Kind regards

  2. Hey Bjorn,

    I found the article useful, but on checking with the the rest of the Oracle VM team this really shouldn’t be considered a “best practice”. We consider it to be a workaround – if there are SMBIOS issues then using fakeuuid can work around them, but that does not make it a “best practice”. See MOS note 1531611.1 for an explanation of the circumstances when we’ve used it.

    Toby (Oracle)

    • Hey Toby,

      Thanks for the feedback. Title might have been a little badly choosen. Going to change it to “Tips & Tricks” 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s