-
Notifications
You must be signed in to change notification settings - Fork 60
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
2 network interfaces instead of one #231
Comments
vagrant-kvm 0.2.0-dev is designed to add NIC according to Vagrantfile definitions. It is an almost same behevior with vagrant and virtualbox. (A difference is that it is host only NIC for VirtualBox but in KVM it is NAT) There are methods to add NIC to guest definition: And It launches such a driver functions Because network action created network 'vagrant-33', add_nic() was also processed. For further debug, could you post debug log? Is it better that is disable default nic when configured with private network? |
Issue is that if I explicitly requested to have certain ip address, VM must be available at this ip address without any modifications in my internal box configs. Of course, I can ssh in box and add new adapter, make sure that it will get desired address, but as a user why I'm supposed to do such thing? I'm not sure who caused a problem, from one point of view, box running in vm with 2 nics, so there should be 2 nics available inside OS, but there is only one. From other side, why there are 2 nics in first place, if in Vagrantfile I requested my box to have a private network with static ip. |
Oops, missclick, reopened |
I agree with @Dantix that the default behaviour should be to use the IP address that was specified in the Vagrant file and not add a NIC. It isn't simple, though, what if the user creates 3 Vagrant boxes with different networks? Do we create 3 networks with libvirt? Do we remove them when the box is destroyed? What if there's another VM using that network? etc. Here is what I propose:
|
No creating static IP is a bug, because it designed to create static IP. If the user creates 3 vagrant boxes with different networks, vagrant-kvm create 3 different networks and 1 default network to communicate for provision. Each guest have 2 NIC, one is specified in Vagrantfile and other is random in default network (in design) The report is that vagrant-kvm is designed to create 2 nic and to assign IP address but not creating nic and not assign address. This is simply a bug. The default subnet is hard coded now. So we need to improve there. The comment #231 (comment) pointed the code vagrant-kvm assigning private IP address for guest. |
I can reproduce it. Here is a log. vagrant debug log. Vagrant-KVM create NIC for domain. Here is a copy of /etc/libvirt/qemu/fedora20.xml
but guest does not recognize it. Only eth0 is created. I have checked guest dmesg log. It may be a problem as followings: 2nd network definition in XML is |
I've launched box with static IP. 2 networks were created: vagrant and vagrant-33, but my ubuntu box have only one network interface, and have 192.168.123.xx ip, which is not that ip configured in Vagrantfile
vagrant 1.6.2, vagrant-kvm 0.2.0-dev
The text was updated successfully, but these errors were encountered: