You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a simple MacOS VM inside parallels and make sure that ssh auth with password works. Sonoma was used as VM version
Create a packer configuration where you are using Ansible
Provide for builder ssh_username and ssh_password parameters for macvm builder.
Since those two were passed no ssh key is generated.
[ssh_keypair_name](https://developer.hashicorp.com/packer/docs/communicators/ssh#ssh_keypair_name) (string) - If specified, this is the key that will be used for SSH with the machine. The key must match a key pair name loaded up into the remote. By default, this is blank, and Packer will generate a temporary keypair unless [ssh_password](https://developer.hashicorp.com/packer/docs/communicators/ssh#ssh_password) is used. [ssh_private_key_file](https://developer.hashicorp.com/packer/docs/communicators/ssh#ssh_private_key_file) or [ssh_agent_auth](https://developer.hashicorp.com/packer/docs/communicators/ssh#ssh_agent_auth) must be specified when [ssh_keypair_name](https://developer.hashicorp.com/packer/docs/communicators/ssh#ssh_keypair_name) is utilized.
Try to run the Ansible provisioner without proxy.
Read the msg:
parallels-macvm.macvm_automated: Not using Proxy adapter for Ansible run:
parallels-macvm.macvm_automated: Using ssh keys from Packer communicator...
Watch as Ansible is trying to get the SSH key, which is not generated because the password is passed.
Since Ansible requires using SSH keys, which are not generated (empty), observe a connection denial due to an invalid key.
Log without user passed to ansible:
Trying private key: /var/folders/s4/mcd4dxfn0vz_ssgbz0xnj4xw0000gn/T/ansible-key2040784890\r\nLoad key \"/var/folders/s4/mcd4dxfn0vz_ssgbz0xnj4xw0000gn/T/ansible-key2040784890\": invalid format\r\ndebug2: we did not send a packet, disable method\r\ndebug1: No more authentication methods to try.\r\[email protected]: Permission denied (publickey,password,keyboard-interactive).",
Log with user passed to ansible:
/var/folders/s4/mcd4dxfn0vz_ssgbz0xnj4xw0000gn/T/ansible-key1087569498\r\nLoad key \"/var/folders/s4/mcd4dxfn0vz_ssgbz0xnj4xw0000gn/T/ansible-key1087569498\": invalid format\r\ndebug2: we did not send a packet, disable method\r\ndebug1: No more authentication methods to try.\r\[email protected]: Permission denied (publickey,password,keyboard-interactive).",
Overview of the Issue
Ansible is unable to work with
parallels-macvm
Reproduction Steps
Log without user passed to ansible:
Log with user passed to ansible:
Plugin and Packer version
Packer: 1.9.4
Parallels: 20.1.3
Plugin: 1.2.2
Simplified Packer Buildfile
Operating system and Environment details
Host OS: MacOS 15.2
Hardware: Mac Pro M3
Log Fragments and crash.log files
Possible workarounds
I will try not to shut down the machine and connect to it with a null provisioner.
The text was updated successfully, but these errors were encountered: