You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could someone kindly help me to understand why I cannot get vagrant VMs to work with an existing "br1" interface and to also assign them static private IPs?
My error is as follows:
Error while activating network: Call to virNetworkCreate failed: internal error: Network is already in use by interface br1.
I already have KVM running on a server which has 4 VMS running on a 192.168.1.x network. I am wanting to spin up new vagrant VMs that will also have a interface assigned on that same 192.168.1.x net. I cannot find how to assign IPs statically via Vagrant and when I try the following config line in the Vagrantfile, I am then given that error I pasted above.
These are all different config lines I've used with no success:
^ This line actually worked but it created a new interface with that "192.168.3.116" ip on the host and was then linked to my guest vm by the virbr interface. I would have to setup routing the get the two networks to talk to each other and I would like to avoid this if possible"
@cheepsoot can you provide the network xml for the network that you want to add the additional VMs from vagrant to it?
virsh net-dumpxml <network-name>
you should be able to get the network name from virsh net-list --all.
I suspect it's just a case of matching up either the IPs in a way that vagrant-libvirt spots that they are part of that network, or to use the network name to help it find the correct one to use.
It sounds like you want to assign them static IPs on the existing br1 network? Since you don't want to have to hook up the separate networks.
So I'm wondering why the following by itself isn't sufficient?:
If it's not, it might just need :libvirt__network_name with the correct name from above to know which one to use, but otherwise really depends on how the existing network that you want to connect to is constructed, so easier if you can share the XML from that.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
Hello everyone!
Could someone kindly help me to understand why I cannot get vagrant VMs to work with an existing "br1" interface and to also assign them static private IPs?
My error is as follows:
Error while activating network: Call to virNetworkCreate failed: internal error: Network is already in use by interface br1.
I already have KVM running on a server which has 4 VMS running on a 192.168.1.x network. I am wanting to spin up new vagrant VMs that will also have a interface assigned on that same 192.168.1.x net. I cannot find how to assign IPs statically via Vagrant and when I try the following config line in the Vagrantfile, I am then given that error I pasted above.
These are all different config lines I've used with no success:
#web02.vm.network :public_network, :dev => "br1", :type => "bridge"
#web02.vm.network :private_network, :ip => "192.168.3.116", :libvirt__netmask => '255.255.255.0', :libvirt__forward_mode => "route"
^ This line actually worked but it created a new interface with that "192.168.3.116" ip on the host and was then linked to my guest vm by the virbr interface. I would have to setup routing the get the two networks to talk to each other and I would like to avoid this if possible"
#web02.vm.network :private_network, :libvirt__ip => "192.168.1.116", :libvirt__netmask => "255.255.255.0", :libvirt__forward_mode => "nat"
#web02.vm.network :private_network, :ip => "192.168.121.116", :libvirt__netmask => '255.255.255.0', :libvirt__network_name => "vagrant-libvirt"
Any suggestions to get my desired outcome of getting new VMs spun up which use the 192.168.1.x network??
The text was updated successfully, but these errors were encountered: