Packer Time out ssh with vmware-vmx

387 views
Skip to first unread message

Siva Abbannagari

unread,
Oct 10, 2016, 2:22:46 PM10/10/16
to Packer
I am trying to build an vmware appliance with packer.

I have a base vmx file  which i am just trying to connect to the machine with SSH after launching with packer, but its failing to ssh though I manually can do ssh to that box, But packer is not able to.

any inputs?


Build 'vmware-vmx' errored: Timeout waiting for SSH

Alvaro Miranda Aguilera

unread,
Oct 11, 2016, 6:59:41 AM10/11/16
to packe...@googlegroups.com
hello

not enough information i am afraid.

Can you share a copy of your files in a github repo for review?

Thanks
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 packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/4cf38050-1c9e-4996-8ba1-8cca319617d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Siva Abbannagari

unread,
Oct 13, 2016, 5:55:45 PM10/13/16
to Packer
Hi Thanks for reply below is my build.json file

{

"builders": [

{

  "type": "vmware-vmx",

  "source_path": "/tmp/abc.vmx",

  "vm_name": "abc-test-vm",

  "ssh_username": "root",

  "ssh_password": "ProspectHills",

  "http_directory" : "preseeds",

  "http_port_min" : 9001,

  "http_port_max" : 9001,

  "ssh_wait_timeout": "1000s",

  "headless": true

}

]

}


On Tuesday, October 11, 2016 at 3:59:41 AM UTC-7, Alvaro Miranda Aguilera wrote:
hello

not enough information i am afraid.

Can you share a copy of your files in a github repo for review?

Thanks
Alvaro.
On Mon, Oct 10, 2016 at 8:22 PM, Siva Abbannagari <siva.abb...@gmail.com> wrote:
I am trying to build an vmware appliance with packer.

I have a base vmx file  which i am just trying to connect to the machine with SSH after launching with packer, but its failing to ssh though I manually can do ssh to that box, But packer is not able to.

any inputs?


Build 'vmware-vmx' errored: Timeout waiting for SSH

--
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.



--
Alvaro

Alvaro Miranda Aguilera

unread,
Oct 14, 2016, 3:37:44 AM10/14/16
to packe...@googlegroups.com
hello

assuming there is a vmx file here: /tmp/abc.vmx

when you run packer build

what happens?
What should be happening and is not happening?

PACKER_LOG=1 packer build <templatename> 

that should provide more information.

Thanks
Alvaro.



To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/7a083a53-49ed-4dba-a66c-1e1f2a81d9e6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Siva Abbannagari

unread,
Oct 17, 2016, 3:36:36 PM10/17/16
to Packer
Hi Alvaro,

Please find logs below:
My Packer version is 0.10.1

Warnings for build 'vmware-vmx':


* A shutdown_command was not specified. Without a shutdown command, Packer

will forcibly halt the virtual machine, which may result in data loss.


==> vmware-vmx: Pausing after run of step 'StepPrepareTools'. Press enter to continue.

==> vmware-vmx: Pausing after run of step 'StepOutputDir'. Press enter to continue.

==> vmware-vmx: Pausing after run of step 'StepCreateFloppy'. Press enter to continue.

==> vmware-vmx: Cloning source VM...

==> vmware-vmx: Pausing after run of step 'StepCloneVMX'. Press enter to continue. ==> vmware-vmx: Pausing after run of step 'StepConfigureVMX'. Press enter to continue. ==> vmware-vmx: Pausing after run of step 'StepSuppressMessages'. Press enter to continue. ==> vmware-vmx: Starting HTTP server on port 9001

==> vmware-vmx: Pausing after run of step 'StepHTTPServer'. Press enter to continue. ==> vmware-vmx: Pausing after run of step 'StepConfigureVNC'. Press enter to continue. ==> vmware-vmx: Starting virtual machine...

    vmware-vmx: The VM will be run headless, without a GUI. If you want to

    vmware-vmx: view the screen of the VM, connect via VNC without a password to

    vmware-vmx: 127.0.0.1:5928

==> vmware-vmx: Waiting 10s for boot...

==> vmware-vmx: Pausing after run of step 'StepRun'. Press enter to continue. ==> vmware-vmx: Connecting to VM via VNC

==> vmware-vmx: Typing the boot command over VNC...

==> vmware-vmx: Pausing after run of step 'StepTypeBootCommand'. Press enter to continue. ==> vmware-vmx: Waiting for SSH to become available...

==> vmware-vmx: Timeout waiting for SSH.

==> vmware-vmx: Pausing before cleanup of step 'StepTypeBootCommand'. Press enter to continue. ==> vmware-vmx: Pausing before cleanup of step 'StepRun'. Press enter to continue. ==> vmware-vmx: Stopping virtual machine...

==> vmware-vmx: Pausing before cleanup of step 'StepConfigureVNC'. Press enter to continue. ==> vmware-vmx: Pausing before cleanup of step 'StepHTTPServer'. Press enter to continue. ==> vmware-vmx: Pausing before cleanup of step 'StepSuppressMessages'. Press enter to continue. ==> vmware-vmx: Pausing before cleanup of step 'StepConfigureVMX'. Press enter to continue. ==> vmware-vmx: Pausing before cleanup of step 'StepCloneVMX'. Press enter to continue. ==> vmware-vmx: Pausing before cleanup of step 'StepCreateFloppy'. Press enter to continue. ==> vmware-vmx: Pausing before cleanup of step 'StepOutputDir'. Press enter to continue. ==> vmware-vmx: Deleting output directory...

==> vmware-vmx: Pausing before cleanup of step 'StepPrepareTools'. Press enter to continue. Build 'vmware-vmx' errored: Timeout waiting for SSH.


==> Some builds didn't complete successfully and had errors:

--> vmware-vmx: Timeout waiting for SSH.


==> Builds finished but no artifacts were created.




--
Alvaro

Alvaro Miranda Aguilera

unread,
Oct 17, 2016, 4:56:17 PM10/17/16
to packe...@googlegroups.com
seems the VM is not starting the network, so packer can't ssh into.

When you turn this VM on does get ip from dhcp and you can ssh to the IP it gets?

Whats the OS ?



To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/26d53d03-75ce-43c3-a8c3-21977c489d2d%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Siva Abbannagari

unread,
Oct 17, 2016, 6:23:58 PM10/17/16
to Packer
It is Centos 6.6,

It is getting the IP , Actually I see the Ip on the VMWARE welcome screen and can connect to it as well.
Whether that ip is returned back to packer or no  I am not aware of it.

This What I have done,  In VMWARE workstation I opened the Instances and went to console on the VMWARE login screen it has the IP ,I can login to that IP.



Thanks,
Siva



--
Alvaro

Siva Abbannagari

unread,
Oct 17, 2016, 6:24:14 PM10/17/16
to Packer
Sorry Centos6.8

Alvaro Miranda Aguilera

unread,
Oct 18, 2016, 4:05:03 AM10/18/16
to packe...@googlegroups.com
hello

when you pack the box, do you make sure its possible to reuse a clone ?

When you start manually this new VM and login, can you share the output of 

ifconfig -a

if you see the dhcp ip on the eth1 instead of eth0 that probably will show that you are not packing the box properly.

/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/udev/rules.d/70-persitent-net.rule

Those files usually prevent the clone to start properly

Alvaro.

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/bd0a988d-07fa-4df9-b4e6-e0df1b513cda%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Siva Abbannagari

unread,
Oct 18, 2016, 2:51:57 PM10/18/16
to Packer
Hi Alvaro, 

I started the VMX manually and checked the same the IP is on eth0 interface and it does not have the persistent rules file.(note that I have changed the IP)

[root@localhost ~]# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0D:26:49:17:EC  

          inet addr:1.1.1.1  Bcast:10.10.3.255  Mask:255.255.252.0

          inet6 addr: fe80::20c:29ff:fe49:97dc/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:964 errors:0 dropped:0 overruns:0 frame:0

          TX packets:98 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:173576 (169.5 KiB)  TX bytes:14317 (13.9 KiB)


lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:65536  Metric:1

          RX packets:54 errors:0 dropped:0 overruns:0 frame:0

          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:23888 (23.3 KiB)  TX bytes:23888 (23.3 KiB)


[root@localhost ~]# ls -arlth /etc/udev/rules.d/

total 20K

-rw-r--r--. 1 root root  316 May 10 22:58 60-raw.rules

-rw-r--r--. 1 root root  304 May 10 23:55 98-kexec.rules

drwxr-xr-x. 2 root root 4.0K Jun 23 15:47 .

drwxr-xr-x. 4 root root 4.0K Jun 23 19:39 ..

-rw-r--r--  1 root root  341 Jun 23 19:47 99-vmware-scsi-udev.rules

[root@localhost ~]# ls  /etc/sysconfig/network-scripts/ifcfg*

/etc/sysconfig/network-scripts/ifcfg-eth0  /etc/sysconfig/network-scripts/ifcfg-lo

[root@localhost ~]# 




--
Alvaro

Siva Abbannagari

unread,
Oct 18, 2016, 3:14:58 PM10/18/16
to Packer
One more thing I figured out is 

/etc/sysconfig/network-scripts/ifcfg-eth0 is symlink of 

/etc/sysconfig/networking/devices/ifcfg-eth0


Would it cause any issue?

Thanks,
Siva

Alvaro Miranda Aguilera

unread,
Oct 19, 2016, 5:11:34 AM10/19/16
to packe...@googlegroups.com

On Tue, Oct 18, 2016 at 9:14 PM, Siva Abbannagari <siva.abb...@gmail.com> wrote:
/etc/sysconfig/networking/devices/ifcfg-eth0

hello

this is a new VM based of the source one? like a clone?

Can you share a copy of /etc/sysconfig/networking/devices/ifcfg-eth0

Thanks!


--
Alvaro

Siva Abbannagari

unread,
Oct 19, 2016, 12:10:29 PM10/19/16
to Packer
Here is my /etc/sysconfig/networking/devices/ifcfg-eth0 file contents

DEVICE=eth0

BOOTPROTO=dhcp

ONBOOT=yes

TYPE=Ethernet

Siva Abbannagari

unread,
Oct 20, 2016, 3:03:24 PM10/20/16
to Packer
HI Alvaro

Is there anyting I have missed and thats the reason it is not doing SSH?

Thanks,
Siva

Siva Abbannagari

unread,
Oct 24, 2016, 1:38:40 PM10/24/16
to Packer
Hi Alvaro,

any findings on this?

Thanks,
Siva

Alvaro Miranda Aguilera

unread,
Oct 24, 2016, 4:31:44 PM10/24/16
to packe...@googlegroups.com
Hello,

Nothing from what I can see on this end.

Could you share a copy of the VM ? Happy to have a look.

Dropbox works fine,. Feel free to send a direct email with linux and user/pass

Thanks


--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/d71f4d16-1911-4a1b-9b54-b59550f36872%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Siva Abbannagari

unread,
Oct 25, 2016, 2:36:07 PM10/25/16
to Packer
I will share the VM, can your share your direct email please?

One more things is thats its a OVA I unpacked it to vmx with ovftool.

Thanks,
Siva
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.



--
Alvaro

Alvaro Miranda Aguilera

unread,
Oct 25, 2016, 5:41:56 PM10/25/16
to packe...@googlegroups.com
my email is on this thread.

kikitux 
at


To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/b8d11fac-1846-4ddb-941a-af00be25c7e9%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Siva Abbannagari

unread,
Oct 25, 2016, 6:13:26 PM10/25/16
to Packer
Thanks,
Siva



--
Alvaro

Denis B

unread,
Jul 19, 2018, 7:02:10 AM7/19/18
to Packer
Did you find a solution after all ?
Reply all
Reply to author
Forward
0 new messages