[Fedora-xen] Fedora 7 - missing dummy interfaces

David Mueller dsm717 at gmail.com
Thu Aug 23 23:17:55 UTC 2007


I'm making progress, but I've run into a couple issues.  I've created
the following three xml files for the three networks (I'm only
worrying about one of the virtual machines now; once I get it working
I should be able to replicate it for the other):

<network>
  <name>emu0</name>
  <uuid>8d18febd-e295-4e67-9373-a8b2a5855e60</uuid>
  <bridge name='emubr0' stp='on' forwardDelay='0' />
  <ip address='128.10.0.253' netmask='255.255.255.0' />
</network>

<network>
  <name>emu2</name>
  <uuid>8d18febd-e295-4e67-9373-a8b2a5855e62</uuid>
  <bridge name='emubr2' stp='on' forwardDelay='0' />
</network>

<network>
  <name>emu3</name>
  <uuid>8d18febd-e295-4e67-9373-a8b2a5855e63</uuid>
  <bridge name='emubr3' stp='on' forwardDelay='0' />
</network>

emu2 and emu3 networks I didn't assign an IP address to since the host
doesn't need one; they will be exclusively for VM to VM communcation.
emu0 (and in the future emu1) will be used for communication between
host and VM -- each will be a different subnet.

And here is the xml dump of the VM, taken while its running:

<domain type='kvm' id='5'>
  <name>emu0</name>
  <uuid>9b517b2c-b315-62fc-626b-2525e2576217</uuid>
  <memory>262144</memory>
  <currentMemory>262144</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <source file='/home/david/emu/kvm/f7_emu0.img'/>
      <target dev='hda'/>
    </disk>
    <interface type='network'>
      <mac address='1e:11:11:11:11:10'/>
      <source network='emu0'/>
      <target dev='vnet0'/>
    </interface>
    <interface type='network'>
      <mac address='1e:11:11:11:11:11'/>
      <source network='emu2'/>
      <target dev='vnet1'/>
    </interface>
    <interface type='network'>
      <mac address='1e:11:11:11:11:12'/>
      <source network='emu3'/>
      <target dev='vnet2'/>
    </interface>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5900' listen='127.0.0.1'/>
  </devices>
</domain>

The first problem is that I can't get the guest VM to communicate with
the host.  I assign an address to the interface with this command:

# /sbin/ifconfig eth0 128.10.0.1/24 up

Then I attempt to ping the host, but get an error message Destinamtion
Host Unreachable.  The same happens if I try to ping the guest from
the host.

I did notice an additional oddity.  While the three interfaces all
show their correct MAC addresses in the Hardware tab of the Virtual
Machine Details tab, if I run ifconfig within the guest, all three
show the same address, 1E:11:11:11:11:12 (which should be eth2's MAC
address).

- David

On 8/22/07, Daniel P. Berrange <berrange at redhat.com> wrote:
> On Wed, Aug 22, 2007 at 07:04:55PM -0700, David Mueller wrote:
> > On 8/22/07 Daniel P. Berrange wrote:
> > >virt-manager will happily use bridging for KVM guests if you setup
> > >your host so that its physical interfaces are part of a bridge.
> >
> > Actually, that's not quite what I need.  The final setup will have two
> > guest machines, each with an eth0 to communicate with the Domain 0 host.
> >  Each also will have a virtual eth1 and and eth2 that is used for
> > communication between the two VMs.  The virtual machines need to
> > commuincate only with each other and the host; they don't actually need
> > to connect to the network.  Because this will run in an isolated network
> > not connected to the Internet, we're not restricted to private address
> > space and it would be much more work to remap all the addresses we use
> > to be only in private address space.
>
> Ok, that makes sense. virt-manager restricts you to only allow private
> address spaces - we could relax that to a warning. In the mean time you
> could use 'virsh net-define' to setup a virtual network using a public
> IP address range, and virsh doesn't enforce addresing policy. Use the
> take a look at /usr/share/libvirt for an example XML file you can tweak.
> For an isolated network, simply remove the <forward/> tag.
>
> Dan.
> --
> |=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496
> -=|
> |=-           Perl modules: http://search.cpan.org/~danberr/
> -=|
> |=-               Projects: http://freshmeat.net/~danielpb/
> -=|
> |=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505
> -=|
>




More information about the Fedora-xen mailing list