When a device is hot plugged and it has custom properties we'll run that hook as well.
Implementation-wise, hot plug/unplug for disks and NICs is dead simple - vmCreate is more problematic:
If the user set a custom property called 'qos: 0.8' for nic3, I'd want it exposed as an environment variable called 'qos'
for hot plug nic hooks, but for vmCreate I'd like to prefix the nic's alias.
However, when vmCreate is called we don't have the aliases for NICs and disks.
The proposed solution is to create a new hook point called something like:
'before_device_creation' that will be called before vmCreate.
We'll then call that hook specifically for devices that contains custom properties, as described in the second paragraph of this mail.
I would love to hear smarter ideas before I move forward. Thanks!