Error provisioning to ubuntu on Nutanix

I´m trying to provision kubernetes cluster (RKE1) on Nutanix. Host image is ubuntu 23.04 (have also tried 22.04), and the host gets created in nutanix and docker gets installed but then it fails with this error:
Error creating machine: ssh command error: command: sudo systemctl -f enable docker err: exit status 255 output:

Anyone have an idea? If I hurry to ssh to the machine, I can run the above command (as the root user created in the template image).