Haven't seen anyone do this before, would be intereseted if anyone is able to figure out how to handle multiple VMs. At the moment if you pin with two VMs then shutdown one, the system will no longer pin any CPU. I call this from the base qemu hook located here
#!/bin/bash
set -x
VM_NAME="$1"
VM_ACTION="$2/$3"