Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to retrieve the preconfigureation file #193

Closed
johncosta opened this issue Jul 17, 2013 · 5 comments
Closed

Failed to retrieve the preconfigureation file #193

johncosta opened this issue Jul 17, 2013 · 5 comments

Comments

@johncosta
Copy link

Hello, I'm running into an error when generating vbox and vmfusion images from a veewee definition file converted by veewee-to-packer. I'm getting "Failed to retrieve the preconfigureation file" errors from both applications during the installation process when running packer with the converted template.json file. Using veewee, the VM is created successfully for this definition.

Has anyone else encountered this? Is there a way to work around it?

Steps to reproduce what I'm seeing:

  1. Generate the template.json and other artifacts

veewee-to-packer /full/path/to/veewee/templates/ubuntu-12.04.2-server-amd64-netboot/definition.rb

This generates a template.json file successfully (see below #template.json).

  1. Modify the provisioners section of the template.json file to have the full path of for the scripts listed. This is related to Make paths in templates relative to the template #54

  2. Modify each builder definition to include an "iso_md5" key/value pair.

"iso_md5": "1278936cb0ee9d9a32961dd7743fa75c",

  1. Now use packer to build the images from the new template.json file:

./packer build /full/path/to/veewee/output/template.json

# template.json

{
  "provisioners": [
    {
      "type": "shell",
      "scripts": [
        "scripts/postinstall.sh"
      ],
      "override": {
        "virtualbox": {
          "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'"
        },
        "vmware": {
          "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'"
        }
      }
    }
  ],
  "builders": [
    {
      "type": "virtualbox",
      "boot_command": [
        "<esc><wait>",
        "linux noapic preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>",
        "debian-installer=en_US auto locale=en_US kbd-chooser/method=us <wait>",
        "hostname={{ .Name }} <wait>",
        "fb=false debconf/frontend=noninteractive <wait>",
        "keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false<wait>",
        "console-setup/ask_detect=false console-setup/modelcode=pc105 console-setup/layoutcode=us <wait>",
        "initrd=initrd.gz -- <enter><wait>"
      ],
      "boot_wait": "10s",
      "disk_size": 10140,
      "guest_os_type": "Ubuntu_64",
      "http_directory": "http",
      "iso_checksum": "1278936cb0ee9d9a32961dd7743fa75c",
      "iso_md5": "1278936cb0ee9d9a32961dd7743fa75c",
      "iso_checksum_type": "md5",
      "iso_url": "http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/mini.iso",
      "ssh_username": "vagrant",
      "ssh_password": "vagrant",
      "ssh_port": 22,
      "ssh_wait_timeout": "10000s",
      "shutdown_command": "echo 'shutdown -P now' > shutdown.sh; echo 'vagrant'|sudo -S sh 'shutdown.sh'",
      "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
      "virtualbox_version_file": ".vbox_version",
      "vboxmanage": [
        [
          "modifyvm",
          "{{.Name}}",
          "--memory",
          "1024"
        ],
        [
          "modifyvm",
          "{{.Name}}",
          "--cpus",
          "1"
        ]
      ]
    },
    {
      "type": "vmware",
      "boot_command": [
        "<esc><wait>",
        "linux noapic preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>",
        "debian-installer=en_US auto locale=en_US kbd-chooser/method=us <wait>",
        "hostname={{ .Name }} <wait>",
        "fb=false debconf/frontend=noninteractive <wait>",
        "keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false<wait>",
        "console-setup/ask_detect=false console-setup/modelcode=pc105 console-setup/layoutcode=us <wait>",
        "initrd=initrd.gz -- <enter><wait>"
      ],
      "boot_wait": "10s",
      "disk_size": 10140,
      "guest_os_type": "ubuntu-64",
      "http_directory": "http",
      "iso_checksum": "1278936cb0ee9d9a32961dd7743fa75c",
      "iso_md5": "1278936cb0ee9d9a32961dd7743fa75c",
      "iso_checksum_type": "md5",
      "iso_url": "http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/mini.iso",
      "ssh_username": "vagrant",
      "ssh_password": "vagrant",
      "ssh_port": 22,
      "ssh_wait_timeout": "10000s",
      "shutdown_command": "echo 'shutdown -P now' > shutdown.sh; echo 'vagrant'|sudo -S sh 'shutdown.sh'",
      "vmx_data": {
        "memsize": "1024",
        "numvcpus": "1",
        "cpuid.coresPerSocket": "1"
      }
    }
  ]
}

screen shot 2013-07-17 at 4 33 53 pm

screen shot 2013-07-17 at 4 33 31 pm

@mitchellh
Copy link
Contributor

The http_directory is incorrect since it is relative to where the command is run from, as well.

There is another issue to make this nicer, #54

@mitchellh
Copy link
Contributor

Oh also, you don't need iso_md5. That is pre-0.2.0.

@johncosta
Copy link
Author

Ok, thank you for the feedback. I'll upgrade, make the additional adjustments and try again.

Thanks!

@Iegend
Copy link

Iegend commented Oct 4, 2014

Hello
how to fix the problem?

@epcim
Copy link

epcim commented Nov 28, 2014

@Legend in my case - very similar issue - turn off the firewall

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants