micahyoung / bosh-vmrun-cpi-release

BOSH CPI for VMware Fusion/Workstation
Apache License 2.0
4 stars 2 forks source link

Fix race condition when two VMs try to create vm at the same time #8

Closed micahyoung closed 5 years ago

micahyoung commented 5 years ago

Task 5 | 22:24:29 | Preparing deployment: Preparing deployment (00:00:00) Task 5 | 22:24:29 | Preparing package compilation: Finding packages to compile (00:00:00) Task 5 | 22:24:29 | Compiling packages: 7zip/c1dc6c69e6d29a7e39752711fa1eeb74c17aac65 Task 5 | 22:24:29 | Compiling packages: golang-windows/cd8520750605724aa618cfa7228f0794a6993fbc Task 5 | 22:24:31 | Compiling packages: 7zip/c1dc6c69e6d29a7e39752711fa1eeb74c17aac65 (00:00:02) L Error: CPI error 'Bosh::Clouds::CloudError' with message 'Running '/Applications/VMware Fusion.app//Contents/Library/vmrun clone /Users/micah/workspace/vmfiles/vm-store-path/cs-4006ae40-590b-49ba-6cec-0600ad7fb1d4/cs-4006ae40-590b-49ba-6cec-0600ad7fb1d4.vmx /Users/micah/workspace/vmfiles/vm-store-path/vm-c0284a54-7cca-4c4a-5020-a5bd2cc72fae/vm-c0284a54-7cca-4c4a-5020-a5bd2cc72fae.vmx linked -cloneName=vm-c0284a54-7cca-4c4a-5020-a5bd2cc72fae: Error: Cannot open VM: /Users/micah/Box/workspace/vmfiles/vm-store-path/cs-4006ae40-590b-49ba-6cec-0600ad7fb1d4/cs-4006ae40-590b-49ba-6cec-0600ad7fb1d4.vmx, The file already exists ': exit status 255' in 'create_vm' CPI method