[Users] How to add internal networks

Hi, I'm using oVirt 3.2 on a single hosts with only one NIC. Currently there is only the ovirtmgmt network configured. But I need to add more networks, especially some internal networks like 192.168.x.y/24 need to be usable for VMs. From the oVirt Admin Portal this does not seem to be possible. It seems I cannot reuse the ovirtmgmt interface for any other network. Is this true? How am I supposed to add several networks in oVirt if I have just one NIC? Thanks - Frank

Hi, You have to define logical networks (in datacenter and assign to cluster) and configure these logical networks on your host (using hosts - network interfaces subtab). When using multiple logical networks on 1 physical nic you will need most likely VLAN tagging, as all vm networks are configured as a bridge in oVirt. See the following 2 links on how to tag your ovirtmgmt interface: http://lists.ovirt.org/pipermail/users/2013-May/014286.html http://lists.ovirt.org/pipermail/users/2013-May/014297.html Hope this helps. -- Best Regards René Koch Senior Solution Architect ============================================ ovido gmbh - "Das Linux Systemhaus" Brünner Stra03 163, A-1210 Wien Phone: +43 720 / 530 670 Mobile: +43 660 / 512 21 31 E-Mail: r.koch@ovido.at ============================================ On 05/13/2013 08:36 AM, Frank Wall wrote:
Hi,
I'm using oVirt 3.2 on a single hosts with only one NIC. Currently there is only the ovirtmgmt network configured. But I need to add more networks, especially some internal networks like 192.168.x.y/24 need to be usable for VMs.
From the oVirt Admin Portal this does not seem to be possible. It seems I cannot reuse the ovirtmgmt interface for any other network. Is this true? How am I supposed to add several networks in oVirt if I have just one NIC?
Thanks - Frank _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Hi René, Am 13.05.2013 09:56, schrieb René Koch (ovido):
When using multiple logical networks on 1 physical nic you will need most likely VLAN tagging, as all vm networks are configured as a bridge in oVirt.
unfortunately, using VLAN tagging is not an option for me, because I'm not the maintainer of the network devices (and my hosting provider won't configure VLANs for me). Is there another way to get multiple networks in oVirt up and running? FYI: The main purpose of these internal networks is a test environment for some VMs. Those VMs should be able to reach each other and to have internet access. Thanks - Frank

