Resize vm fail with Permission denied

When a compute resize a vm, we need bash to execute ssh command like  ssh 1.2.3.4 mkdir -p /var/lib/nova/instances/********