Multiple Virtual Bridges?


Recommended Posts

Is it possible to create multiple virtual bridges through the Unraid WebGui.  Currently I only see the option to select virbr0.  Is there a way to create virbr1 and have 2 completely separate virtual segments?

 

If not, can this be accomplished commandline without me completely borking the Unraid install?

Link to comment

Is it possible to create multiple virtual bridges through the Unraid WebGui.  Currently I only see the option to select virbr0.  Is there a way to create virbr1 and have 2 completely separate virtual segments?

 

If not, can this be accomplished commandline without me completely borking the Unraid install?

 

Are you talking about libvirt-managed bridges or network bridges in general?  brctl I believe is the tool you can use from command line.  We do not currently provide the functionality you describe in the webGui, but it's something we would consider in the future.

Link to comment

The libvirt-managed bridges.  My goal is to have separate testing environments with say a pfsense VM acting as a router for each subnet.  I'll fool around with brctl and see what if I can get a second virtual bridge created and usable by a set of VM's.

 

This probably deservers a separate thread but I'm guessing there's no way to add multiple network interfaces via the GUI to a VM either?

Link to comment

For those who are looking for more advanced network setups for their VM's the key is using the virsh command to define new networks.  You'll need to SSH into your Unraid server, define your networks with xml files in /etc/libvirt/qemu/networks and then add them in via virsh.  I was able to find a ton of info googling libvirt networks.

 

After the new virtual interfaces are created, they will appear in the Unraid GUI and be selectable as your VM's Network Bridge.  I have more testing to do but so far it looks like Unraid/KVM/QEMU will be able to handle all of my storage and VM needs.

Link to comment

That's a great question.  The key to making sure your networks survive a reboot is to use virsh net-define "newnetwork.xml" to permanently define the network.  You can then start the network with virsh net-create "newnetwork.xml" and then make sure it autostarts when booting with virsh net-autostart "networkname".

 

You can then run virsh net-list to show that your new network is "Active", will "Autostart" and is "Persistent".

Link to comment
  • 1 month later...

Sorry I didn't have autonotify on for this thread.

 

You need to create the xml files for your new networks in /etc/libvirt/qemu/networks.  You can use the default.xml as a template and the following link to help point you in the right direction.  https://libvirt.org/formatnetwork.html

 

Once you have your new network xml file created and saved in /etc/libvirt/qemu/networks, you can use the virsh command while logged into the console via SSH to create, start and make the network persistent.  There is no need to mess with the go script.

 

Assuming you named your xml file "newnetwork.xml" and defined the name in the xml as "newnetwork", while logged in via SSH, run the following commands.

 

1.  Permanently add your new network

 

virsh net-define /etc/libvirt/qemu/networks/newnetwork.xml

 

2.  Start your new network

 

virsh net-create /etc/libvirt/qemu/networks/newnetwork.xml

 

3.  Enable Autostart for your new network

 

virsh net-autostart newnetwork

 

4.  Check to make sure your network is started and persistent

 

virsh net-list

 

You should see your new network listed as Active, with Autostart and Persistent set to Yes.  Like I said earlier this is enough to make your networks survive a reboot and autostart.  No need to touch the "go" script.  Hope this helps.

Link to comment
  • 3 months later...

I would also love to see support for multiple virtual bridge adapters added to the GUI. I use the one I can create in the GUI for a Mythbuntu KVM which has been running very smoothly. I'd love to see the ability to create several. I'd like a small footprint ubuntu VM I could spin up every once in a while that has it's own IP address on my LAN. Is this possible through the GUI now or does it still require editing xml files?

Link to comment

I would also love to see support for multiple virtual bridge adapters added to the GUI. I use the one I can create in the GUI for a Mythbuntu KVM which has been running very smoothly. I'd love to see the ability to create several. I'd like a small footprint ubuntu VM I could spin up every once in a while that has it's own IP address on my LAN. Is this possible through the GUI now or does it still require editing xml files?

i am not sure what you are looking for?    If you set up a bridge under Settings->Network and use this in your VM then it acts like a machine plugged into the LAN and thus gets its own IP allocated.  It has always been like this in unRAID v6
Link to comment

I understand this. My mythbuntu instance uses br0 as it's network interface. If I wanted to create a 2nd VM, would I not need a br1 interface with it's own MAC and IP address? Excuse me if I'm missing something simple.

no - br0 does not have an IP address in the sense you seem to think.  This bridge is a 'pass-through' type and makes it appear as if there is a NIC with the MAC address set in your VMs Config directly attached to the LAN.  Since each VM has a unique MAC in its network settings the router assigns it a unique IP address (assuming you are using DHCP).  If you configure your VMs to have fixed IP addresses (instead of using DHCP) then it is up to you to ensure there are no collisions.    This is no different to managing the networking aspects of real physical machines.
Link to comment

I can definitely configure the new MAC the new KVM takes on my router end with DCHP. I honestly (obviously) didn't know the answer :D It is working great. I've been able to assign it a static LAN IP based on the MAC in the KVM settings. Thanks for setting me straight. Apologies for such a n00b question :D

 

 

Link to comment
  • 1 year later...
On 12/28/2015 at 5:59 PM, jpimlott said:

I would like to see multiple interfaces being added in the GUI as well. I run an Untangle router as a KVM VM. I used

brctl but I can not get the Docker system to see the networks now.

 

 

 

John

 

John,

I am looking into running my Untangle firewall on my Unraid.  how did you install Untangle as a VM to get started? It seems to fail during the install.

Link to comment
  • 1 month later...
On 11/8/2015 at 4:10 AM, jonp said:

 

 but it's something we would consider in the future.

 

Did this ever get implemented?

 

I'm trialling unRaid as a guest on my ESXi home-lab server. It would be good if I could just run unRaid / KVM for my home-lab server instead.

I use ESXi because I keep my home-lab on its own NIC and vSwitch on a DMZ from the router to prevent data-leakage from what I'm doing in the lab, and the rest of the home network...

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.