Hi Frank, Without the ability to control the networking devices in your vicinity and setup VLANs, what you're trying to do isn't supported via oVirt. However, assuming you do have root access to your host, I can suggest a workaround: * Create two dummy interfaces on the host, and give them static IP addresses. For example: 192.168.1.254/24, and 192.168.2.254/24. * Create two networks (Non-VM) called One and Two and attach them to the dummy NICs. * Create VMs with virtual NICs in network One, and VMs with virtual NICs in network Two. You can give them static IP addresses and supply the host's dummy interfaces as gateways, or enable a DHCP server on the host. * Enable routing on the host, and setup the appropriate rules so that he acts as a default gateway for all of the VMs, and that he forwards traffic appropriately between the VM networks. ----- Original Message ----- From: "Frank Wall" <fw@moov.de> To: users@ovirt.org Sent: Monday, May 13, 2013 2:06:53 PM Subject: Re: [Users] How to add internal networks Hi René, Am 13.05.2013 09:56, schrieb René Koch (ovido):
When using multiple logical networks on 1 physical nic you will need most likely VLAN tagging, as all vm networks are configured as a bridge in oVirt.
unfortunately, using VLAN tagging is not an option for me, because I'm not the maintainer of the network devices (and my hosting provider won't configure VLANs for me). Is there another way to get multiple networks in oVirt up and running? FYI: The main purpose of these internal networks is a test environment for some VMs. Those VMs should be able to reach each other and to have internet access. Thanks - Frank _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Correction: The two networks should be VM networks. ----- Original Message ----- From: "Assaf Muller" <amuller@redhat.com> To: "Frank Wall" <fw@moov.de> Cc: users@ovirt.org Sent: Monday, May 13, 2013 4:05:16 PM Subject: Re: [Users] How to add internal networks Hi Frank, Without the ability to control the networking devices in your vicinity and setup VLANs, what you're trying to do isn't supported via oVirt. However, assuming you do have root access to your host, I can suggest a workaround: * Create two dummy interfaces on the host, and give them static IP addresses. For example: 192.168.1.254/24, and 192.168.2.254/24. * Create two networks (Non-VM) called One and Two and attach them to the dummy NICs. * Create VMs with virtual NICs in network One, and VMs with virtual NICs in network Two. You can give them static IP addresses and supply the host's dummy interfaces as gateways, or enable a DHCP server on the host. * Enable routing on the host, and setup the appropriate rules so that he acts as a default gateway for all of the VMs, and that he forwards traffic appropriately between the VM networks. ----- Original Message ----- From: "Frank Wall" <fw@moov.de> To: users@ovirt.org Sent: Monday, May 13, 2013 2:06:53 PM Subject: Re: [Users] How to add internal networks Hi René, Am 13.05.2013 09:56, schrieb René Koch (ovido):
When using multiple logical networks on 1 physical nic you will need most likely VLAN tagging, as all vm networks are configured as a bridge in oVirt.
unfortunately, using VLAN tagging is not an option for me, because I'm not the maintainer of the network devices (and my hosting provider won't configure VLANs for me). Is there another way to get multiple networks in oVirt up and running? FYI: The main purpose of these internal networks is a test environment for some VMs. Those VMs should be able to reach each other and to have internet access. Thanks - Frank _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Hi Asaf, Am 13.05.2013 15:05, schrieb Assaf Muller:
Without the ability to control the networking devices in your vicinity and setup VLANs, what you're trying to do isn't supported via oVirt.
I was already guessing that it is not supported. Thanks for the "official" confirmation.
* Create two dummy interfaces on the host, and give them static IP addresses. For example: 192.168.1.254/24, and 192.168.2.254/24.
OK, I've populated the required files... /etc/modules-load.d/dummy.conf /etc/modprobe.d/dummy.conf /etc/sysconfig/network-scripts/ifcfg-dummy0 ...and after a reboot I have a new dummy NIC configured: dummy0: flags=195<UP,BROADCAST,RUNNING,NOARP> mtu 1500 inet 192.168.0.254 netmask 255.255.255.0 broadcast 192.168.0.255 ether 5e:61:0f:e7:f9:bc txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 3 bytes 210 (210.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
* Create two networks (VM) called One and Two and attach them to the dummy NICs.
Unfortunately, this does not work as described. I was able to create the new VM network from the Admin Portal successfully, but I am unable to attach this network to the dummy NIC. When I choose the "Setup Host Networks" option from the Admin Portal: My Datacenter => My Cluster => Hosts => My Host => TAB: Network Interfaces -> Setup Host Networks The dummy NIC is NOT listed, but only the physical NIC (with ovirtmgmt attached to it). Is this expected? Does oVirt suppress any non-physical NICs? Is there another way to attach the VM network to my dummy NIC? Thanks - Frank

