Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

public_network Bridge Static IP, VMware Provider - not working as expected #4184

Closed
frizop opened this issue Jul 13, 2014 · 4 comments
Closed

Comments

@frizop
Copy link

frizop commented Jul 13, 2014

According to this #1269, I should be able to assign a static IP address on the public_network :bridge. Now I happen to do this frequently on Virtualbox VMs, so I assume this could be a fusion/vmware provider issue? Below is my Vagrantfile, and ip addr show output. What ends up happening is, I get a DHCP address (192.168.0.0/24).

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

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.define "node3" do |node3|
    node3.vm.box = "CorbanRaun/centos-6.5"
    node3.omnibus.chef_version = :latest

    node3.vm.hostname = "node3.local"

    node3.vm.provider "vmware_fusion" do |v|
      v.vmx["memsize"] = "1024"
      v.vmx["numvcpus"] = "2"
    end

    node3.vm.network "public_network", bridge: "en0: Wi-Fi (AirPort)", ip:"192.168.0.5"

    node3.vm.provision "chef_solo" do |chef|
      chef.cookbooks_path = "../cookbooks"
      chef.roles_path = "../roles"
      chef.data_bags_path = "../data_bags"
      chef.add_role "base"
    end
  end

end

Then, attempting to list the IPs, we can see it was never used.

[root@node3]/home/vagrant# ip addr show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:b0:e8:ed brd ff:ff:ff:ff:ff:ff
    inet 192.168.36.138/24 brd 192.168.36.255 scope global eth0
    inet6 fe80::20c:29ff:feb0:e8ed/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:b0:e8:f7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.144/24 brd 192.168.0.255 scope global eth1
    inet6 fe80::20c:29ff:feb0:e8f7/64 scope link 
       valid_lft forever preferred_lft forever
@frizop
Copy link
Author

frizop commented Jul 13, 2014

And just FYI, this is the /etc/sysconfig/network-scripts/ifcfg-eth1 file that vagrant generates for this particular issue:

#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
BOOTPROTO=dhcp
ONBOOT=yes
DEVICE=eth1
#VAGRANT-END

@frizop
Copy link
Author

frizop commented Jul 31, 2014

So nothing? Can I get a refund then? 18 days and nothing? Not even a confirmation of a bug?

@mitchellh
Copy link
Contributor

Sorry about this, we haven't been triaging Vagrant issues since we've been working on Terraform lately. For official support, please contact support@hashicorp.com in the future. If we didn't make that clear enough, it was in the original activation email we sent.

VMware doesn't support static IPs on public networks right now (only private). This is actually in an upcoming free update but this hasn't been released yet. Happy to refund you if this is something you need right away and sorry about that. Just email us at support or email me directly at mitchell@hashicorp.com and I can handle that for you.

@fnando
Copy link

fnando commented Dec 1, 2014

@mitchellh do you know if VMware released the fix? It seems that it's not working yet. I'm running vagrant 1.6.5, VMware Fusion Version 6.0.5, Mac 10.10 (Yosemite).

@ghost ghost locked and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants