Error getting SSH address: IP lookup failed

131 views
Skip to first unread message

Benny Chan

unread,
Apr 12, 2019, 6:47:07 PM4/12/19
to Packer
hi All, 

I encountered the situation about "Error getting SSH address". The log message is listed below. 


2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 Lookup up IP information...
2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 GuestAddress found MAC address in VMX: 00:0c:29:64:ff:e1
2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 Trying DHCP leases path: /etc/vmware/vmnet8/dhcpd/dhcpd.leases
2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 IP lookup failed: None of the found device(s) [vmnet8] has a DHCP lease for MAC 00:0c:29:64:ff:e1
2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 [DEBUG] Error getting SSH address: IP lookup failed: None of the found device(s) [vmnet8] has a DHCP lease for MAC 00:0c:29:64:ff:e1
2019/04/11 17:43:06 packer: 2019/04/11 17:43:06 Located networkmapper configuration file using Workstation: /etc/vmware/netmap.conf
2019/04/11 17:43:06 packer: 2019/04/11 17:43:06 GuestIP discovered device matching nat: vmnet8

Attached the vmx file for reference. 

I followed a post online to vnc into the ip and I can reach the VM but it is one a setup screen or something. I attached the screen capture for reference

Any advice what steps to follow to make it works? 



pnda_template_base.vmx.txt
packer_ssh.png
packer_ssh_vnc.png

Rickard von Essen

unread,
Apr 13, 2019, 3:07:11 AM4/13/19
to packe...@googlegroups.com
Please provide your full Packer temple, Kickstart/preseed file if applicable and a full log when running Packer with env var PACKER_LOG=1.

--
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 packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/7ae69dc9-a942-470a-8c23-77d6c279e3bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Benny Chan

unread,
Apr 14, 2019, 9:14:52 PM4/14/19
to Packer
Thanks Rickard. This is the command I run 

/packer/packer build -var-file=myenv_conf.json vmware/local/centos_base.json

All files are zipped. 



On Saturday, April 13, 2019 at 3:07:11 PM UTC+8, Rickard von Essen wrote:
Please provide your full Packer temple, Kickstart/preseed file if applicable and a full log when running Packer with env var PACKER_LOG=1.

On Sat, Apr 13, 2019, 00:47 Benny Chan <bcu...@gmail.com> wrote:
hi All, 

I encountered the situation about "Error getting SSH address". The log message is listed below. 


2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 Lookup up IP information...
2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 GuestAddress found MAC address in VMX: 00:0c:29:64:ff:e1
2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 Trying DHCP leases path: /etc/vmware/vmnet8/dhcpd/dhcpd.leases
2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 IP lookup failed: None of the found device(s) [vmnet8] has a DHCP lease for MAC 00:0c:29:64:ff:e1
2019/04/11 17:43:01 packer: 2019/04/11 17:43:01 [DEBUG] Error getting SSH address: IP lookup failed: None of the found device(s) [vmnet8] has a DHCP lease for MAC 00:0c:29:64:ff:e1
2019/04/11 17:43:06 packer: 2019/04/11 17:43:06 Located networkmapper configuration file using Workstation: /etc/vmware/netmap.conf
2019/04/11 17:43:06 packer: 2019/04/11 17:43:06 GuestIP discovered device matching nat: vmnet8

Attached the vmx file for reference. 

I followed a post online to vnc into the ip and I can reach the VM but it is one a setup screen or something. I attached the screen capture for reference

Any advice what steps to follow to make it works? 



--
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 packe...@googlegroups.com.
Pnda_Packer_20190415.zip

Rickard von Essen

unread,
Apr 15, 2019, 12:34:12 AM4/15/19
to packe...@googlegroups.com
And your Kickstart file how does it look like?

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/9c2d7e94-af62-4f9d-a8e5-8a6705501e0a%40googlegroups.com.

Benny Chan

unread,
Apr 15, 2019, 12:48:48 AM4/15/19
to packe...@googlegroups.com
Sorry I am totally new to Packer. May i know where can i find the Kickstart file? 

Rickard von Essen

unread,
Apr 15, 2019, 1:10:34 AM4/15/19
to packe...@googlegroups.com
According to your configuration there should be a file http/ks.cfg


Benny Chan

unread,
Apr 15, 2019, 2:06:01 AM4/15/19
to Packer
Thanks Rickard. Attached the ks.cfg file 


On Monday, April 15, 2019 at 1:10:34 PM UTC+8, Rickard von Essen wrote:
According to your configuration there should be a file http/ks.cfg


On Mon, Apr 15, 2019, 06:48 Benny Chan <bcu...@gmail.com> wrote:
Sorry I am totally new to Packer. May i know where can i find the Kickstart file? 

On Mon, Apr 15, 2019 at 12:34 PM Rickard von Essen <rickard...@gmail.com> wrote:
And your Kickstart file how does it look like?

--
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 packe...@googlegroups.com.

--
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 packe...@googlegroups.com.
ks.cfg

Rickard von Essen

unread,
Apr 15, 2019, 3:01:20 AM4/15/19
to packe...@googlegroups.com
On CentOS, by default you can't connect as root on ssh. Try to use the centos user configured in the ks.cfg. This should most likely allow you to connect. 

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/0dbee59d-38e6-4a8a-a1ad-57380ede0a52%40googlegroups.com.

Benny Chan

unread,
Apr 15, 2019, 3:30:55 AM4/15/19
to Packer
Do you mean change the username and password ac "centos" (same as my ks.cfg) in my "myenv_conf.json"? 


On Monday, April 15, 2019 at 3:01:20 PM UTC+8, Rickard von Essen wrote:
On CentOS, by default you can't connect as root on ssh. Try to use the centos user configured in the ks.cfg. This should most likely allow you to connect. 

Rickard von Essen

unread,
Apr 15, 2019, 4:08:15 AM4/15/19
to packe...@googlegroups.com
Yes

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/2d0ce3ef-b542-4fa2-a228-83acf49b25e3%40googlegroups.com.

Benny Chan

unread,
Apr 15, 2019, 6:29:59 AM4/15/19
to Packer
Thanks. and I did it but same error message. When I VNC into the VM and I can see the error message as attached. I tried to added "ksdevice=eth0" or "ksdevice=0" as boot_command but no luck... 



On Monday, April 15, 2019 at 4:08:15 PM UTC+8, Rickard von Essen wrote:
Yes

pnda_packer_local_build_error.PNG

Rickard von Essen

unread,
Apr 15, 2019, 6:47:21 AM4/15/19
to packe...@googlegroups.com
I really recommend that you start with a known good packer template or at least a known good Kickstart file.

If you install a vm manually centos will write a Kickstart file in /root for whatever settings you used. But best is to fork a well known project like github.com/chef/bento and adapt their packer templates to your needs in small steps. 

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/a95811e2-88bb-436e-bf3a-35be34cba3f9%40googlegroups.com.

Benny Chan

unread,
Apr 16, 2019, 10:02:42 PM4/16/19
to Packer
Thanks Rickard. 

I am suspect that my situation is the iso cannot be boot correctly and the installation even not started... 


On Monday, April 15, 2019 at 6:47:21 PM UTC+8, Rickard von Essen wrote:
I really recommend that you start with a known good packer template or at least a known good Kickstart file.

If you install a vm manually centos will write a Kickstart file in /root for whatever settings you used. But best is to fork a well known project like github.com/chef/bento and adapt their packer templates to your needs in small steps. 

Reply all
Reply to author
Forward
0 new messages