There were 5 different formats for the Packer useragent string. This
fixes that and unifies it into a helper package.
I did not touch oracle's user-agent, because it looked kinda special.
The existing documentation example looks intimidating as it includes:
* variable interpolation
* configuration of the chef provisioner
* and it misses the `config_template` file
In the issue comments, [simpler and complete example](https://github.com/hashicorp/packer/issues/3355#issuecomment-198134727) exists already and works out of the box.
This change adds the simpler and complete example, while leaving the more complicated example intact.
- remove existing GTM tag from head to prevent double tracking
- adjust selector to not include non-download links
- send a cleaner breakdown of download parameters for easier analysis
Script wasn't able to handle path that Packer used to create VM in the first place:
"==> hyperv-iso: Copying to output dir...
==> hyperv-iso: Error exporting vm: PowerShell error: Move-Item : An object at the specified path C:\Users\HANNU~1.PIK does not exist.
==> hyperv-iso: At C:\Users\hannu.piki\AppData\Local\Temp\ps520830935.ps1:13 char:1
==> hyperv-iso: + Move-Item -Path "$srcPath/$vhdDirName" -Destination $dstPath -Verbose
==> hyperv-iso: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> hyperv-iso: + CategoryInfo : InvalidArgument: (:) [Move-Item], PSArgumentException
==> hyperv-iso: + FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.MoveItemCommand"
Used path was: C:\Users\HANNU~1.PIK\AppData\Local\Temp\packerhv616791918\export253729206\2016min
Real path was: C:\Users\hannu.piki\AppData\Local\Temp\packerhv616791918\export253729206\2016min
When using the raw image format and attempting to resize it we get the following error message:
```
WARNING: Image format was not specified for 'test.raw' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.
```
Specifying the format will remove this warning.