Re: [packer] stop and disable systemctl service

2019-07-23 Thread Jeeva Chelladhurai
docker CLI starts docker service. In other words, as soon as I call docker 
command it starts the docker service

Thanks,
Jeeva 

On Tuesday, July 23, 2019 at 8:10:15 PM UTC+5:30, Rickard von Essen wrote:
>
> Most likely you have some other enabled unit that depends on 
> docker.service and hence it's started.
>
> Use systemctl list-dependencies --reverse docker.service to see what 
> depends on it.
>
> Also with systemd by default docker.service is started if anything 
> accesses /var/run/docker.sock (e.g. runs the docker command) 
>
> On Tue, Jul 23, 2019, 13:08 Jeeva Chelladhurai  > wrote:
>
>> I am manually testing it.. below is my provisioner and log..
>>
>> "provisioners": [{
>> "type": "shell",
>> "pause_before": "30s",
>> "inline": [
>>   "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo 
>> apt-key add -",
>>   "sudo add-apt-repository \"deb [arch=amd64] 
>> https://download.docker.com/linux/ubuntu bionic stable\"",
>>   "sudo apt-get update",
>>   "sudo apt-get install -y docker-ce",
>>   "sudo usermod -aG docker ubuntu",
>>   "curl -sSL http://sjeeva.github.io/getcompose | sudo sh",
>>   "sudo mkdir /data",
>>   "sudo systemctl stop docker",
>>   "sudo systemctl disable docker",
>>   "sudo cp /tmp/docker.service /lib/systemd/system/docker.service"
>> ]
>>   }]
>>
>> amazon-ebs: docker-compose version 1.24.1, build 4667896b is installed
>> ==> amazon-ebs: Synchronizing state of docker.service with SysV service 
>> script with /lib/systemd/systemd-sysv-install.
>> ==> amazon-ebs: Executing: /lib/systemd/systemd-sysv-install disable 
>> docker
>> ==> amazon-ebs: Pausing after run of step 'StepProvision'. Press enter to 
>> continue.
>>
>>
>>
>> On Monday, July 22, 2019 at 11:47:22 PM UTC+5:30, Rickard von Essen wrote:
>>>
>>> Could you provide details of what you have done and how you verified it? 
>>>
>>> On Mon, Jul 22, 2019, 19:56 Jeeva Chelladhurai  wrote:
>>>
 Hello All,

 I am building an AMI using packer. I want to install docker on my 
 target image however the docker should be in stopped state. In my 
 provisioner I have stopped and disabled the docker service, nonetheless, 
 when I launch a new VM the docker service is enabled and running. 

 Please guide me how to disable a service in packer.

 I'm building an ubuntu 18.04 image.

 Thanks,
 Jeeva'

 -- 
 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.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/packer-tool/8a9941fd-76ee-4e04-8061-35ee2b4f8966%40googlegroups.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 .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/e3691a88-091d-4208-b89f-eaedd6358d2d%40googlegroups.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 packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/7f433ee8-e55d-495f-8489-656dcbe8688e%40googlegroups.com.


Re: [packer] Issues installing vmware tools - using packer and vsphere-iso builder

2019-07-23 Thread Rickard von Essen
iso_paths is for specifying multiple alternative urls for the same iso.
Instead put the tools iso in the http_directory or somewhere else where you
can reach it and download it to the VM. Then use the procedure used here *)
to install it.

*) https://github.com/boxcutter/windows/blob/master/script/vmtool.bat

On Tue, Jul 23, 2019 at 1:12 AM MTorres  wrote:

> Hi all,
>
> Having some issues using Packer and the vsphere-iso builder to create a
> Windows VM in vSphere.
> VM to be created: Windows 2019 STD
> vSphere version: 6.5 (vCenter and ESXi)
> Packer version: 1.3.5
> vSphere-iso version: 2.3
>
> The problem is, I need to load two ISO files:  One for the Windows install
> and one for the VMWare tools install.
> If I load both from a datatore using "iso_paths" it works great, the first
> CD drive mounts the Windows iso and the second one mounts the VMware Tools
> iso and I get the VM created.
>
> If I load the Windows iso from a url using "iso_urls" and the VMware tools
> from the datastore using "iso_paths" then I get the VMware Tools loaded in
> the first CD drive and the Windows iso on the second CD drive and of course
> this doesn't work since the VM is trying to boot using the first drive.
>
> Is there a way to force the CDs to load in the correct order?  or what
> other way can I install the VMware tools?  If I don't install VMware tools
> the build never finishes because it either never gets an IP address (when
> using vmxnet3 adapter) or gets an IP but somehow doesn't report it back to
> Packer (when using e1000 adapter).
>
> Any help is appreciated, 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/e5d4148a-7c8a-4c36-85d0-fa470c341bbe%40googlegroups.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 packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt8LTnr5EzfXNr86T91k4nNoDzpKMFsNbJbM13vH8Vg9uw%40mail.gmail.com.


[packer] Re: Preseed.cfg file for ubuntu18.04

2019-07-23 Thread Benjamin Lu
yeah, so the problem is the cd, don't use the live cd from ubuntu, but use 
this instead

http://cdimage.ubuntu.com/ubuntu/releases/18.04/release/ubuntu-18.04.2-server-amd64.iso


On Monday, July 22, 2019 at 4:28:52 AM UTC-7, Tekchand Dagar 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 packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/ff728e99-0d89-4523-a49b-37cd38629307%40googlegroups.com.


Re: [packer] stop and disable systemctl service

2019-07-23 Thread Rickard von Essen
Most likely you have some other enabled unit that depends on docker.service
and hence it's started.

Use systemctl list-dependencies --reverse docker.service to see what
depends on it.

Also with systemd by default docker.service is started if anything accesses
/var/run/docker.sock (e.g. runs the docker command)

On Tue, Jul 23, 2019, 13:08 Jeeva Chelladhurai  wrote:

> I am manually testing it.. below is my provisioner and log..
>
> "provisioners": [{
> "type": "shell",
> "pause_before": "30s",
> "inline": [
>   "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo
> apt-key add -",
>   "sudo add-apt-repository \"deb [arch=amd64]
> https://download.docker.com/linux/ubuntu bionic stable\"",
>   "sudo apt-get update",
>   "sudo apt-get install -y docker-ce",
>   "sudo usermod -aG docker ubuntu",
>   "curl -sSL http://sjeeva.github.io/getcompose | sudo sh",
>   "sudo mkdir /data",
>   "sudo systemctl stop docker",
>   "sudo systemctl disable docker",
>   "sudo cp /tmp/docker.service /lib/systemd/system/docker.service"
> ]
>   }]
>
> amazon-ebs: docker-compose version 1.24.1, build 4667896b is installed
> ==> amazon-ebs: Synchronizing state of docker.service with SysV service
> script with /lib/systemd/systemd-sysv-install.
> ==> amazon-ebs: Executing: /lib/systemd/systemd-sysv-install disable docker
> ==> amazon-ebs: Pausing after run of step 'StepProvision'. Press enter to
> continue.
>
>
>
> On Monday, July 22, 2019 at 11:47:22 PM UTC+5:30, Rickard von Essen wrote:
>>
>> Could you provide details of what you have done and how you verified it?
>>
>> On Mon, Jul 22, 2019, 19:56 Jeeva Chelladhurai  wrote:
>>
>>> Hello All,
>>>
>>> I am building an AMI using packer. I want to install docker on my target
>>> image however the docker should be in stopped state. In my provisioner I
>>> have stopped and disabled the docker service, nonetheless, when I launch a
>>> new VM the docker service is enabled and running.
>>>
>>> Please guide me how to disable a service in packer.
>>>
>>> I'm building an ubuntu 18.04 image.
>>>
>>> Thanks,
>>> Jeeva'
>>>
>>> --
>>> 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.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/packer-tool/8a9941fd-76ee-4e04-8061-35ee2b4f8966%40googlegroups.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 packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/e3691a88-091d-4208-b89f-eaedd6358d2d%40googlegroups.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 packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt9BJX3NryeKpGSS%3DYQGNuQSiFwvVwPPAA6qiAkiJO8THQ%40mail.gmail.com.


Re: [packer] stop and disable systemctl service

2019-07-23 Thread Jeeva Chelladhurai
I am manually testing it.. below is my provisioner and log..

"provisioners": [{
"type": "shell",
"pause_before": "30s",
"inline": [
  "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo 
apt-key add -",
  "sudo add-apt-repository \"deb [arch=amd64] 
https://download.docker.com/linux/ubuntu bionic stable\"",
  "sudo apt-get update",
  "sudo apt-get install -y docker-ce",
  "sudo usermod -aG docker ubuntu",
  "curl -sSL http://sjeeva.github.io/getcompose | sudo sh",
  "sudo mkdir /data",
  "sudo systemctl stop docker",
  "sudo systemctl disable docker",
  "sudo cp /tmp/docker.service /lib/systemd/system/docker.service"
]
  }]

amazon-ebs: docker-compose version 1.24.1, build 4667896b is installed
==> amazon-ebs: Synchronizing state of docker.service with SysV service 
script with /lib/systemd/systemd-sysv-install.
==> amazon-ebs: Executing: /lib/systemd/systemd-sysv-install disable docker
==> amazon-ebs: Pausing after run of step 'StepProvision'. Press enter to 
continue.



On Monday, July 22, 2019 at 11:47:22 PM UTC+5:30, Rickard von Essen wrote:
>
> Could you provide details of what you have done and how you verified it? 
>
> On Mon, Jul 22, 2019, 19:56 Jeeva Chelladhurai  > wrote:
>
>> Hello All,
>>
>> I am building an AMI using packer. I want to install docker on my target 
>> image however the docker should be in stopped state. In my provisioner I 
>> have stopped and disabled the docker service, nonetheless, when I launch a 
>> new VM the docker service is enabled and running. 
>>
>> Please guide me how to disable a service in packer.
>>
>> I'm building an ubuntu 18.04 image.
>>
>> Thanks,
>> Jeeva'
>>
>> -- 
>> 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 .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/8a9941fd-76ee-4e04-8061-35ee2b4f8966%40googlegroups.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 packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/e3691a88-091d-4208-b89f-eaedd6358d2d%40googlegroups.com.


Re: [packer] Preseed.cfg file for ubuntu18.04

2019-07-23 Thread Tekchand Dagar
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:
>
>
> https://github.com/chef/bento/blob/master/packer_templates/ubuntu/http/preseed.cfg
>
>
> On Mon, Jul 22, 2019, 13:28 Tekchand Dagar  > 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 .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/42fb87b4-8e23-423a-b114-eee381f96cbc%40googlegroups.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 packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/e85280ae-0ff2-4630-9aee-58f1a4caa8af%40googlegroups.com.


virtualbox.json.odt
Description: application/vnd.oasis.opendocument.text