Bridged network with vmware workstation, windows guest

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Bridged network with vmware workstation, windows guest

andrewsav
When I add this line to my vagrantfile:

    config.vm.network "public_network", bridge: "vmnet0"

vagrant creates second adapter which is bridged. 
Both primary and secondary adaters seems to work fine in this configuration.
I do not want second adapter I want the primary one to be bridged.

How do I configure this?

Vagrantfile to test:

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

Vagrant.configure("2") do |config|
  config.vm.box = "StefanScherer/windows_2016_docker"

  config.vm.network "public_network"
  config.vm.provider :vmware_workstation do |v|
    v.gui = true
  end
end



Cheers,
Andrew

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bridged network with vmware workstation, windows guest

Alvaro Miranda Aguilera
the first nic is by default.

So you don't want to add a new nic, you can override the first one.

have a look at this:

Alvaro


On Mon, Nov 20, 2017 at 1:55 AM, <[hidden email]> wrote:
When I add this line to my vagrantfile:

    config.vm.network "public_network", bridge: "vmnet0"

vagrant creates second adapter which is bridged. 
Both primary and secondary adaters seems to work fine in this configuration.
I do not want second adapter I want the primary one to be bridged.

How do I configure this?

Vagrantfile to test:

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

Vagrant.configure("2") do |config|
  config.vm.box = "StefanScherer/windows_2016_docker"

  config.vm.network "public_network"
  config.vm.provider :vmware_workstation do |v|
    v.gui = true
  end
end



Cheers,
Andrew

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ezWPozZ42754SoeEweDbiko-pmpWyjPvy3QqMiYzhjhgA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bridged network with vmware workstation, windows guest

andrewsav
Thank you for this.
Apologies, I tried many different things before posting and none of them worked. Regarding you link with vagrant file like this:

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

Vagrant.configure("2") do |config|
  config.vm.box = "StefanScherer/windows_2016_docker"

  config.vm.network "public_network", adapter: "0"
  config.vm.provider :vmware_workstation do |v|
    v.gui = true
  end
end

The error I'm getting is this:

Bringing machine 'default' up with 'vmware_workstation' provider...
==> default: Cloning VMware VM: 'StefanScherer/windows_2016_docker'. This can take some time...
==> default: Checking if box 'StefanScherer/windows_2016_docker' 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 = "33"
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 :vmare_workstation do |vmware|
WARNING:       vmware.vmx["ethernet0.pcislotnumber"] = "33"
WARNING:     end
WARNING:   end
WARNING:
WARNING: For more information: https://www.vagrantup.com/docs/vmware/boxes.html#vmx-whitelisting
==> default: Starting the VMware VM...
==> default: Waiting for the VM to receive an address...
==> default: Forwarding ports...
    default: -- 3389 => 3389
    default: -- 22 => 2222
    default: -- 5985 => 55985
    default: -- 5986 => 55986
==> default: Waiting for machine to boot. This may take a few minutes...
==> default: Stopping the VMware VM...
==> default: Deleting the VM...
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/helper.rb:41:in `winrm_info_invalid?': undefined method `start_with?' for 0:Integer (NoMethodError)
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/helper.rb:36:in `winrm_address'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/helper.rb:21:in `winrm_info'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/communicator.rb:37:in `block in wait_for_ready'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:33:in `block in catch'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:33:in `catch'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:33:in `catch'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:108:in `timeout'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/communicator.rb:31:in `wait_for_ready'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

Did you ever actually got this working in practice, or is that a case of "should work in principle"?

Cheers,
Andrew

On Monday, 20 November 2017 22:47:42 UTC+13, Alvaro Miranda Aguilera wrote:
the first nic is by default.

So you don't want to add a new nic, you can override the first one.

have a look at this:
<a href="https://superuser.com/questions/957631/how-to-force-vagrant-to-have-a-single-bridged-network-interface" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsuperuser.com%2Fquestions%2F957631%2Fhow-to-force-vagrant-to-have-a-single-bridged-network-interface\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGCVwW-oIHdsdowUegIwCSTZmAsmA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsuperuser.com%2Fquestions%2F957631%2Fhow-to-force-vagrant-to-have-a-single-bridged-network-interface\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGCVwW-oIHdsdowUegIwCSTZmAsmA&#39;;return true;">https://superuser.com/questions/957631/how-to-force-vagrant-to-have-a-single-bridged-network-interface

Alvaro


On Mon, Nov 20, 2017 at 1:55 AM, <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="U9LhfjCdCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">andr...@...> wrote:
When I add this line to my vagrantfile:

    config.vm.network "public_network", bridge: "vmnet0"

vagrant creates second adapter which is bridged. 
Both primary and secondary adaters seems to work fine in this configuration.
I do not want second adapter I want the primary one to be bridged.

How do I configure this?

Vagrantfile to test:

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

Vagrant.configure("2") do |config|
  config.vm.box = "StefanScherer/windows_2016_docker"

  config.vm.network "public_network"
  config.vm.provider :vmware_workstation do |v|
    v.gui = true
  end
end



Cheers,
Andrew

--
This mailing list is governed under the HashiCorp Community Guidelines - <a href="https://www.hashicorp.com/community-guidelines.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;">https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: <a href="https://github.com/mitchellh/vagrant/issues" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="U9LhfjCdCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">vagrant-up+...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Alvaro

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/30e5c933-2bd5-46c4-87dd-67fdfaf5e71d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bridged network with vmware workstation, windows guest

andrewsav
In reply to this post by Alvaro Miranda Aguilera
According to 

this https://stackoverflow.com/questions/35208188/how-can-i-define-network-settings-with-vagrant/35211086#35211086
and this https://github.com/hashicorp/vagrant/issues/2093

it looks like it's impossible.

Can you confirm please?

On Monday, 20 November 2017 22:47:42 UTC+13, Alvaro Miranda Aguilera wrote:
the first nic is by default.

So you don't want to add a new nic, you can override the first one.

have a look at this:
<a href="https://superuser.com/questions/957631/how-to-force-vagrant-to-have-a-single-bridged-network-interface" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsuperuser.com%2Fquestions%2F957631%2Fhow-to-force-vagrant-to-have-a-single-bridged-network-interface\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGCVwW-oIHdsdowUegIwCSTZmAsmA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsuperuser.com%2Fquestions%2F957631%2Fhow-to-force-vagrant-to-have-a-single-bridged-network-interface\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGCVwW-oIHdsdowUegIwCSTZmAsmA&#39;;return true;">https://superuser.com/questions/957631/how-to-force-vagrant-to-have-a-single-bridged-network-interface

Alvaro


On Mon, Nov 20, 2017 at 1:55 AM, <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="U9LhfjCdCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">andr...@...> wrote:
When I add this line to my vagrantfile:

    config.vm.network "public_network", bridge: "vmnet0"

vagrant creates second adapter which is bridged. 
Both primary and secondary adaters seems to work fine in this configuration.
I do not want second adapter I want the primary one to be bridged.

How do I configure this?

Vagrantfile to test:

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

Vagrant.configure("2") do |config|
  config.vm.box = "StefanScherer/windows_2016_docker"

  config.vm.network "public_network"
  config.vm.provider :vmware_workstation do |v|
    v.gui = true
  end
end



Cheers,
Andrew

--
This mailing list is governed under the HashiCorp Community Guidelines - <a href="https://www.hashicorp.com/community-guidelines.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;">https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: <a href="https://github.com/mitchellh/vagrant/issues" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="U9LhfjCdCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">vagrant-up+...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Alvaro

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/8fbbff70-9a9a-4c55-a968-15ff66db6e11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bridged network with vmware workstation, windows guest

Alvaro Miranda Aguilera
In reply to this post by andrewsav
Hello

without having all the knowledge on what you want to do and why you want to avoid nat, yes it does work and yes i have used it.

proof:

kikitux@alvaro MINGW64 ~/Downloads/precise64
$ vagrant destroy -f
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...

kikitux@alvaro MINGW64 ~/Downloads/precise64
$ vagrant up --provider virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'hashicorp/precise64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> default: Setting the name of the VM: precise64_default_1511254703644_84079
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: bridged
==> default: Forwarding ports...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 10.0.113.246:22
    default: SSH username: vagrant
    default: SSH auth method: private key
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 4.2.0
    default: VirtualBox Version: 5.1
==> default: Mounting shared folders...
    default: /vagrant => C:/Users/kikitux/Downloads/precise64

kikitux@alvaro MINGW64 ~/Downloads/precise64
$

there is 1 chicken egg here, that is, you can boot a VM add public_network and grab the IP and macaddress

then you can use that mac/ip to solve the chicken egg.

the first network will take DHCP, Vagrant doesn't know the IP, so you can bootstrap that part with a known mac/ip

after that it works.

$ cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/precise64"
  config.vm.network "public_network", adapter: 1, auto_config: false, :mac => "080027880ca6"
  config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", disabled: true, auto_correct: true
  config.vm.provider :vmware_workstation do |v|
    v.gui = true
  end
  config.ssh.host = "10.0.113.246"
end


Enjoy,
Alvaro.

On Tue, Nov 21, 2017 at 1:47 AM, <[hidden email]> wrote:
Thank you for this.
Apologies, I tried many different things before posting and none of them worked. Regarding you link with vagrant file like this:

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

Vagrant.configure("2") do |config|
  config.vm.box = "StefanScherer/windows_2016_docker"

  config.vm.network "public_network", adapter: "0"
  config.vm.provider :vmware_workstation do |v|
    v.gui = true
  end
end

The error I'm getting is this:

Bringing machine 'default' up with 'vmware_workstation' provider...
==> default: Cloning VMware VM: 'StefanScherer/windows_2016_docker'. This can take some time...
==> default: Checking if box 'StefanScherer/windows_2016_docker' 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 = "33"
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 :vmare_workstation do |vmware|
WARNING:       vmware.vmx["ethernet0.pcislotnumber"] = "33"
WARNING:     end
WARNING:   end
WARNING:
==> default: Starting the VMware VM...
==> default: Waiting for the VM to receive an address...
==> default: Forwarding ports...
    default: -- 3389 => 3389
    default: -- 22 => 2222
    default: -- 5985 => 55985
    default: -- 5986 => 55986
==> default: Waiting for machine to boot. This may take a few minutes...
==> default: Stopping the VMware VM...
==> default: Deleting the VM...
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/helper.rb:41:in `winrm_info_invalid?': undefined method `start_with?' for 0:Integer (NoMethodError)
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/helper.rb:36:in `winrm_address'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/helper.rb:21:in `winrm_info'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/communicator.rb:37:in `block in wait_for_ready'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:33:in `block in catch'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:33:in `catch'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:33:in `catch'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:108:in `timeout'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/communicator.rb:31:in `wait_for_ready'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

Did you ever actually got this working in practice, or is that a case of "should work in principle"?

Cheers,
Andrew

On Monday, 20 November 2017 22:47:42 UTC+13, Alvaro Miranda Aguilera wrote:
the first nic is by default.

So you don't want to add a new nic, you can override the first one.

have a look at this:

Alvaro


On Mon, Nov 20, 2017 at 1:55 AM, <[hidden email]> wrote:
When I add this line to my vagrantfile:

    config.vm.network "public_network", bridge: "vmnet0"

vagrant creates second adapter which is bridged. 
Both primary and secondary adaters seems to work fine in this configuration.
I do not want second adapter I want the primary one to be bridged.

How do I configure this?

Vagrantfile to test:

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

Vagrant.configure("2") do |config|
  config.vm.box = "StefanScherer/windows_2016_docker"

  config.vm.network "public_network"
  config.vm.provider :vmware_workstation do |v|
    v.gui = true
  end
end



Cheers,
Andrew

--
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/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/30e5c933-2bd5-46c4-87dd-67fdfaf5e71d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0eyxqhn7vdANNHv%3DkoBctmiJgxrv5%2BwGthsA79W2PcBMdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bridged network with vmware workstation, windows guest

andrewsav
Thank you Alvaro,

as I mentioned in my question I need windows guest and I need vmware provider. Your example is linux guest and virtualbox provider, unfortunately it does not help me.

Let me tell you a little bit more about what I'm trying to achieve.

I have build a box that represents an application that we developed (let's call in the API). Other applications need to interact with the API and the goal is to provide the vagrant box for the application developers to point to, to consume the API.
The application does not necessarily run on the same machine where the vagrant is run, it would be beneficial for us to point the application from any environment to a particular API box instance for testing.

Thus I need to provide a quick and easy way for people to up this box and point their application to it. I cannot ask everyone to fiddle with vagrant config and re-run several times in different network configurations until it works, that would not be reasonable.
I need to give them a way to vagrant up and then just point to that IP from anywhere.

Nat would not allow this as the box won't get its own external IP and port forwarding won't do because of clash with the used host ports. I need bridge.
At the same time I don't want to confuse people with multiple IP address for the box: one that comes from NAT and the other that comes from bridge. It should be easy for them to up the box, grab the address and point whatever they need to point to this address.
The address will be given by external DHCP on the host network.

It almost works to my satisfaction. The only hurdle is that I still have useless NAT on the box, which I don't need 
"man, why did you build this box for us with two network adapters? What is the second for? - Well guys, sorry, it's not me it's vagrant, it insists on having the second adapter with NAT or manual configuration of the box is required to remove the extra adapter once the box is up. it's a bit lame but no can do" <= so that's the conversation I'm trying to avoid. 

Please let me know if anything is not clear.

Cheers,
Andrew



On Tuesday, 21 November 2017 22:01:38 UTC+13, Alvaro Miranda Aguilera wrote:
Hello

without having all the knowledge on what you want to do and why you want to avoid nat, yes it does work and yes i have used it.

proof:

kikitux@alvaro MINGW64 ~/Downloads/precise64
$ vagrant destroy -f
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...

kikitux@alvaro MINGW64 ~/Downloads/precise64
$ vagrant up --provider virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'hashicorp/precise64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> default: Setting the name of the VM: precise64_default_1511254703644_84079
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: bridged
==> default: Forwarding ports...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: <a href="http://10.0.113.246:22" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F10.0.113.246%3A22\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLfmk0DkYjnkKd3A741ZwHTJkIZQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F10.0.113.246%3A22\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHLfmk0DkYjnkKd3A741ZwHTJkIZQ&#39;;return true;">10.0.113.246:22
    default: SSH username: vagrant
    default: SSH auth method: private key
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 4.2.0
    default: VirtualBox Version: 5.1
==> default: Mounting shared folders...
    default: /vagrant => C:/Users/kikitux/Downloads/precise64

kikitux@alvaro MINGW64 ~/Downloads/precise64
$

there is 1 chicken egg here, that is, you can boot a VM add public_network and grab the IP and macaddress

then you can use that mac/ip to solve the chicken egg.

the first network will take DHCP, Vagrant doesn't know the IP, so you can bootstrap that part with a known mac/ip

after that it works.

$ cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/precise64"
  config.vm.network "public_network", adapter: 1, auto_config: false, :mac => "080027880ca6"
  config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", disabled: true, auto_correct: true
  config.vm.provider :vmware_workstation do |v|
    v.gui = true
  end
  config.ssh.host = "10.0.113.246"
end


Enjoy,
Alvaro.

On Tue, Nov 21, 2017 at 1:47 AM, <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="VpNFtEHpCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">andr...@...> wrote:
Thank you for this.
Apologies, I tried many different things before posting and none of them worked. Regarding you link with vagrant file like this:

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

Vagrant.configure("2") do |config|
  config.vm.box = "StefanScherer/windows_2016_docker"

  config.vm.network "public_network", adapter: "0"
  config.vm.provider :vmware_workstation do |v|
    v.gui = true
  end
end

The error I'm getting is this:

Bringing machine 'default' up with 'vmware_workstation' provider...
==> default: Cloning VMware VM: 'StefanScherer/windows_2016_docker'. This can take some time...
==> default: Checking if box 'StefanScherer/windows_2016_docker' 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 = "33"
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 :vmare_workstation do |vmware|
WARNING:       vmware.vmx["ethernet0.pcislotnumber"] = "33"
WARNING:     end
WARNING:   end
WARNING:
WARNING: For more information: <a href="https://www.vagrantup.com/docs/vmware/boxes.html#vmx-whitelisting" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.vagrantup.com%2Fdocs%2Fvmware%2Fboxes.html%23vmx-whitelisting\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGDPP_VEhzV45JiKY4BtnmHOnnvyA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.vagrantup.com%2Fdocs%2Fvmware%2Fboxes.html%23vmx-whitelisting\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGDPP_VEhzV45JiKY4BtnmHOnnvyA&#39;;return true;">https://www.vagrantup.com/docs/vmware/boxes.html#vmx-whitelisting
==> default: Starting the VMware VM...
==> default: Waiting for the VM to receive an address...
==> default: Forwarding ports...
    default: -- 3389 => 3389
    default: -- 22 => 2222
    default: -- 5985 => 55985
    default: -- 5986 => 55986
==> default: Waiting for machine to boot. This may take a few minutes...
==> default: Stopping the VMware VM...
==> default: Deleting the VM...
C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/helper.rb:41:in `winrm_info_invalid?': undefined method `start_with?' for 0:Integer (NoMethodError)
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/helper.rb:36:in `winrm_address'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/helper.rb:21:in `winrm_info'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/communicator.rb:37:in `block in wait_for_ready'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:93:in `block in timeout'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:33:in `block in catch'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:33:in `catch'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:33:in `catch'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/timeout.rb:108:in `timeout'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/plugins/communicators/winrm/communicator.rb:31:in `wait_for_ready'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.1/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

Did you ever actually got this working in practice, or is that a case of "should work in principle"?

Cheers,
Andrew

On Monday, 20 November 2017 22:47:42 UTC+13, Alvaro Miranda Aguilera wrote:
the first nic is by default.

So you don't want to add a new nic, you can override the first one.

have a look at this:
<a href="https://superuser.com/questions/957631/how-to-force-vagrant-to-have-a-single-bridged-network-interface" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsuperuser.com%2Fquestions%2F957631%2Fhow-to-force-vagrant-to-have-a-single-bridged-network-interface\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGCVwW-oIHdsdowUegIwCSTZmAsmA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsuperuser.com%2Fquestions%2F957631%2Fhow-to-force-vagrant-to-have-a-single-bridged-network-interface\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGCVwW-oIHdsdowUegIwCSTZmAsmA&#39;;return true;">https://superuser.com/questions/957631/how-to-force-vagrant-to-have-a-single-bridged-network-interface

Alvaro


On Mon, Nov 20, 2017 at 1:55 AM, <[hidden email]> wrote:
When I add this line to my vagrantfile:

    config.vm.network "public_network", bridge: "vmnet0"

vagrant creates second adapter which is bridged. 
Both primary and secondary adaters seems to work fine in this configuration.
I do not want second adapter I want the primary one to be bridged.

How do I configure this?

Vagrantfile to test:

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

Vagrant.configure("2") do |config|
  config.vm.box = "StefanScherer/windows_2016_docker"

  config.vm.network "public_network"
  config.vm.provider :vmware_workstation do |v|
    v.gui = true
  end
end



Cheers,
Andrew

--
This mailing list is governed under the HashiCorp Community Guidelines - <a href="https://www.hashicorp.com/community-guidelines.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;">https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: <a href="https://github.com/mitchellh/vagrant/issues" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;">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 <a href="https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/vagrant-up/f564595c-48f5-4dc3-ae48-067f09b2da0f%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - <a href="https://www.hashicorp.com/community-guidelines.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.hashicorp.com%2Fcommunity-guidelines.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGHa_CaKfZaJiwbkUndUQbVGlQCDw&#39;;return true;">https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: <a href="https://github.com/mitchellh/vagrant/issues" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fmitchellh%2Fvagrant%2Fissues\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHxcA5DuHlQlPInMi_k1Pz4pMNqNw&#39;;return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="VpNFtEHpCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">vagrant-up+...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/vagrant-up/30e5c933-2bd5-46c4-87dd-67fdfaf5e71d%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/30e5c933-2bd5-46c4-87dd-67fdfaf5e71d%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/vagrant-up/30e5c933-2bd5-46c4-87dd-67fdfaf5e71d%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/vagrant-up/30e5c933-2bd5-46c4-87dd-67fdfaf5e71d%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Alvaro

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/fc9bc148-d043-44a5-b3d1-6f4e7467b797%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Bridged network with vmware workstation, windows guest

Alvaro Miranda Aguilera
Hello

Missed the vmware part from your message, but I can see it now in the vagrantfile, I just took a bit from it didn't copy paste all.

So for VMWare, it also works:

kikitux@alvaro MINGW64 ~/Downloads/vagrant_bridge_eth0_vmware
$ vagrant up
Bringing machine 'default' up with 'vmware_workstation' provider...
==> default: Cloning VMware VM: 'hashicorp/precise64'. This can take some time...
==> default: Checking if box 'hashicorp/precise64' 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 :vmare_workstation do |vmware|
WARNING:       vmware.vmx["ethernet0.pcislotnumber"] = "32"
WARNING:     end
WARNING:   end
WARNING:
==> default: Starting the VMware VM...
==> default: Waiting for the VM to receive an address...
==> default: Forwarding ports...
    default: -- 22 => 2222
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 0:22
    default: SSH username: vagrant
    default: SSH auth method: private key
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Configuring network adapters within the VM...
==> default: Waiting for HGFS to become available...
==> default: Enabling and configuring shared folders...
    default: -- C:/Users/kikitux/Downloads/vagrant_bridge_eth0_vmware: /vagrant

kikitux@alvaro MINGW64 ~/Downloads/vagrant_bridge_eth0_vmware
$ vagrant ssh -c 'ifconfig ; route -n'
eth0      Link encap:Ethernet  HWaddr 00:0c:29:1f:47:89
          inet addr:10.0.15.89  Bcast:10.0.115.255  Mask:255.255.252.0
          inet6 addr: fe80::20c:29ff:fe1f:4789/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1469 errors:0 dropped:0 overruns:0 frame:0
          TX packets:497 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:224165 (224.1 KB)  TX bytes:70375 (70.3 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.12.1      0.0.0.0         UG    100    0        0 eth0
10.0.12.0      0.0.0.0         255.255.252.0   U     0      0        0 eth0
Connection to 10.0.115.89 closed.

kikitux@alvaro MINGW64 ~/Downloads/vagrant_bridge_eth0_vmware
$


This one requires less tricks since VMware works bit differently:

$ cat Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/precise64"
  config.vm.network "public_network", adapter: 0, auto_config: false
  config.vm.provider :vmware_workstation do |v|
    v.gui = true
  end
end

let me know if works.

Alvaro.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ey_LjEbeV0D6bAzhT7PTyGtiSZX7S-k1p52HxJ5-%3DDz2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.