create test environment in Unraid virbr1 (same as if Virtualbox was installed on top of windows)


luca2

Recommended Posts

Hi,

I read this content which contains a lot of usefull info. But there are still some issues and I hope someone can help me out.

https://wiki.unraid.net/Manual/VM_Management#Configure_a_Network_Bridge

Start point: I want to create a virtual network for testing vm´s that should be completely isolated from the host and from other vm´s in br0 / virbr0 / any vlan´s / dockers and from any host's network file sharing protocols running. But it should connect to internet.

It should still need to connect to internet. I basically want a test-environment.

 

I haven´t changed anything at the router.

 

Following Bastl´s @bastl approach helped by @ken-ji I managed to create a new virtual nic (virbr1 called lab-network). The only thing I am not able to reproduce is to get access to internet.

 

lab-network.xml:

<network>
  <name>lab-network</name>
  <bridge name="virbr1"/>
  <forward mode="nat"/>
  <ip address="192.168.122.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.122.2" end="192.168.122.254"/>
    </dhcp>
  </ip>
  <ip family="ipv6" address="2001:db8:ca2:2::1" prefix="64"/>
</network>

 

virsh # net-list
 Name          State    Autostart   Persistent
------------------------------------------------
 default       active   yes         yes
 lab-network   active   yes         yes

 

Default (does provide internet access):

virsh # net-dumpxml default
<network>
  <name>default</name>
  <uuid>db01278f-bf88-44da-43d4-e0b4eb46f456</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr0' stp='on' delay='0'/>
  <mac address='52:54:00:72:08:e9'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254'/>
    </dhcp>
  </ip>
</network>

 

Lab-network:

<network ipv6='yes'>
  <name>lab-network</name>
  <uuid>e00fd28e-5bfc-4e83-8163-0c17e34562ae</uuid>
  <bridge name='virbr1' stp='on' delay='0'/>
  <mac address='52:54:00:05:a0:07'/>
</network>

 

What I am missing?

 

Rgds

 

Link to comment

I replay to myself as I think it is easier this way to explain what I realised. It may make more sense after that.

 

I attached the content of lab-network.xml (corresponds to virbr1 I am trying to set up) which contains this error: the IP network 192.168.122.0 I posted is the same as virbr0 (the one that is already provided by default by Unraid for virbr0).

 

I then changed it to a new not used network: 192.168.133.0 and this is what I get after asking virsh # net-dumpxml lab-network:

<network ipv6='yes'>
  <name>lab-network</name>
  <uuid>e00fd28e-5bfc-4e83-8163-0c17e34562ae</uuid>
  <bridge name='virbr1' stp='on' delay='0'/>
  <mac address='52:54:00:05:a0:07'/>
</network>

 

Still virbr1 is not up and running as virbr0. I pinged 192.168.133.1 from host and there is no answer.

 

So I thought maybe someone can tell me how virbr0 is defined and where is the config file stored ... and from there I could solve my problem with virbr1.

Edited by luca2
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.