Closed feliperubin closed 4 years ago
try before "vagrant up":
export VAGRANT_NO_PARALLEL=true
Sure,this works. The problem is not provisioning Parallels VMs one by one, but provisioning Parallels VMs in parallel.
I also have an issue with multi machine provisioning.
Here is a snippet of my output.
❯ vagrant up
Bringing machine 'k8smaster' up with 'parallels' provider...
Bringing machine 'k8sworker1' up with 'parallels' provider...
==> k8sworker1: Registering VM image from the base box 'generic/ubuntu2004'...
==> k8sworker1: Creating new virtual machine as a linked clone of the box image...
==> k8sworker1: Unregistering the box VM image...
==> k8smaster: Creating new virtual machine as a linked clone of the box image...
==> k8smaster: An error occurred. The error will be shown after all tasks complete.
...
There was an error while command execution. The command and stderr is shown below.
Command: ["/usr/local/bin/prlctl", "clone", "4fd119bd-c03f-45ee-b879-f02e3209033f", "--name", "vagrant_temp_1604898355203_96625", "--linked", "--id", "{9e6a57ce-3ee9-420a-8abb-8da15b40c486}", "--regenerate-src-uuid"]
Stderr:
Failed to clone the VM: The virtual machine could not be found. The virtual machine is not registered in the virtual machine directory on your Mac.
It looks like the box image is being unlinked before the other VM gets to use it.
If I use export VAGRANT_NO_PARALLEL=true
then it provisions fine.
The fix for this issue has been released in vagrant-parallels v2.1.0
@feliperubin @dnx-seek Could you please verify it on your setup?
@legal90 I've just taken it for a spin. Works! Thanks.
Seems to be working now, thanks.
Vagrant Version: 2.2.9 Parallels Desktop Version 15.1.4 (47270) prlctl version 15.1.4 (47270) Host: MacBook Pro 16" 2019 i9 (octa-core), 32GB RAM Host OS: MacOS Catalina 10.15.4 Guest OS : Ubuntu 18.04 LTS
Example Vagrantfile below.
The following error occurs while provisioning a Multi-VM environment.
I might be wrong, but it seems to be a concurrency problem; when creating a linked clone vm, it seems more than one process/thread tries to clone the original file at the same time.
vagrant_debug_flag.log