Hello Frank, I suspect the problem is that VDSM isn't told by default to pass dummy NICs on to the engine. Have a look at the following file (exact path might vary): /usr/lib64/python2.7/site-packages/vdsm/config.py Search for a variable called "fake_nics", it should exist for 3.2. By default it is empty, but you may define a pattern for fake NIC names to be passed to the engine (in your case probably "dummy*"). Restart the vdsm daemon and everything should be fine. Maybe you'll have to move the host to maintenance and then reactivate just to refresh the UI. Please let us know if that works. Yours, Lior. On 16/05/13 15:48, Frank Wall wrote:
Hi Asaf,
Am 13.05.2013 15:05, schrieb Assaf Muller:
Without the ability to control the networking devices in your vicinity and setup VLANs, what you're trying to do isn't supported via oVirt.
I was already guessing that it is not supported. Thanks for the "official" confirmation.
* Create two dummy interfaces on the host, and give them static IP addresses. For example: 192.168.1.254/24, and 192.168.2.254/24.
OK, I've populated the required files...
/etc/modules-load.d/dummy.conf /etc/modprobe.d/dummy.conf /etc/sysconfig/network-scripts/ifcfg-dummy0
...and after a reboot I have a new dummy NIC configured:
dummy0: flags=195<UP,BROADCAST,RUNNING,NOARP> mtu 1500 inet 192.168.0.254 netmask 255.255.255.0 broadcast 192.168.0.255 ether 5e:61:0f:e7:f9:bc txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 3 bytes 210 (210.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
* Create two networks (VM) called One and Two and attach them to the dummy NICs.
Unfortunately, this does not work as described. I was able to create the new VM network from the Admin Portal successfully, but I am unable to attach this network to the dummy NIC.
When I choose the "Setup Host Networks" option from the Admin Portal: My Datacenter => My Cluster => Hosts => My Host => TAB: Network Interfaces -> Setup Host Networks The dummy NIC is NOT listed, but only the physical NIC (with ovirtmgmt attached to it).
Is this expected? Does oVirt suppress any non-physical NICs? Is there another way to attach the VM network to my dummy NIC?
Thanks - Frank _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Hi Lior, Am 16.05.2013 16:12, schrieb Lior Vernia:
Search for a variable called "fake_nics", it should exist for 3.2. By default it is empty, but you may define a pattern for fake NIC names to be passed to the engine (in your case probably "dummy*"). Restart the vdsm daemon and everything should be fine. Maybe you'll have to move the host to maintenance and then reactivate just to refresh the UI.
IT WORKS! :-) Restarting vdsmd was sufficient. Attaching the network to the dummy NIC worked like a charm and a test VM is able to communicate with the Node's dummy NIC. (I just need to setup routing on the Node to get communication with the outside world running.) --- /usr/lib64/python2.7/site-packages/vdsm/config.py.orig 2013-03-14 11:32:54.000000000 +0100 +++ /usr/lib64/python2.7/site-packages/vdsm/config.py 2013-05-16 16:34:27.722959670 +0200 @@ -38,7 +38,7 @@ ('extra_mem_reserve', '65', 'Memory reserved for non-vds-administered programs.'), - ('fake_nics', '', + ('fake_nics', 'dummy*', 'Comma-separated list of fnmatch-patterns for dummy hosts nics to ' 'be shown to vdsm.'), Is there a chance to change it from a hard-coded value to a configurable item in a future release of oVirt? Or maybe have a better default value (dummy*) in a bugfix release? Thanks - Frank

