← Back to team overview

openstack team mailing list archive

The Image binding the netwrok to the eth1 in default

 

Hi all,

I had created a redhat image by using kvm-img in qcow2 format. And it is
uploaded to the openstack successfully.

But when I lanuch a instance and access it over the vnc, the network(in
default, just the eth0 device is up on boot) is not startup. I check the
the vm by using ip link and got following output

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP qlen 1000
    link/ether fa:16:3e:78:44:10 brd ff:ff:ff:ff:ff:ff

It seems that the network bind itself to the second device. I want to know
why it happeded and how to fix this?

here is other config file

*/etc/sysconfig/network-scripts/ifcfg-eth0 in the Vm*

DEVICE="eth0"
BOOTPROTO="dhcp"
#HWADDR="52:54:00:12:34:56"
#NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
#UUID="e11caf36-bc22-48ee-8dbe-321043da29a5"

*there is not /etc/sysconfig/network-scripts/ifcfg-eth1 file*

*the libvirt.xml for the vm*

<domain type="kvm">

  <uuid>6309376e-6964-46d0-b8a4-7724dead39ff</uuid>
  <name>instance-00000017</name>
  <memory>2097152</memory>
  <vcpu>1</vcpu>
  <os>
    <type>hvm</type>
    <boot dev="hd"/>
  </os>
  <features>
    <acpi/>
  </features>
  <clock offset="utc">
    <timer name="pit" tickpolicy="delay"/>
    <timer name="rtc" tickpolicy="catchup"/>
  </clock>
  <cpu mode="host-model" match="exact"/>
  <devices>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2" cache="none"/>
      <source file="/var/lib/nova/instances/instance-00000017/disk"/>
      <target bus="virtio" dev="vda"/>
    </disk>
    <interface type="bridge">
      <mac address="fa:16:3e:78:44:10"/>
      <source bridge="br100"/>
      <filterref filter="nova-instance-instance-00000017-fa163e784410">
        <parameter name="IP" value="10.0.0.2"/>
        <parameter name="DHCPSERVER" value="10.0.0.3"/>
        <parameter name="PROJNET" value="10.0.0.0"/>
        <parameter name="PROJMASK" value="255.255.255.0"/>
      </filterref>
    </interface>
    <serial type="file">
      <source path="/var/lib/nova/instances/instance-00000017/console.log"/>
    </serial>
    <serial type="pty"/>
    <input type="tablet" bus="usb"/>
    <graphics type="vnc" autoport="yes" keymap="en-us" listen="192.168.0.98"/>
  </devices></domain>

thx
-- 
Lei Zhang

Blog: http://jeffrey4l.github.com
twitter/weibo: @jeffrey4l

Follow ups