@john.manning
Happy to hear that. I guess it was my fault - I edited the naming of the snipped pseudo vars:
OLDVBDUUID = xe vdi-param-get uuid=VDIUUID param-name=vbd-uuids
VDIUSERDEVICE = xe vbd-param-get param-name=userdevice uuid=OLDVBDUUID
maybe that way it's clearer for others that might find that helpful