Hi, Here is the network configuration part in the preseed
> # Network configuration >> > d-i netcfg/choose_interface select auto > > >> d-i netcfg/disable_autoconfig boolean true > > d-i netcfg/get_ipaddress string 172.17.0.23 > > d-i netcfg/get_netmask string 255.255.255.0 > > d-i netcfg/get_gateway string 172.17.0.1 > > d-i netcfg/get_nameservers string 172.17.0.1 > > d-i netcfg/confirm_static boolean true > > >> d-i netcfg/get_hostname string unassigned-hostname > > d-i netcfg/get_domain string unassigned-domain > > I think the reason Packer keep terminating the VM because SSH timeout before it can finish creating the VM. So I randomly increased the "ssh_timeout" in the template to 10 minutes and it can built successfully. Thanks. On Tuesday, October 3, 2017 at 3:18:21 AM UTC+7, Alvaro Miranda Aguilera wrote: > > hello > > lets skip packer for a second, since looks more a ubuntu question at this > point > > what your preseed does? use dhcp or fixed ip? > > if use dhcp, there is dhcp server in the network being used ? > > Alvaro > > > On Mon, Oct 2, 2017 at 11:26 AM, Suraphart Suwanmaitree < > [email protected] <javascript:>> wrote: > >> Hi, >> >> I have problem building an Ubuntu VM on a remote ESXi using Packer. The >> VM always failed to finish the configuration and getting terminated after >> "Timeout waiting for SSH.". I see "[DEBUG] Error getting SSH address: No >> interface on the VM has an IP address ready" message in the Packer debug >> log but the IP address has already been assigned to the VM as I can see >> from the "esxcli --formatter csv network vm port list -w <VM world ID>" >> output and it can be reached via ping. Here is my template >> https://gist.github.com/giiift/012404a732d81cbc95e2487cbfcdfea9. >> >> ~ # esxcli --formatter csv network vm port list -w 11088749 >>> >>> >>>> ActiveFilters,DVPortID,IPAddress,MACAddress,PortID,Portgroup,TeamUplink,UplinkPortID,vSwitch, >>> >>> ,,172.17.0.23,00:0c:29:6e:e9:ce,33554444,BPS >>>> Network,vmnic0,33554434,vSwitch0, >>> >>> >> I tried both static IP and dynamic IP from DHCP but they all failed with >> the same error. The debug log is as attached. >> >> Below is my environment: >> >> - Packer v1.1.0 >> - VMware ESXi 5.5.0 Releasebuild-3116895 >> >> >> Does anyone has any idea how to fix my problem? >> >> Regards. >> >> -- >> This mailing list is governed under the HashiCorp Community Guidelines - >> https://www.hashicorp.com/community-guidelines.html. Behavior in >> violation of those guidelines may result in your removal from this mailing >> list. >> >> GitHub Issues: https://github.com/mitchellh/packer/issues >> IRC: #packer-tool on Freenode >> --- >> You received this message because you are subscribed to the Google Groups >> "Packer" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/packer-tool/d7dc133f-f52c-4dec-99f5-c59a770fef0e%40googlegroups.com >> >> <https://groups.google.com/d/msgid/packer-tool/d7dc133f-f52c-4dec-99f5-c59a770fef0e%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Alvaro > > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/da97bec6-aeaf-496a-8f01-34ec651cd2ac%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
