xenserver / packer-plugin-xenserver

A builder plugin for Packer.IO to support building Citrix Hypervisor images.
Mozilla Public License 2.0
101 stars 113 forks source link

xva builder missing communicator defaults #95

Open chqr opened 6 years ago

chqr commented 6 years ago

The ISO builder is able to communicate with new vms over ssh with a config like the following:

 "ssh_username": "root",
 "ssh_password": "{{ user `vm_root_password` }}",
 "ssh_wait_timeout": "300s",

With the XVA builder, the same config will produce an error unknown communicator type. Setting "communicator": "ssh", fixes the issue. Unfortunately, the ssh timeout is then 0 seconds, which causes builds to fail with Timeout waiting for SSH. That can be fixed by setting ssh_timeout to a non-zero value:

 "communicator": "ssh",
 "ssh_username": "root",
 "ssh_password": "{{ user `vm_root_password` }}",
 "ssh_timeout": "300s"

Would be nice if the behavior was consistent, suspect this line needs to be added to the xva builder: https://github.com/xenserver/packer-builder-xenserver/blob/5e1f8571d678e47779a1cfed03794142d32a3b66/builder/xenserver/iso/builder.go#L70