[fedora-virt] networking in virtual machines using libvirt tools

Rich Mahn rich at lat.com
Thu Jul 23 19:01:40 UTC 2009


I am trying to set up a virtual machine that has a routable IP address
on the same subnet (and physically the same ethernet card) as the host
machine, running f11 on the host.

Using virsh and related, I can easily set up the network on the VM as
a natted IP with dhcp.  This is taken care of in the defaults for
virt-manager.  I can also set up, (but not quite as easily) the
network the way I want on a CentOS/XEN host.  Unfortunately CentOS
doesn't have a number of other features that I want/need.

So...is there some XML snippet I can add to the domain that will
do what I want automatically?  Or is there a script (or maybe I need
to write one) that can be invoked to set up the interfaces?

I would certainly be appreciative to get some pointers on how to proceed.

To make what I want a little clearer:

My host has a routable IP address such as 123.45.67.89.  I want my
VM to have the routable IP address 123.45.67.90.

I realize I could probably do this with iptables on the host and using
the 192.168.x.x IP on the VM, but then the VM has an incorrect idea of
it's correct IP.

Any help is appreciated.  Thanks.




More information about the Fedora-virt mailing list