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 Packer ISO complains with "failed to register the VM" #50

Open
chargio opened this issue Aug 20, 2022 · 4 comments
Open

Parallels Packer ISO complains with "failed to register the VM" #50

chargio opened this issue Aug 20, 2022 · 4 comments
Labels

Comments

@chargio
Copy link

chargio commented Aug 20, 2022

Overview of the Issue

Failed to register the VM: "Fedora_36_tools" when creating a packer file using an existing VM

Reproduction Steps

Create a working configuration file
packer build .

Plugin and Packer version

Packer v1.8.3
prlctl version 18.0.0 (53049)
packer-plugin-parallels_v1.0.3_x5.0_darwin_arm64

Simplified Packer Buildfile

packer {
  required_plugins {
    parallels = {
      version = ">= 1.0.0"
      source  = "github.com/hashicorp/parallels"
    }
  }
}


source "parallels-pvm" "base-fedora" {
  source_path            = "/Users/sergio/Parallels/Fedora_36_tools.pvm"
  parallels_tools_flavor = "lin-arm"
  ssh_private_key_file   = "./keys/vagrant"
  ssh_username           = "vagrant"
  ssh_password           = "vagrant"
  ssh_timeout            = "90s"
  shutdown_command       = "echo 'vagrant' | sudo -S shutdown -P now"
  boot_wait              = "5s"
}

build {
  sources = ["source.parallels-pvm.base-fedora"]
}

Operating system and Environment details

Mac OS Monterey on an M1 Max

Log Fragments and crash.log files

parallels-pvm.base-fedora: output will be in this color.

==> parallels-pvm.base-fedora: Importing VM: /Users/sergio/Parallels/Fedora_36_tools.pvm
==> parallels-pvm.base-fedora: Error importing VM: prlctl error: Failed to register the VM: "Fedora_36_tools" is already registered. You cannot register a virtual machine more than once.
==> parallels-pvm.base-fedora: Deleting output directory...
Build 'parallels-pvm.base-fedora' errored after 436 milliseconds 894 microseconds: Error importing VM: prlctl error: Failed to register the VM: "Fedora_36_tools" is already registered. You cannot register a virtual machine more than once.

==> Wait completed after 436 milliseconds 937 microseconds

==> Some builds didn't complete successfully and had errors:
--> parallels-pvm.base-fedora: Error importing VM: prlctl error: Failed to register the VM: "Fedora_36_tools" is already registered. You cannot register a virtual machine more than once.

==> Builds finished but no artifacts were created.

@chargio chargio added the bug label Aug 20, 2022
@amcmanus
Copy link

amcmanus commented Jan 4, 2023

Also experiencing this exact issue.

@needarun
Copy link

needarun commented Mar 2, 2023

Hello,

Any news about that ?

@bineesh-n
Copy link
Collaborator

@chargio I think you have "Fedora_36_tools" VM already existing. Did you try unregistering that before packer build ?

@ml4
Copy link

ml4 commented Oct 1, 2023

Hello this is non-obvious, as at least in my version of Parallels (18.3.2 (53621)) there is no drop-down menu with a 'unregister VM' option, so it was this post that I found that is old but suggests a way forward, which worked by running

prlctl list -a

get the UUID of the image to use, ensuring it's shutdown and then and doing a

prlctl unregister <uuid>

and retrying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants