Port generationid patch to xenopsd

Based on xen-api 3ac4f168beb096a9af64ead21e4467dbc4c58cb7

Signed-off-by: David Scott <dave.scott@eu.citrix.com>