Parallels / vagrant-parallels

Vagrant Parallels Provider

Home Page:https://parallels.github.io/vagrant-parallels

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

User vagrant cannot SSH into guest on vagrant up to configure & provision

jyscao opened this issue · comments

Hi, I'm new to using Parallels (just purchased earlier today), but I'm fairly proficient at using Vagrant with VirtualBox on my Linux PC. I intend to use Parallels as the provider for my Vagrant development environment on my M1 Macbook Air.

After creating a barebones Vagrantfile (only basic machine configurations and networking, no provisioning), I tried to bring it up. But ran into the following problem with SSH:

jyscao@Jethros-MacBook-Air titan-pool-vagrant % vagrant up                                                                                                              [284/1891]
Bringing machine 'titan-pool' up with 'parallels' provider...
==> titan-pool: Registering VM image from the base box 'jeffnoxon/ubuntu-20.04-arm64'...
==> titan-pool: Creating new virtual machine as a linked clone of the box image...
==> titan-pool: Unregistering the box VM image...
==> titan-pool: Setting the default configuration for VM...
==> titan-pool: Checking if box 'jeffnoxon/ubuntu-20.04-arm64' version '1.0.0' is up to date...
==> titan-pool: Setting the name of the VM: titan-pool
==> titan-pool: Preparing network interfaces based on configuration...
    titan-pool: Adapter 0: shared
    titan-pool: Adapter 1: hostonly
==> titan-pool: Clearing any previously set network interfaces...
==> titan-pool: Running 'pre-boot' VM customizations...
==> titan-pool: Booting VM...
==> titan-pool: Waiting for machine to boot. This may take a few minutes...
    titan-pool: SSH address: :22
    titan-pool: SSH username: vagrant
    titan-pool: SSH auth method: private key
    titan-pool: Warning: Connection refused. Retrying...
    titan-pool: Warning: Connection refused. Retrying...
    titan-pool: Warning: Connection refused. Retrying...
    (... same warning repeated ...)
    titan-pool: Warning: Connection refused. Retrying...
    titan-pool: Warning: Connection refused. Retrying...
    titan-pool: Warning: Connection refused. Retrying...
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

This looks similar to the closed issue #342, but I don't believe my guest is conflicting with any other hosts on my bridged network 10.211.55.0/24. Though I followed @legal90's suggestion in that thread, and limited the assignable range in Parallels' preferences, such that my vagrant ssh-config is now the following:

Host titan-pool
  HostName 10.211.55.101
  User vagrant
  Port 22
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no
  PasswordAuthentication no
  IdentityFile /Users/jyscao/.vagrant.d/insecure_private_key
  IdentitiesOnly yes
  LogLevel FATAL

Furthermore, I am able to vagrant ssh into the guest after the initial vagrant up times out, which means I do have a minimally usable vagrant box. However none of the configurations (hostname, additional network interface, hosts, etc.) in my Vagrantfile were applied; and of course I won't be able to use any provisioning scripts without the vagrant user being able to access SSH.

I'm not sure if this is a user error on my part. Or perhaps it's a limitation due to the relative newness of the M1 processor, and its lack of support for prlctl as mentioned in #404.

Would appreciate if anyone here can point me in the right direction.

Actually the packager of the box I'm using was aware of this issue (it's a bug in the most recent version of Parallels), and also provided a workaround to it. See this issue thread.

In short, add prl.customize ["set", :id, "--device-del", "cdrom0" ] to the Parallels config block in your Vagrantfile

commented

same error ,how to solve?