I would like some examples too.
My latest (first) try gives me:
alfcruz-adm@local.hcpa.ufrgs.br@volt-ampere:~/packer-plugin-xenserver$ packer build ./ubuntu-2004.pkr.hcl
xenserver-iso.ubuntu-2004: output will be in this color.
Build 'xenserver-iso.ubuntu-2004' errored after 8 seconds 155 milliseconds: API Error: SESSION_AUTHENTICATION_FAILED root Authentication failure
==> Wait completed after 8 seconds 155 milliseconds
==> Some builds didn't complete successfully and had errors:
--> xenserver-iso.ubuntu-2004: API Error: SESSION_AUTHENTICATION_FAILED root Authentication failure
==> Builds finished but no artifacts were created.
alfcruz-adm@local.hcpa.ufrgs.br@volt-ampere:~/packer-plugin-xenserver$
Using root user. This user/pass works over SSH.