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.
On Thu, 2009-07-23 at 15:01 -0400, Rich Mahn wrote:
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.
Have you seen this?
http://wiki.libvirt.org/page/Networking#Fedora.2FRHEL_Bridging
Unless I misunderstand, all you need to do is create a bridge for the interface in the host, connect the guest's network backend in the host and statically configure the guest's interface with that IP address.
Cheers, Mark.
On Thu, 2009-07-23 at 15:01 -0400, Rich Mahn wrote:
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.
Have you seen this?
http://wiki.libvirt.org/page/Networking#Fedora.2FRHEL_Bridging
Unless I misunderstand, all you need to do is create a bridge for the interface in the host, connect the guest's network backend in the host and statically configure the guest's interface with that IP address.
Cheers, Mark.
Thanks Mark. That is exactly what I was looking for. I'll try it out and report back.
Rich
=== snip snip ===
Have you seen this?
http://wiki.libvirt.org/page/Networking#Fedora.2FRHEL_Bridging
Unless I misunderstand, all you need to do is create a bridge for the interface in the host, connect the guest's network backend in the host and statically configure the guest's interface with that IP address.
Cheers, Mark.
Thanks Mark. That is exactly what I was looking for. I'll try it out and report back.
Rich
The instructions are for F9 and as such have a couple very minor problems. For example, I can't find lokkit for f11. However, other than that, I just pretty much followed the cookbook to get things working. I had a small problem with the networking until I noticed that the cookbook was configured for dhcp and I use fixed IPs. Once I corrected for that everything worked GREAT!!!!
I looked around the site and that wiki.libvirt.org has some really great information available.
Thanks loads.
rich