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

Parallels/VMWare provisions scripts configured to run on VirtualBox #30

Open
darkn3rd opened this issue Nov 15, 2017 · 0 comments
Open

Comments

@darkn3rd
Copy link

darkn3rd commented Nov 15, 2017

All provisioning scripts run on all builders, so that both parallels.sh and vmware.sh run on virtualbox-iso builder.

STEPS

Do a build with with -only option, e.g. packer build -only=vmware-iso.

EXPECTED RESULTS

Onlyvirtualbox.sh provisioning script would run.
The vmware.sh and parallels.sh scripts would NOT run.

ACTUAL RESULTS

All three vm platform specific provisioning scripts (parallels, vmware, virtualbox) would run on virtualbox.

POTENTIAL SOLUTIONS

Use {{.Provider}} in the name (haven't tried this):

{
    "type": "shell",
    "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E -S bash '{{ .Path }}'",
    "scripts": [
      "script/{{.Provider}}.sh",
      "script/xcode-cli-tools.sh",
      "script/add-network-interface-detection.sh",
      "script/energy.sh",
      "script/autologin.sh",
      "script/update.sh",
      "script/update.sh",
      "script/update.sh",
      "script/update.sh"
      ],
}

Utilize the only key within a provisioners area:

{
    "only": ["virtualbox-iso"],
    "type": "shell",
    "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E -S bash '{{ .Path }}'",
    "script": "scripts/virtualbox.sh"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant