[Users] ovirt and NAT/Internal Networks
Dead Horse
deadhorseconsulting at gmail.com
Mon Apr 23 17:49:22 EDT 2012
I have tried to create a NAT network within ovirt for guests to use via
libvirt/virsh as the vdsm at rhevh on an ovirt node.
Something like this:
virsh # net-info nat
Name nat
UUID b09d09a8-ebbd-476d-9045-e66012c9e83d
Active: yes
Persistent: yes
Autostart: yes
Bridge: natbr0
virsh # net-list --all
Name State Autostart
-----------------------------------------
nat active yes
vdsm-natbr0 active yes
vdsm-ovirtmgmt active yes
virsh #
virsh # net-edit nat
<network>
<name>nat</name>
<uuid>b09d09a8-ebbd-476d-9045-e66012c9e83d</uuid>
<forward mode='nat'/>
<bridge name='natbr0' stp='on' delay='0' />
<mac address='52:54:00:9D:82:DE'/>
<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>
Set net.ipv4.ip_forward = 1 in sysctl.conf
This is basically the default libvirt NAT network. Connecting a VM directly
to it via cli (qemu-kvm) works perfectly fine on the ovirt host itself but
the ovirt manager UI does not seem to pick up on it or allow for creation
of such a network for guests to use.
Since the ovirt manager UI did not allow I dug into the database and added
entries which seem to have been necessary by hand to the following engine
database tables:
table: network
table: network_cluster
table: vds_interface
table: vds_interface_statistics
The result was the network did show up under cluster logical networks.
However the network still does not show up under the host Network
Interfaces UI. Was able to create VM and attach the natbr0 network to it
and NAT was indeed working. (EG: DNSmasq assigned address). The guest was
able to communicate out and without extensive testing things seemed to work.
This was very painful to do (and hacky). Thus it would be very nice if
since this is OOB functionality of libvirt/KVM, if ovirt would allow for it
to be used. The ability to provide NAT or internal networks to guests would
quite useful.
- DHC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20120423/498249a7/attachment-0002.html>
More information about the Users
mailing list