vagrant multi-machine config failing consistently on Windows 10 host

491 views
Skip to first unread message

Aaron Kulbe

unread,
Mar 21, 2019, 1:57:05 PM3/21/19
to vagra...@googlegroups.com
Host OS: Win 10 Pro x64 with PowerShell
Guest OS: Linux (Ubuntu LTS / CentOS 7)
Vagrant: 2.2.4
vagrant-vmware-utility: 1.0.7
VMware Workstation: 15.0.3

I am attempting to spin up a 4-machine configuration, on a Windows 10 host.

I have tried with both the "virtualbox" provider and the "vmware_desktop" provider.



PS C:\Users\Aaron Kulbe> cat .\Vagrantfile                                                                                                                                                         Vagrant.configure("2") do |config|
  config.vm.provision "shell", inline: "echo Hello"

  config.vm.provider "vmware_desktop" do |v|
    v.memory = "4096"
    v.linked_clone = false
  end

  config.vm.define "web" do |web|
    web.vm.box = "centos/7"
  end

  config.vm.define "db" do |db|
    db.vm.box = "centos/7"
  end

  config.vm.define "app1" do |app1|
    app1.vm.box = "centos/7"
  end

  config.vm.define "app2" do |app2|
    app2.vm.box = "centos/7"
  end
end
PS C:\Users\Aaron Kulbe>                     

PS C:\Users\Aaron Kulbe> vagrant up
Bringing machine 'web' up with 'vmware_desktop' provider...
Bringing machine 'db' up with 'vmware_desktop' provider...
Bringing machine 'app1' up with 'vmware_desktop' provider...
Bringing machine 'app2' up with 'vmware_desktop' provider...
==> web: Checking if box 'centos/7' version '1902.01' is up to date...
==> web: Verifying vmnet devices are healthy...
==> web: Preparing network adapters...
==> web: Starting the VMware VM...
An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:

Command: ["start", "C:\\Users\\Aaron Kulbe\\.vagrant\\machines\\web\\vmware_desktop\\6abc5250-6378-48a5-9e26-65a56217af2a\\centos-7-1-1.x86_64.vmx", "nogui", {:notify=>[:stdout, :stderr], :timeout=>45}]

Stdout: Error: The operation was canceled

Stderr:
I had a similar issue with using the virtualbox provider, as it would have issues with the *argument* of the command it was calling.

vmware_desktop calls "vmrun" with "clone" as an argument.
virtualbox calls "VBoxManage" with "startvm" as its argument.

Both providers threw errors on their arguments. Hyper-V had different issues. I just want to spin up multi-machine environments. Can someone please help me figure out if I'm doing something wrong, or if this is a bug?

Aaron Kulbe

unread,
Mar 21, 2019, 2:58:54 PM3/21/19
to Vagrant
One other thing I forgot to add. I have the same plugins, same provider (vmware_desktop) and same Vagrantfile on a Linux desktop… it works fine there. I'm just wanting to do this on my Windows machines as I have a lot more RAM on them.

vince...@gmail.com

unread,
Mar 21, 2019, 4:51:35 PM3/21/19
to Vagrant

Ignore setting the memory for now and just try to get 4 boxes to come up...

Try this...

# -*- mode: ruby -*-
# vi: set ft=ruby ts=2 :

hosts = {
  "sys1"  => { :ip => "192.168.56.101"  },
  "sys2"  => { :ip => "192.168.56.102"  },
  "sys3"  => { :ip => "192.168.56.103"  },
  "sys4"  => { :ip => "192.168.56.104"  },

}

Vagrant.configure("2") do |config|

  config.vm.box = "centos/7"

  hosts.each_with_index do |(hostname,info), index|

    config.vm.define hostname do |cfg|
      cfg.vm.provider :virtualbox do |vb, override|
         override.vm.hostname = hostname
         override.vm.network "private_network", ip: info[:ip]
     end # end config

  end # end hosts

end # end configure


Message has been deleted

Aaron Kulbe

unread,
Mar 21, 2019, 5:46:00 PM3/21/19
to Vagrant
I made two changes to the code you provided: I included a missing "end" statement. I changed the provider from "virtualbox" to "vmware_desktop" as I don't have VBox installed.

Here's the code:

# -*- mode: ruby -*-
# vi: set ft=ruby ts=2 :

hosts = {
  "sys1" => { :ip => "192.168.56.101" },
  "sys2" => { :ip => "192.168.56.102" },
  "sys3" => { :ip => "192.168.56.103" },
  "sys4" => { :ip => "192.168.56.104" },
}

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"

  hosts.each_with_index do |(hostname, info), index|
    config.vm.define hostname do |cfg|
      cfg.vm.provider :vmware_desktop do |vb, override|
        override.vm.hostname = hostname
        override.vm.network "private_network", ip: info[:ip]
      end
    end
  end
end

Here are the results:

