Issue with v0.10.0

53 vues
Accéder directement au premier message non lu

Sean Farrow

non lue,
13 sept. 2016, 22:31:2913/09/2016
à packe...@googlegroups.com

                Hi all,

 

When trying to build/validate a template with 0.10.0, I get an unknown configuration key “headless” error.

My communicator/builder is below for reference.

This used to work with earlier versions, so I wonder what I’m doing wrong/what’s changed?

My template is:

    {

      "communicator": "winrm",

      "disk_size": "{{user `disk_size`}}",

      "floppy_files": [

        "floppy/00-run-all-scripts.cmd",

        "floppy/01-install-wget.cmd",

        "floppy/_download.cmd",

        "floppy/_packer_config.cmd",

        "floppy/disablewinupdate.bat",

        "floppy/fixnetwork.ps1",

        "floppy/install-winrm.cmd",

        "floppy/networkprompt.bat",

        "floppy/passwordchange.bat",

        "floppy/powerconfig.bat",

        "floppy/upgrade-wua.bat",

        "floppy/win7x64-enterprise/Autounattend.xml",

        "floppy/zz-start-sshd.cmd"

      ],

"headless": "true",

      "guest_os_type": "windows7-64",

      "iso_checksum": "{{ user `iso_checksum` }}",

      "iso_checksum_type": "sha1",

      "iso_url": "{{ user `iso_url` }}",

      "shutdown_command": "{{ user `shutdown_command`}}",

      "tools_upload_flavor": "windows",

      "type": "vmware-iso",

      "vm_name": "eval-win7x64-enterprise",

      "vmx_data": {

        "cpuid.coresPerSocket": "1",

        "memsize": "2048",

        "numvcpus": "1"

      },

      "winrm_password": "vagrant",

      "winrm_timeout": "10000s",

      "winrm_username": "vagrant"

    },

I have removed the builders array declaration for brevity.

Any help appreciated.

Kind regards

Sean.

 

Alvaro Miranda Aguilera

non lue,
14 sept. 2016, 03:08:4514/09/2016
à packe...@googlegroups.com
can you share a gist of your template as is?

the headless should be inside the builder block, ie inside virtualbox-iso

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/VI1PR0201MB2013E83C6430F36BB8C8987A83F10%40VI1PR0201MB2013.eurprd02.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.



--

Rickard von Essen

non lue,
14 sept. 2016, 03:21:5814/09/2016
à packe...@googlegroups.com
The following json validates for me:

{
  "builders": [
   {
      "communicator": "winrm",
      "disk_size": 1024,
      "floppy_files": [
        "floppy/00-run-all-scripts.cmd",
        "floppy/01-install-wget.cmd",
        "floppy/_download.cmd",
        "floppy/_packer_config.cmd",
        "floppy/disablewinupdate.bat",
        "floppy/fixnetwork.ps1",
        "floppy/install-winrm.cmd",
        "floppy/networkprompt.bat",
        "floppy/passwordchange.bat",
        "floppy/powerconfig.bat",
        "floppy/upgrade-wua.bat",
        "floppy/win7x64-enterprise/Autounattend.xml",
        "floppy/zz-start-sshd.cmd"
      ],
      "headless": "true",
      "guest_os_type": "windows7-64",
      "iso_checksum": "{{ user `iso_checksum` }}",
      "iso_checksum_type": "none",
      "iso_url": "http://examples.com",
      "shutdown_command": "shutdown",
      "tools_upload_flavor": "windows",
      "type": "vmware-iso",
      "vm_name": "eval-win7x64-enterprise",
      "vmx_data": {
        "cpuid.coresPerSocket": "1",
        "memsize": "2048",
        "numvcpus": "1"
      },
      "winrm_password": "vagrant",
      "winrm_timeout": "10000s",
      "winrm_username": "vagrant"
    }
  ]
}


On 14 September 2016 at 09:08, Alvaro Miranda Aguilera <kik...@gmail.com> wrote:
can you share a gist of your template as is?

the headless should be inside the builder block, ie inside virtualbox-iso

Sean Farrow

non lue,
14 sept. 2016, 03:49:5014/09/2016
à packe...@googlegroups.com

Hi,

 

My full template is below.

There are multiple of these, so a pointer to what to change would be appreciated.

Kind regars

Sean.

