Ok, and you need passwordless sudo. If you need to pass a password see examples in the docs for howto do that or check the bento repo.
And I see you already got a hand with this in the other thread. On Wed, Jul 24, 2019, 18:19 Rickard von Essen <rickard.von.es...@gmail.com> wrote: > Set ssh_pty to true. > > https://packer.io/docs/templates/communicator.html#ssh_pty > > On Wed, Jul 24, 2019, 08:48 Tekchand Dagar <tekchandda...@gmail.com> > wrote: > >> Hello Team, >> >> I am creating Virtualbox image for Ubuntu18.04. VM is registering but its >> end with error at provisoners part. >> >> Below is the error: >> >> {==> virtualbox-iso: Typing the boot command... >> ==> virtualbox-iso: Using ssh communicator to connect: 127.0.0.1 >> ==> virtualbox-iso: Waiting for SSH to become available... >> ==> virtualbox-iso: Connected to SSH! >> ==> virtualbox-iso: Uploading VirtualBox version info (5.2.26) >> ==> virtualbox-iso: Uploading VirtualBox guest additions ISO... >> ==> virtualbox-iso: Provisioning with shell script: >> /tmp/packer-shell922774385 >> virtualbox-iso: sudo: no tty present and no askpass program specified >> ==> virtualbox-iso: Deregistering and deleting VM... >> } >> >> I have attached my build file also. >> >> Please help me. >> >> 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+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/packer-tool/b38c2043-45d3-4302-a17e-adccc7623a71%40googlegroups.com >> <https://groups.google.com/d/msgid/packer-tool/b38c2043-45d3-4302-a17e-adccc7623a71%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CALz9Rt9K0-JZ7dKaEUM7JwAGLxGJjCujMv%3DaiQPPbBtERXFasQ%40mail.gmail.com.