PS C:\Users\Aaron Kulbe\Code\Vagrant_Dev> vagrant up
Bringing machine 'sys1' up with 'vmware_desktop' provider...
Bringing machine 'sys2' up with 'vmware_desktop' provider...
Bringing machine 'sys3' up with 'vmware_desktop' provider...
Bringing machine 'sys4' up with 'vmware_desktop' provider...
==> sys1: Checking if box 'centos/7' version '1902.01' is up to date...
==> sys1: Verifying vmnet devices are healthy...
==> sys1: Preparing network adapters...
==> sys1: Starting the VMware VM...
An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:

Command: ["start", "C:\\Users\\Aaron Kulbe\\Code\\Vagrant_Dev\\.vagrant\\machines\\sys1\\vmware_desktop\\9ec638a6-0a13-4d94-bdd1-a3878230668a\\centos-7-1-1.x86_64.vmx", "nogui", {:notify=>[:stdout, :stderr], :timeout=>45}]

Stdout: Error: The operation was canceled

Stderr:

Aaron Kulbe

unread,
Mar 21, 2019, 6:25:59 PM3/21/19
to Vagrant
I tried even more simple. Forget about 4 machines. Just 1 machine this time. 

Here's the Vagrantfile contents:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.synced_folder ".", "/vagrant_data", Disabled: true
  config.vm.provider "vmware_desktop" do |vb|
    vb.memory = "4096"
  end
end

The output was similar:

PS C:\Users\Aaron Kulbe\Code\sandbox> vagrant up                                                                                                                                                        Bringing machine 'default' up with 'vmware_desktop' provider...
==> default: Cloning VMware VM: 'centos/7'. This can take some time...
==> default: Checking if box 'centos/7' version '1902.01' is up to date...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
WARNING: The VMX file for this box contains a setting that is automatically overwritten by Vagrant
WARNING: when started. Vagrant will stop overwriting this setting in an upcoming release which may
WARNING: prevent proper networking setup. Below is the detected VMX setting:
WARNING:
WARNING:   ethernet0.pcislotnumber = "32"
WARNING:
WARNING: If networking fails to properly configure, it may require this VMX setting. It can be manually
WARNING: applied via the Vagrantfile:
WARNING:
WARNING:   Vagrant.configure(2) do |config|
WARNING:     config.vm.provider :vmware_desktop do |vmware|
WARNING:       vmware.vmx["ethernet0.pcislotnumber"] = "32"
WARNING:     end
WARNING:   end
WARNING:
==> default: Starting the VMware VM...
An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:

Command: ["start", "C:\\Users\\Aaron Kulbe\\Code\\sandbox\\.vagrant\\machines\\default\\vmware_desktop\\561078a5-7c47-440c-a4e8-d7d9865c96d4\\centos-7-1-1.x86_64.vmx", "nogui", {:notify=>[:stdout, :stderr], :timeout=>45}]

Stdout: Error: The operation was canceled

Stderr:
On Thursday, March 21, 2019 at 1:51:35 PM UTC-7, vince...@gmail.com wrote:

vince...@gmail.com

unread,
Mar 25, 2019, 1:13:45 PM3/25/19
to Vagrant
On Thursday, March 21, 2019 at 3:25:59 PM UTC-7, Aaron Kulbe wrote:
An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:



Sorry - can't help you with VMware, but it sounds like that's where your problem is.

Note - I 'have' heard past coworkers complain that vagrant on win10 didn't work if you had both VirtualBox and VMware Workstation installed at the same time.  I've also seen that if you have native HyperV enabled for native Docker, that'll break VirtualBox under the hood.  Unsure about VMware.  It's been too many years since I used that.

Alvaro Miranda Aguilera

unread,
Mar 25, 2019, 2:39:36 PM3/25/19
to vagra...@googlegroups.com
Hello.

After the command fail, and you get the VMX file. ie:

C:\\Users\\Aaron Kulbe\\Code\\sandbox\\.vagrant\\machines\\default\\vmware_desktop\\561078a5-7c47-440c-a4e8-d7d9865c96d4\\centos-7-1-1.x86_64.vmx"

Try to open it, and see what the GUI says.

As you are on the vmware plugin, you could also email support @ hashicorp.com

include the output of:

vagrant version
vagrant plugin list

also try

Disable the antivirus for a test:

vagrant destroy
vagrant up --debug

reenable the AV.

and share all the verbose output.

Thanks

Thanks!
Alvaro.

Aaron Kulbe

unread,
Mar 26, 2019, 12:06:22 PM3/26/19
to vagra...@googlegroups.com
Thank you, Alvaro!

I didn't think to attempt opening the .vmx with Workstation. It turns out that when you enable Hyper-V and then disable it to go back to VMware later, that it doesn't always disable everything. Once I fixed those issues, this worked as expected.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0exYuZzpG112Y2U8f%3D1TVaazK9co3m_S7WSA2Z60Xx0R2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages