[packer] Re: Creating vagrant virtualbox rhel8 box with packer fails to find iso

2019-08-06 Thread Dan Linder
Mind sharing them with the rest of the class? :)

Dan

On Tuesday, August 6, 2019 at 5:53:05 PM UTC-5, Stephen Pliska-Matyshak 
wrote:
>
> figured it out has a couple lines in the ks.cfg that were messing up the 
> installation
>
> On Friday, May 24, 2019 at 10:16:50 AM UTC-5, Stephen Pliska-Matyshak 
> wrote:
>>
>> Has anyone tried to create a rhel8 vagrant box for virtualbox with packer 
>> yet?
>>
>> I've been trying since the beta came out and switched to the released iso 
>> when it came out, but the installer can't find the iso the way the DVD gets 
>> mounted in virtualbox vm by packer. I'm doing everything the same as have 
>> been doing for centos7 and rhel7, which works marvelously. The devices and 
>> mounts look the same between the two versions, but rhel8 installer just 
>> can't find the iso. If I manually mount the iso as ide dvd and the vdi as 
>> sata hd, installer finds the iso just fine.  Packer mounts both as ide (hd 
>> & dvd).
>>
>> I have to wonder if something changed in rhel8 that I've missed in the 
>> documentation. I'm using the packer 1.4.0 and virtualbox 6.0.8
>>
>

-- 
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/3bbd67f8-7e23-4ca6-833f-68c24eddc771%40googlegroups.com.


[packer] Re: Creating vagrant virtualbox rhel8 box with packer fails to find iso

2019-08-06 Thread Stephen Pliska-Matyshak
figured it out has a couple lines in the ks.cfg that were messing up the 
installation

On Friday, May 24, 2019 at 10:16:50 AM UTC-5, Stephen Pliska-Matyshak wrote:
>
> Has anyone tried to create a rhel8 vagrant box for virtualbox with packer 
> yet?
>
> I've been trying since the beta came out and switched to the released iso 
> when it came out, but the installer can't find the iso the way the DVD gets 
> mounted in virtualbox vm by packer. I'm doing everything the same as have 
> been doing for centos7 and rhel7, which works marvelously. The devices and 
> mounts look the same between the two versions, but rhel8 installer just 
> can't find the iso. If I manually mount the iso as ide dvd and the vdi as 
> sata hd, installer finds the iso just fine.  Packer mounts both as ide (hd 
> & dvd).
>
> I have to wonder if something changed in rhel8 that I've missed in the 
> documentation. I'm using the packer 1.4.0 and virtualbox 6.0.8
>

-- 
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/59cf36cf-62bb-4e2d-95a9-7a41b91464aa%40googlegroups.com.


[packer] packer - using different communicator credentials in a provisioner

2019-08-06 Thread Frank.Lapierre
Hi All,

I'm trying to fully automate a Windows 10 build using Packer. I'm mostly 
successful, with the exception of patching the OS before I generate the 
AMI/VM template.

I don't know if that's feasible or how to approach this, but here's what 
I'm trying:

1. Use specific WINRM credentials before my VM is joined to the domain.
2. After it is joined to the domain, use new credentials to keep 
interacting with the VM.

Since I can't specify a different communicator within the "provisioners" 
block, I'm not sure how I could do this? Reason I need to join the domain 
is because windows won't patch if it is not activated.

Invalid example (as I specified communicator info in the provisioner):

builder:
...
  "communicator": "winrm",
  "winrm_use_ssl": true,
  "winrm_insecure": true,
  "winrm_use_ntlm": true,
  "winrm_username": "Administrator",
  "winrm_password": "Password1",
...

  "provisioners": [
{
  "type": "powershell",
  "environment_vars": [
"vm_hostname={{user `vm_hostname`}}"
  ],
  "inline": ["Rename-Computer -NewName \"$env:vm_hostname\""]
},
{ "type": "windows-restart",
  "pause_before": "30s"
},
{
  "type": "powershell",
  "script": "{{template_dir}}/join-domain.ps1",
  "environment_vars": [
"vm_hostname={{user `vm_hostname`}}",
"ad_domain={{user `ad_domain`}}",
"ad_ou_path={{user `ad_ou_path`}}",
"ad_domain_user=DOMAIN\\user",
"ad_domain_pw=DOMAIN\\password"
  ]
}
  ],
"provisioners": [
{
  "communicator": "winrm",
  "winrm_use_ssl": true,
  "winrm_insecure": true,
  "winrm_use_ntlm": true,
  "winrm_username": "{{ user `ad_username` }}",
  "winrm_password": "{{ user `ad_password` }}",
  "type": "windows-restart",
  "pause_before": "30s"
}
  ]
}

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/3b57c320-9db0-452e-b46f-88e04305ca1d%40googlegroups.com.


[packer] Issues setting ena_support for amazon-ebs builder with a user variable

2019-08-06 Thread Dave Billing

Hi,

Could use some help here...I'm trying to control the amazon-ebs builder 
ena_support configuration option with a user variable

The best I can figure out, is there are three possible actions for this 
config options settings:

when:
1)  "ena_support":true  is coded,  an aws api call to 
ModifyInstanceAttribute will turn ENA on.
2)  "ena_support":false  is coded, an aws api call to 
ModifyInstanceAttribute will turn ENA off.
3)  if "ena_support" is not coded at all, ModifyInstanceAttribute will not 
be called at all, so whatever the original ENA support of the source AMI 
will be preserved.

This behavior, in itself, seems weird to me.  should a boolean variable 
really offer three possible outcomes? 

But, besides the confusion above, here's my problem.

I want to control ena_support with a user variable, so I've got the 
following builder:

"variables": {
"aws_ena_support": "",
  },
  "builders": [
{
  "type": "amazon-ebs",
"ena_support": "{{user `aws_ena_support`}}",
...
 }
   ]
...

With this setup, I can control actions 1 and 2 no problem, by setting 
aws_ena_support to true/false in a vars file.   But whatever I do, I can't 
seem to find a way to set the  aws_ena_support variable in a way that will  
get action 3.I tried "",  but that ends up translating to action 2.

Anyone have any ideas?  Is this worthy of an raising a github issue?  Seems 
the only way to get action 3 is to not code the the ena_support 
configuration option in the builder at all.  If there's a way to control 
this with a variable, please let me know...

-Dave


-- 
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/75d7dba3-8fa6-44f2-bb89-ae5a707c4359%40googlegroups.com.


Re: [packer] Re: Creating vagrant virtualbox rhel8 box with packer fails to find iso

2019-08-06 Thread Rickard von Essen
Could you explain why you think this shouldn't be happening?

On Tue, Aug 6, 2019, 16:39 Stephen Pliska-Matyshak <
spliskamatys...@almebezbik.com> wrote:

> [image: 09_37_20.jpg]
> That's a total klooge and hassle. What is different between the rhel7 iso
> and the rhel8 iso that packer would need to mount the iso differently to
> use it.  This shouldn't be happening.
>
>
> On Friday, May 24, 2019 at 10:16:50 AM UTC-5, Stephen Pliska-Matyshak
> wrote:
>>
>> Has anyone tried to create a rhel8 vagrant box for virtualbox with packer
>> yet?
>>
>> I've been trying since the beta came out and switched to the released iso
>> when it came out, but the installer can't find the iso the way the DVD gets
>> mounted in virtualbox vm by packer. I'm doing everything the same as have
>> been doing for centos7 and rhel7, which works marvelously. The devices and
>> mounts look the same between the two versions, but rhel8 installer just
>> can't find the iso. If I manually mount the iso as ide dvd and the vdi as
>> sata hd, installer finds the iso just fine.  Packer mounts both as ide (hd
>> & dvd).
>>
>> I have to wonder if something changed in rhel8 that I've missed in the
>> documentation. I'm using the packer 1.4.0 and virtualbox 6.0.8
>>
> --
> 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/1a6033b7-a0f7-4515-9d95-277ff8767faf%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/CALz9Rt_QyoX0x-V9JT6Edf3CCBVoWhtNd-VDFzcg3oFz9gYhFg%40mail.gmail.com.


[packer] Re: Creating vagrant virtualbox rhel8 box with packer fails to find iso

2019-08-06 Thread Stephen Pliska-Matyshak


[image: 09_37_20.jpg] 
That's a total klooge and hassle. What is different between the rhel7 iso 
and the rhel8 iso that packer would need to mount the iso differently to 
use it.  This shouldn't be happening.


On Friday, May 24, 2019 at 10:16:50 AM UTC-5, Stephen Pliska-Matyshak wrote:
>
> Has anyone tried to create a rhel8 vagrant box for virtualbox with packer 
> yet?
>
> I've been trying since the beta came out and switched to the released iso 
> when it came out, but the installer can't find the iso the way the DVD gets 
> mounted in virtualbox vm by packer. I'm doing everything the same as have 
> been doing for centos7 and rhel7, which works marvelously. The devices and 
> mounts look the same between the two versions, but rhel8 installer just 
> can't find the iso. If I manually mount the iso as ide dvd and the vdi as 
> sata hd, installer finds the iso just fine.  Packer mounts both as ide (hd 
> & dvd).
>
> I have to wonder if something changed in rhel8 that I've missed in the 
> documentation. I'm using the packer 1.4.0 and virtualbox 6.0.8
>

-- 
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/1a6033b7-a0f7-4515-9d95-277ff8767faf%40googlegroups.com.


Re: [packer] 16031 Terminated sudo shutdown -r now

2019-08-06 Thread Rickard von Essen
Most of the time it's not necessary to run a reboot during provisioning,
instead just install the updates and disable ipv6 (whatever there can be
any reasons to do that). When you start the image created from this build
it should start with the new kernel and ipv6 disabled.

On Mon, Aug 5, 2019 at 11:05 PM sasha.meltser 
wrote:

> I am disabling IPv6 and running dracut to update kernel and need to reboot
> so VM don't boot with IPv6 enabled after kernel updated
>
> On Monday, August 5, 2019 at 3:02:23 PM UTC-6, Rickard von Essen wrote:
>>
>> Is there any good reason why you need to reboot a GCE instance during
>> provisioning?
>>
>> On Mon, Aug 5, 2019, 22:31 sasha.meltser  wrote:
>>
>>> Thank you  for replying
>>>
>>> this is what i see in logs
>>>
>>> [1;32m==> googlecompute: Provisioning with shell script:
>>> /var/folders/2q/dmvlb7w13fnfh_xlwwrt2ytmgn/T/packer-shell683874453
>>>
>>> [1;31m==> googlecompute: /tmp/script_9664.sh: line 2: 16050 Terminated
>>> sudo reboot
>>>
>>> [1;32m==> googlecompute: Deleting instance...
>>>
>>> [0;32mgooglecompute: Instance has been deleted!
>>>
>>> [1;32m==> googlecompute: Deleting disk...
>>>
>>> [0;32mgooglecompute: Disk has been deleted!
>>>
>>> [1;31mBuild 'googlecompute' errored: Script exited with non-zero exit
>>> status: 143.Allowed exit codes are: [0]
>>>
>>>
>>> and this is snippet from json
>>>
>>> "provisioners": [
>>> {
>>> "type": "shell",
>>> "scripts": [
>>> "./postscripts/common/disable-ipv6.sh"
>>>]
>>>   },
>>> {
>>> "type": "shell",
>>> "inline": ["sudo reboot"],
>>> "expect_disconnect": true
>>> },
>>> {
>>> "type": "shell",
>>> "scripts": [
>>> "./postscripts/common/common.sh",
>>>   "./postscripts/gui/gnome.sh"
>>>]
>>>   }
>>>
>>> its failing after reboot.
>>>
>>> On Monday, August 5, 2019 at 2:20:43 PM UTC-6, Rickard von Essen wrote:

 How does it fail? Please provide some more context.

 On Mon, Aug 5, 2019, 20:06 sasha.meltser 
 wrote:

> I am trying to provision CIS CentOS 7 image and its failing when I do
> basic reboot. Any advice please
>
> {
> "type": "shell",
> "inline": ["sudo shutdown -r now"],
> "expect_disconnect": true
> },
>
> --
> 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/b6312147-84f7-45de-8ffb-5a28f5836c4b%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/cd54a1ae-16d6-48ca-9d94-7a02e3c6b1a4%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/62c63036-0c9d-4841-b390-fff7442212af%40googlegroups.com
> 
> .
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior