Use task ref instead of UUIDs and minor fixes.
Use task watching in vm.export().
pool.patch() also applies the patch.