
On Wed, Apr 13, 2011 at 15:03, <paul.worner@thomsonreuters.com> wrote:
Hi Jorge,
Hi! thanks for the reply Paul,
I am doing it by creating a bridge per vm. I am not sure this is the best approach. Hopefully, someone has a cleaner approach.
it is a good solution if nothing better comes up, i was thinking maybe there is a cleaner way as you say though, if not i will most definitely follow your lead, thank you!
I did need to add forward mode "route", since the vm's network is independent of the host's network(s) and I am routing.
<network> <name>netdom4</name> <forward mode="route"/> <bridge name="virbr%d" stp="off" delay="0"/> <ip address="10.0.0.1" netmask="255.255.255.252"> </ip> </network>
If you are not routing, you can set this mode to "nat" so the vm will get sourced from host's address. I haven't tried this, but I would assume the iptables nat rules are created automatically.
<forward mode="nat"/>
Hope this helps, Paul
-----Original Message----- From: libvirt-users-bounces@redhat.com [mailto:libvirt-users-bounces@redhat.com] On Behalf Of Jorge Somavilla Sent: Wednesday, April 13, 2011 7:29 AM To: libvirt-users@redhat.com Subject: [libvirt-users] point-to-point connection between vm and host
Hi! hopefully someone can give me a hint with this:
I need to create a vm with a point-to-point connection to the host using a /30 subnet. Right now i have this in the vm's xml for libvirt:
<interface type="network" name="eth0" onboot="yes"> <source network="default"/> <mac address="02:fd:00:00:01:00"/> </interface>
Which brings up an interface in the vm that is configured later by a a daemon, getting to this:
vnx@r2:~$ ifconfig eth0 eth0 Link encap:Ethernet HWaddr 02:fd:00:00:01:00 inet addr:10.250.0.2 Bcast:10.250.0.3 Mask:255.255.255.252
While in the host the other interface is created:
root@tau:/home/jorge/workspace/vnx# ifconfig r2-e0 r2-e0 Link encap:Ethernet HWaddr 0a:81:b6:3c:24:15 inet addr:10.250.0.1 Bcast:10.250.0.3 Mask:255.255.255.252
However there is no connectivity between them, probably because of some mistake in the <interface> tag, perhaps a wrong 'type' attribute, but i haven't found out yet. I wouldn't want to create a bridge and connect both interfaces (vm's and host's) to the bridge, but to have this ptp, if possible. How would i go about doing that?
thanks! Jorge
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users