3

How to configure multiple monitors for the provider vmware-workstation in Vagrantfile?

For the provider virtualbox this can be done as follows:

config.vm.provider :virtualbox do |vb|
    vb.gui = true
    vb.customize ["modifyvm", :id, "--monitorcount", "2"]

As result the vm will be displayed on 2 monitors. How can I do this for vmware-workstation?

Michael K.
  • 1,738
  • 2
  • 17
  • 35
  • If you know how to do that from UI, you can make the setting on one of your VM, then check the vmx file with all the settings that are defined – Frederic Henri Nov 12 '15 at 16:31
  • I know how to display the 'running' vm on 2 monitors but I don't know how to do this on startup. – Michael K. Nov 16 '15 at 09:41
  • 1
    +1 because you explained how to do it with virtualbox. NB: make sure you restart the guest in order for the settings to work – langlauf.io Jun 21 '16 at 07:37

1 Answers1

1

I have no VMware Workstation at hand, but according to this reference, the parameter you're searching for is svga.numDisplays.

So the resulting snippet for the Vagrantfile should be

config.vm.provider "vmware_fusion" do |v|
  v.vmx["svga.numDisplays"] = 2
  v.vmx["svga.autodetect"] = "FALSE"
end
StephenKing
  • 36,187
  • 11
  • 83
  • 112
  • The resulting vmx-file contains now `svga.numdisplays = "2"`, but the vm appears on one display anyway. – Michael K. Nov 16 '15 at 09:38
  • Then I suggest to really follow _Frédéric Henri's_ approach and edit it in the user interface. I only have VMware Fusion at hand and updated my answer with the input from [jonathanmedd.net](http://www.jonathanmedd.net/2014/03/using-more-than-one-external-monitor-in-vmware-fusion-6.html), which allowed me to select the monitor inside the VM's monitor settings. – StephenKing Nov 16 '15 at 11:55
  • Please not only modify it in the .vmx, but also really try to change the display settings within the VM. – StephenKing Nov 16 '15 at 11:56
  • I already tried it with UI but every time I start the VM (also via the UI) the vm will be display only on one monitor. I already tried the `svga.autodetect` parameter but without success. I have different monitors with different solutions but even if I set it to same solution there is no success. – Michael K. Nov 16 '15 at 12:26