Skip to content

Not possible to create a Parallels machine with a communicator of "none" #23

Description

@MisterWS

Overview of the Issue

I am unable to create a Parallels machine using Packer when communicator is set to "none". The system fails when attempting to upload Parallels version info:

==> parallels-iso.fcos-bare-metal-qa: Uploading Parallels version info (17.1.0)
Build 'parallels-iso.fcos-bare-metal-qa' errored after 2 minutes 30 seconds: Error uploading Parallels version: Upload is not implemented when communicator = 'none'

I have tried to set prlctl_version_file = "" in my build file (which works for other equivalent builders such as virtualbox, but this has no effect. Investigating the code, I believe it's because:

  1. The upload step code contains logic to handle when prlctl_version_file is set to ""...
    https://github.com/hashicorp/packer-plugin-parallels/blob/ab45c8d66c021dbcc363ae2a59f9754ae3509d01/builder/parallels/common/step_upload_version.go#L30-L33
  2. ...but this piece of logic always sets a default value if "" is passed - so the upload will always fail!
    https://github.com/hashicorp/packer-plugin-parallels/blob/ab45c8d66c021dbcc363ae2a59f9754ae3509d01/builder/parallels/common/prlctl_version_config.go#L20-L23

Reproduction Steps

  1. Create a 'parallels-iso' build file with communicator = "none" and prlctl_version_file = "" and attempt to build.

Plugin and Packer version

Packer v1.7.5

Simplified Packer Buildfile

source "parallels-iso" "fedora-coreos" {
  boot_wait               = "25s"
  guest_os_type           = "fedora-core"
  iso_checksum            = "sha256:b3378430176e587bbe11d429ddb5322e17a44a6e7145858d6d109a984f66c5cf"
  iso_url                 = "https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/34.20211016.3.0/x86_64/fedora-coreos-34.20211016.3.0-live.x86_64.iso"
  boot_command            = ["sudo coreos-installer install /dev/sda<enter>", "<wait1m>", "sudo shutdown now<enter>", "<wait20s>"]
  shutdown_command        = "sudo shutdown -h now"
  communicator            = "none"
  parallels_tools_mode    = "disable"
  prlctl_version_file     = ""
  cpus                    = "2"
  memory                  = "2048"
  disk_size               = "40000"
}

build {
    sources = ["parallels-iso.fedora-coreos"]
}

Operating system and Environment details

macOS Big Sur 11.6
Parallels Desktop 17.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions