Re: [packer] Filter secret logging

2019-08-02 Thread Udbhav
Can anyone please tell me how to prevent logging of secrets in custom
plugins? I looked at packer codebase and tried
`packer.LogSecretFilter.Set(Secret_String)` but it's not working.

Packer version - 1.4.2

Thanks
Udbhav

On Fri 2 Aug, 2019, 11:34 AM Udbhav,  wrote:

> Hi,
>
> In my plugin I have added following code to avoid logging secrets
> `packer.LogSecretFilter.Set(secretResp)`
> just before executing the remote command. Secret is part of the remote
> command argument.
>
> Unfortunately, it is still getting logged.
>
> Output -
> 2019/08/02 11:27:22 packer.exe: 2019/08/02 11:27:22 [INFO] command
> 'powershell.exe -executionpolicy bypass -file
> C:\Users\Public\Documents\test.ps1 -CertU Base64Secret
>
> Expected
> 2019/08/02 11:27:22 packer.exe: 2019/08/02 11:27:22 [INFO] command
> 'powershell.exe -executionpolicy bypass -file
> C:\Users\Public\Documents\test.ps1 -CertU 
>
> Thanks
> Udbhav
>
> --
> 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/b47d23db-841e-47ef-8cbf-2ae6b94acee0%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/CACjz45dzvoDofgH3x%3DaVkhp%2BM5opFMucL9-vpGy7RS3aODzfaw%40mail.gmail.com.


[packer] Filter secret logging

2019-08-02 Thread Udbhav
Hi,

In my plugin I have added following code to avoid logging secrets 
`packer.LogSecretFilter.Set(secretResp)` 
just before executing the remote command. Secret is part of the remote 
command argument.

Unfortunately, it is still getting logged. 

Output - 
2019/08/02 11:27:22 packer.exe: 2019/08/02 11:27:22 [INFO] command 
'powershell.exe -executionpolicy bypass -file 
C:\Users\Public\Documents\test.ps1 -CertU Base64Secret

Expected
2019/08/02 11:27:22 packer.exe: 2019/08/02 11:27:22 [INFO] command 
'powershell.exe -executionpolicy bypass -file 
C:\Users\Public\Documents\test.ps1 -CertU 

Thanks
Udbhav

-- 
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/b47d23db-841e-47ef-8cbf-2ae6b94acee0%40googlegroups.com.


Re: [packer] [Ubuntu 18.04.2] Receiving "error: no such device: root" in VirtualBox/ESXi with converted from qcow2 to vmdk on cloud .img, with Packer qemu builder

2019-08-02 Thread Rickard von Essen
Could you provide some more details. I guess this is because the disk is
connected in a different way making it appear as a different device.

Some things to check:
Where is this error comming from, VirtualBox or the Linux kernel trying to
mount the boot dev?

Can you show grub.conf, etc
Kernel arguments

Vmdk configuration, how is the disk configured?

What device is this when running on Qemu and on VirtualBox?

On Fri, Aug 2, 2019, 04:53 Dayman Cash  wrote:

> Is anyone familiar with initial booting issues in Virtual Box/ESXi hosts
> with Ubuntu 18.04 initiated from Packer? We are migrating from 14.04/16.04
> cloud images which have always worked fine end to end. Using qemu version
> 4.0.0, Packer 1.4.2, on Ubuntu 16.04. The image work sequence is: .img read
> into packer, booted and exported to qcow2, then converted to vmdk with
> "qemu-img convert" (qemu-img convert -f qcow2 -O vmdk -o 
> subformat=streamOptimized
> packer_img.qcow2 packer_img.vmdk).
>
> Here's a snippet of the json packer file:
>
>   "builders": [{
>
> "type": "qemu",
>
> "iso_url": "ubuntu-18.04.2-server-cloudimg-amd64.img",
>
> "iso_checksum": "
> aa5bbaf6a3ec34001dc43b10de62d304bb6e956b262e85f554b2fed0e1250714",
>
> "iso_checksum_type": "sha256",
>
> "disk_image": true,
>
> "output_directory": "{{user `output_directory`}}",
>
> "disk_size": 1,
>
> "format": "qcow2",
>
> "disk_compression": false,
>
> "headless": true,
>
> "accelerator": "kvm",
>
> "ssh_username": "{{user `username`}}",
>
> "ssh_password": "{{user `username`}}",
>
> "ssh_port": 22,
>
> "ssh_wait_timeout": "{{user `ssh_timeout`}}",
>
> "vm_name": "{{user `image_name`}}",
>
> "use_default_display": true,
>
> "shutdown_command": "sudo shutdown -h now",
>
> "qemuargs": [
>
>   ["-m", "4096M"],
>
>   ["-smp", "4"],
>
>   ["-cdrom", "cloud.img"],
>
>   ["-smbios", "type=1,serial=ds=nocloud"],
>
>   ["-serial", "mon:stdio"]
>
> ]
>
>   }],
>
>   "provisioners": [{
>
> "type": "shell",
>
> "inline": [
>
>   "while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo
> 'Waiting for cloud-init...'; sleep 1; done",
>
>   "ssh-keyscan github.com >> /home/{{user
> `username`}}/.ssh/known_hosts"
>
> ]
>
>   },
>
> --
> 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/d5b0264f-51b3-4c87-8d70-e0f2334c1d1f%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_%2Bq4Qu%2BvKN05FensiQA0YkkTeJUFZUp41-MuT9BUjn9A%40mail.gmail.com.