Skip to content

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

@darkn3rd

Description

@darkn3rd

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"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions