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

Support for bridged networking #181

Open
smathieu opened this issue Mar 20, 2014 · 9 comments
Open

Support for bridged networking #181

smathieu opened this issue Mar 20, 2014 · 9 comments
Assignees

Comments

@smathieu
Copy link
Contributor

As far as I can tell, currently this only supports NAT networking. The main issue with it, is that there's no way to connect to the guest from the host.

Simple things like

ping <the guest ip>

do not work.

It would be good if this supported bridged networking, which is more versatile, but is harder to configure.

@miurahr
Copy link
Collaborator

miurahr commented Mar 21, 2014

I'm working to improve network in my development fork.

https://github.com/miurahr/vagrant-kvm
in next branch.

This branch is for v0.2.0 development.
Can you test it?

It works

  1. Multiple vm definition in single Vagrant file
  2. Multiple Vagrantfile in different project shares same subnet in default network and private network
  3. No private network definition in Vagrantfile.
    It use 192.168.123.x as default network and select address automatically.
    This is as same behavior as VirtualBox driver does.

Known issues and limitations

  1. Cannot detect and escape IP address collision in private network.
    This happens when user use same Vagrantfile with private network defition in multiple project
  2. Not tested 1.5.x yet. tested on Vagrant 1.4.3.
  3. Not tested bridged network.
  4. Libvirt need to be fixed to support 9p file share.
    You may need to turn off selinux enforcement.

I'd like to listen your opinion how bridged network support working.

In ubuntu, there is OS default bridged network for libvirt/qemu.
It is defined in /etc/libvirt/qemu/network/bridged.xml and autostart when system started.
It is better to handle this default bridged network, 192.168.122.0/24.
To realize it, vagrant-kvm should handle network update with libvirt (required libvirt 0.5.2.)

IMHO, next branch is good start point to support bridged network.

@miurahr miurahr added this to the 0.2.0 milestone Mar 21, 2014
@miurahr miurahr self-assigned this Mar 21, 2014
@smathieu
Copy link
Contributor Author

I'll definitely test your branch as soon as I get a chance.

Looking at the source code, it does look like this won't support booting multiple VMs from different Vagrantfile. This is how I currently use vagrant-kvm, so this support for this would need to be added before I can fully use it.

On my side, I'll play around with using the default bridge on ubuntu. Expect a PR soon :)

@miurahr
Copy link
Collaborator

miurahr commented Apr 13, 2014

Now multiple VM are supported on current master. a9368ef
It may be a chance to test now.

@miurahr
Copy link
Collaborator

miurahr commented May 1, 2014

Here is experimental patch
miurahr@c8f0673

@adrahon
Copy link
Owner

adrahon commented Jun 5, 2014

Do we really want this? Isn't the default practice with vagrant to use port redirections for that?

@miurahr
Copy link
Collaborator

miurahr commented Jun 5, 2014

It is for supporting public networks.
http://docs.vagrantup.com/v2/networking/public_network.html

The document said that a key public_network will be changed bridged in future.

@adrahon
Copy link
Owner

adrahon commented Jun 6, 2014

OK, I'll test it then

@nspaeth
Copy link

nspaeth commented Jan 28, 2015

Is this still being worked on?

@adrahon
Copy link
Owner

adrahon commented Jan 29, 2015

Sorry, chances are it won't happen, see #276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants