It's not a trivial scenario indeed. Dom0 is a PV guest (in other words: a VM) on top of an hypervisor (Xen), on top of an hypervisor (HyperV). As you can see, more layers means more problems
@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