{

  "builders": [

        "floppy/oracle-cert.cer",

        "floppy/passwordchange.bat",

        "floppy/powerconfig.bat",

        "floppy/upgrade-wua.bat",

        "floppy/win7x64-enterprise/Autounattend.xml",

        "floppy/zz-start-sshd.cmd"

      ],

"headless": "true",

      "guest_os_type": "Windows7_64",

      "hard_drive_interface": "sata",

      "iso_checksum": "{{ user `iso_checksum` }}",

      "iso_checksum_type": "sha1",

      "iso_url": "{{ user `iso_url` }}",

      "shutdown_command": "{{ user `shutdown_command`}}",

      "type": "virtualbox-iso",

      "vboxmanage": [

        [

          "modifyvm",

          "{{.Name}}",

          "--memory",

          "2048"

        ],

        [

          "modifyvm",

          "{{.Name}}",

          "--cpus",

          "1"

        ]

      ],

      "vm_name": "eval-win7x64-enterprise",

      "winrm_password": "vagrant",

      "winrm_timeout": "10000s",

      "winrm_username": "vagrant"

    },

    {

      "communicator": "winrm",

      "disk_size": "{{user `disk_size`}}",

      "floppy_files": [

        "floppy/00-run-all-scripts.cmd",

        "floppy/01-install-wget.cmd",

        "floppy/_download.cmd",

        "floppy/_packer_config.cmd",

        "floppy/disablewinupdate.bat",

        "floppy/fixnetwork.ps1",

        "floppy/install-winrm.cmd",

        "floppy/networkprompt.bat",

        "floppy/passwordchange.bat",

        "floppy/powerconfig.bat",

        "floppy/upgrade-wua.bat",

        "floppy/win7x64-enterprise/Autounattend.xml",

        "floppy/zz-start-sshd.cmd"

      ],

"headless": "true",

      "guest_os_type": "win-7",

      "iso_checksum": "{{ user `iso_checksum` }}",

      "iso_checksum_type": "sha1",

      "iso_url": "{{ user `iso_url` }}",

      "parallels_tools_flavor": "win",

      "prlctl": [

        [

          "set",

          "{{.Name}}",

          "--memsize",

          "2048"

        ],

        [

          "set",

          "{{.Name}}",

          "--cpus",

          "1"

        ]

      ],

      "shutdown_command": "{{ user `shutdown_command`}}",

      "type": "parallels-iso",

      "vm_name": "eval-win7x64-enterprise",

      "winrm_password": "vagrant",

      "winrm_timeout": "10000s",

      "winrm_username": "vagrant"

    }

  ],

  "post-processors": [

    {

      "compression_level": 1,

      "keep_input_artifact": false,

      "output": "box/{{.Provider}}/eval-win7x64-enterprise-{{user `cm`}}{{user `cm_version`}}-{{user `version`}}.box",

      "type": "vagrant",

      "vagrantfile_template": "tpl/vagrantfile-eval-win7x64-enterprise.tpl"

    }

  ],

  "provisioners": [

    {

      "environment_vars": [

        "CM={{user `cm`}}",

        "CM_VERSION={{user `cm_version`}}",

        "UPDATE={{user `update`}}"

      ],

      "scripts": [

        "script/vagrant.bat",

        "script/cmtool.bat",

        "script/vmtool.bat",

        "script/clean.bat",

        "script/ultradefrag.bat",

        "script/uninstall-7zip.bat",

        "script/sdelete.bat"

      ],

      "type": "windows-shell"

    }

  ],

  "variables": {

    "cm": "chef",

    "cm_version": "",

    "disk_size": "40960",

    "iso_checksum": "15ddabafa72071a06d5213b486a02d5b55cb7070",

    "iso_url": "http://care.dlservice.microsoft.com/dl/download/evalx/win7/x64/EN/7600.16385.090713-1255_x64fre_enterprise_en-us_EVAL_Eval_Enterprise-GRMCENXEVAL_EN_DVD.iso",

    "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",

    "update": "true",

    "version": "0.1.0"

--

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAHqq0ezLRZegGJ%2Bb1QB3Ng-56n%3Dju%2BkXGU3-m_dA4A7yZVC_XQ%40mail.gmail.com.

Rickard von Essen

non lue,
14 sept. 2016, 04:07:1214/09/2016
à packe...@googlegroups.com
I have corrected your json (alot). As always in development you need to start smal with something minimal that works and incrementaly add. And always check that the json is at least syntactically correct.

{
  "builders": [
    {
    {
      "floppy_files": [
        "floppy/00-run-all-scripts.cmd",
        "floppy/01-install-wget.cmd",
        "floppy/_download.cmd",
        "floppy/_packer_config.cmd",
        "floppy/disablewinupdate.bat",
        "floppy/fixnetwork.ps1",
        "floppy/install-winrm.cmd",
        "floppy/networkprompt.bat",
        "floppy/passwordchange.bat",
        "floppy/powerconfig.bat",
        "floppy/upgrade-wua.bat",
        "floppy/win7x64-enterprise/Autounattend.xml",
        "floppy/zz-start-sshd.cmd"
      ],

--

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.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+unsubscribe@googlegroups.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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/VI1PR0201MB2013F1389601E813DFCB207183F10%40VI1PR0201MB2013.eurprd02.prod.outlook.com.

Sean Farrow

non lue,
14 sept. 2016, 04:15:3014/09/2016
à packe...@googlegroups.com

Hi,

 

Thanks, I have taken this from a Github repo:

https://github.com/boxcutter/windows

so was working with what I was given.

What sort of things did you have to change?

Kind regards

Sean.

 

From: packe...@googlegroups.com [mailto:packe...@googlegroups.com] On Behalf Of Rickard von Essen
Sent: 14 September 2016 09:07
To: packe...@googlegroups.com
Subject: Re: [packer] Issue with v0.10.0

 

I have corrected your json (alot). As always in development you need to start smal with something minimal that works and incrementaly add. And always check that the json is at least syntactically correct.

To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.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...@googlegroups.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...@googlegroups.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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CALz9Rt-2%3DE7KZjgbhJw4AQ%3DRG6aga3e%2BqgVS4M93sVeJ1%3D9H6A%40mail.gmail.com.

Rickard von Essen

non lue,
14 sept. 2016, 05:58:3714/09/2016
à Packer
You can diff them your self. But to start with your template starts with an array of files just under builders.

The boxcutter templates are correct, maybe you have to run packer fix to update them to the latest format.

Sean Farrow

non lue,
16 sept. 2016, 18:45:2216/09/2016
à packe...@googlegroups.com
Hi,

Thanks, I managed to fix this by doing a packer fix. I didn't realise that it wrote the fixed template to stdout. Is there an option to overwrite the template you are fixing?
Cheers
Sean.


-----Original Message-----
From: packe...@googlegroups.com [mailto:packe...@googlegroups.com] On Behalf Of Rickard von Essen
--
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/38c77145-0f95-4548-b8b2-0b5c6f53e4d3%40googlegroups.com.

Rickard von Essen

non lue,
16 sept. 2016, 18:51:0716/09/2016
à Packer,sean....@tendosolutions.com
Is there an option to overwrite the template you are fixing?

No
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message