Hi, just installed oVirt 3.3 and noticed that the suggestion from this thread was included:
--- /usr/lib64/python2.7/site-packages/vdsm/config.py.orig 2013-03-14 11:32:54.000000000 +0100 +++ /usr/lib64/python2.7/site-packages/vdsm/config.py 2013-05-16 16:34:27.722959670 +0200 @@ -38,7 +38,7 @@ ('extra_mem_reserve', '65', 'Memory reserved for non-vds-administered programs.'),
- ('fake_nics', '', + ('fake_nics', 'dummy*', 'Comma-separated list of fnmatch-patterns for dummy hosts nics to ' 'be shown to vdsm.'),
The suggestion was to include a pattern which makes it possible to use dummy NICs in oVirt, but I think there is a typo: --- /usr/lib64/python2.7/site-packages/vdsm/config.py.orig 2013-08-22 18:02:57.000000000 +0200 +++ /usr/lib64/python2.7/site-packages/vdsm/config.py 2013-08-25 20:02:54.123248727 +0200 @@ -38,7 +38,7 @@ ('extra_mem_reserve', '65', 'Memory reserved for non-vds-administered programs.'), - ('fake_nics', 'dummy_*', + ('fake_nics', 'dummy*', 'Comma-separated list of fnmatch-patterns for dummy hosts nics to ' 'be shown to vdsm.'), As you can see, the new pattern includes dummy NICs, but expect the devices to be prefixes with "dummy_". Apparently the underscore does not work. The pattern should expect "dummy*" instead. I did the modification locally and dummy NICs are working again. Any chance to get this fixed for 3.3 oder maybe 3.3.1? Thanks - Frank

Hi Frank, ----- Original Message -----
From: "Frank Wall" <fw@moov.de> To: users@ovirt.org Sent: Sunday, August 25, 2013 10:38:30 PM Subject: Re: [Users] How to add internal networks
Hi,
just installed oVirt 3.3 and noticed that the suggestion from this thread was included:
--- /usr/lib64/python2.7/site-packages/vdsm/config.py.orig 2013-03-14 11:32:54.000000000 +0100 +++ /usr/lib64/python2.7/site-packages/vdsm/config.py 2013-05-16 16:34:27.722959670 +0200 @@ -38,7 +38,7 @@ ('extra_mem_reserve', '65', 'Memory reserved for non-vds-administered programs.'),
- ('fake_nics', '', + ('fake_nics', 'dummy*', 'Comma-separated list of fnmatch-patterns for dummy hosts nics to ' 'be shown to vdsm.'),
The suggestion was to include a pattern which makes it possible to use dummy NICs in oVirt, but I think there is a typo:
--- /usr/lib64/python2.7/site-packages/vdsm/config.py.orig 2013-08-22 18:02:57.000000000 +0200 +++ /usr/lib64/python2.7/site-packages/vdsm/config.py 2013-08-25 20:02:54.123248727 +0200 @@ -38,7 +38,7 @@ ('extra_mem_reserve', '65', 'Memory reserved for non-vds-administered programs.'),
- ('fake_nics', 'dummy_*', + ('fake_nics', 'dummy*', 'Comma-separated list of fnmatch-patterns for dummy hosts nics to ' 'be shown to vdsm.'),
As you can see, the new pattern includes dummy NICs, but expect the devices to be prefixes with "dummy_". Apparently the underscore does not work. The pattern should expect "dummy*" instead. I did the modification locally and dummy NICs are working again.
The new pattern is set as 'dummy_' so that the functional tests use dummies with a different naming conventions that the default kernel pattern of dummy*. Note that you can create dummies with any name you want with ip link add drummy type dummy So you could potentially create your own dummy_250, for example.
Any chance to get this fixed for 3.3 oder maybe 3.3.1?
Thanks - Frank _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

On 26.08.2013 09:36, Antoni Segura Puimedon wrote:
Note that you can create dummies with any name you want with ip link add drummy type dummy So you could potentially create your own dummy_250, for example.
This is quirky :-( The usual way to add dummy interfaces would be to create /etc/modprobe.d/dummy.conf and add these lines: alias dummy0 dummy alias dummy1 dummy alias dummy2 dummy options dummy numdummies=3 Unfortunately, I was not able to add dummy_* devices using this method, guessing dummy_0 is not supported here. Any hint on this? Thanks - Frank

This also still works as well: http://lists.ovirt.org/pipermail/users/2012-April/007385.html - DHC On Thu, May 16, 2013 at 9:12 AM, Lior Vernia <lvernia@redhat.com> wrote:
Hello Frank,
I suspect the problem is that VDSM isn't told by default to pass dummy NICs on to the engine. Have a look at the following file (exact path might vary):
/usr/lib64/python2.7/site-packages/vdsm/config.py
Search for a variable called "fake_nics", it should exist for 3.2. By default it is empty, but you may define a pattern for fake NIC names to be passed to the engine (in your case probably "dummy*"). Restart the vdsm daemon and everything should be fine. Maybe you'll have to move the host to maintenance and then reactivate just to refresh the UI.
Please let us know if that works.
Yours, Lior.
On 16/05/13 15:48, Frank Wall wrote:
Hi Asaf,
Am 13.05.2013 15:05, schrieb Assaf Muller:
Without the ability to control the networking devices in your vicinity and setup VLANs, what you're trying to do isn't supported via oVirt.
I was already guessing that it is not supported. Thanks for the "official" confirmation.
* Create two dummy interfaces on the host, and give them static IP addresses. For example: 192.168.1.254/24, and 192.168.2.254/24.
OK, I've populated the required files...
/etc/modules-load.d/dummy.conf /etc/modprobe.d/dummy.conf /etc/sysconfig/network-scripts/ifcfg-dummy0
...and after a reboot I have a new dummy NIC configured:
dummy0: flags=195<UP,BROADCAST,RUNNING,NOARP> mtu 1500 inet 192.168.0.254 netmask 255.255.255.0 broadcast 192.168.0.255 ether 5e:61:0f:e7:f9:bc txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 3 bytes 210 (210.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
* Create two networks (VM) called One and Two and attach them to the dummy NICs.
Unfortunately, this does not work as described. I was able to create the new VM network from the Admin Portal successfully, but I am unable to attach this network to the dummy NIC.
When I choose the "Setup Host Networks" option from the Admin Portal: My Datacenter => My Cluster => Hosts => My Host => TAB: Network Interfaces -> Setup Host Networks The dummy NIC is NOT listed, but only the physical NIC (with ovirtmgmt attached to it).
Is this expected? Does oVirt suppress any non-physical NICs? Is there another way to attach the VM network to my dummy NIC?
Thanks - Frank _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
participants (6)
-
"René Koch (ovido)"
-
Antoni Segura Puimedon
-
Assaf Muller
-
Dead Horse
-
Frank Wall
-
Lior Vernia