Preseed.cfg file for ubuntu18.04

45 views
Skip to first unread message

Tekchand Dagar

unread,
Jul 22, 2019, 7:28:52 AM7/22/19
to Packer
Hello Team,

Currently we have OVA of ubuntu16.04 which is created by packer with our required software. But now we want to create OVA of Ubuntu18.04 because LTS will be end for Ubuntu16.04 after some time. But when i am trying to create OVA using packer for ubuntu18.04 its seems that preseed.cfg is not working. I am using same preseed.cfg file which is used by Ubuntu16.04.

Can you please confirm that same preseed.cfg will work or we have different preseed.cfg for ubuntu18.04? If we need to use different preseed.cfg can you please provide me the link for that file?

Thanks.

Rickard von Essen

unread,
Jul 22, 2019, 2:07:40 PM7/22/19
to packe...@googlegroups.com
It depends on what you do in your preseed. Some options might have been deprecated and removed, packages changed name or being dropped, etc etc.

Here is an example of a working one:



--
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/42fb87b4-8e23-423a-b114-eee381f96cbc%40googlegroups.com.

Tekchand Dagar

unread,
Jul 23, 2019, 3:14:30 AM7/23/19
to Packer
Hello Rickard,

Thank you for your response.

I have tried the preseed.cfg file which is provided by you. But still i am facing same issue. I have attached my builder json file and screenshot of step where it stuck. Please refer the attached files.

Please help me to fix the issue.


On Monday, July 22, 2019 at 11:37:40 PM UTC+5:30, Rickard von Essen wrote:
It depends on what you do in your preseed. Some options might have been deprecated and removed, packages changed name or being dropped, etc etc.

Here is an example of a working one:



On Mon, Jul 22, 2019, 13:28 Tekchand Dagar <tekcha...@gmail.com> wrote:
Hello Team,

Currently we have OVA of ubuntu16.04 which is created by packer with our required software. But now we want to create OVA of Ubuntu18.04 because LTS will be end for Ubuntu16.04 after some time. But when i am trying to create OVA using packer for ubuntu18.04 its seems that preseed.cfg is not working. I am using same preseed.cfg file which is used by Ubuntu16.04.

Can you please confirm that same preseed.cfg will work or we have different preseed.cfg for ubuntu18.04? If we need to use different preseed.cfg can you please provide me the link for that file?

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 packe...@googlegroups.com.
virtualbox.json.odt
Selection_037.png

Benjamin Lu

unread,
Jul 23, 2019, 11:35:12 AM7/23/19
to Packer
yeah, so the problem is the cd, don't use the live cd from ubuntu, but use this instead

Tekchand Dagar

unread,
Jul 24, 2019, 2:31:23 AM7/24/19
to Packer
Hello Benjamin,

Thank you for your response. I replaced my ISO with suggested by you. Now VM is registered as well as SSH connection is setup. But provisioner part is not working and showing the below 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-shell298352504
    virtualbox-iso: sudo: no tty present and no askpass program specified
==> virtualbox-iso: Deregistering and deleting VM...

```

I have used the below option as well in my builder:

```
"ssh_pty" : "true"
```
But it stuck at provisioner part. Can you please help me.

Thanks.

Benjamin Lu

unread,
Jul 24, 2019, 10:35:11 AM7/24/19
to Packer
in the provisioner, you can check out the chef.github.io/bento's preseed

but you need 

"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'",

in the provisioners part so that it can run as root, because provisioners are run in root.



On Monday, July 22, 2019 at 4:28:52 AM UTC-7, Tekchand Dagar wrote:

Benjamin Lu

unread,
Jul 24, 2019, 10:35:55 AM7/24/19
to Packer


On Monday, July 22, 2019 at 4:28:52 AM UTC-7, Tekchand Dagar wrote:

Tekchand Dagar

unread,
Jul 25, 2019, 6:06:13 AM7/25/19
to Packer
Hello Benjamin,

Thanks a lot. Your suggestion fixed my issue.

Thanks once again. :)
Reply all
Reply to author
Forward
0 new messages