<div class="markdown-here-wrapper" id="markdown-here-wrapper-634597" style="font-size:1em;font-family:Helvetica,arial,freesans,clean,sans-serif;color:rgb(34,34,34);background-color:rgb(255,255,255);border:none;line-height:1.2">

<p style="margin:1em 0px">Hi all, 

</p>
<p style="margin:1em 0px">I had created a redhat image by using kvm-img in qcow2 format. And it is uploaded to the openstack successfully. 

</p>
<p style="margin:1em 0px">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 <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline">ip link</code> and got following output

</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;white-space:pre;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background-color:rgb(248,248,255);background-repeat:initial initial">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</code></pre>
<p style="margin:1em 0px">It seems that the network bind itself to the second device. I want to know why it happeded and how to fix this?

</p>
<p style="margin:1em 0px">here is other config file

</p>
<p style="margin:1em 0px"><strong><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline">/etc/sysconfig/network-scripts/ifcfg-eth0</code> in the Vm</strong>

</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;white-space:pre;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background-color:rgb(248,248,255);background-repeat:initial initial">DEVICE="eth0"
BOOTPROTO="dhcp"
#HWADDR="52:54:00:12:34:56"
#NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
#UUID="e11caf36-bc22-48ee-8dbe-321043da29a5"</code></pre>
<p style="margin:1em 0px"><strong>there is not <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline">/etc/sysconfig/network-scripts/ifcfg-eth1</code> file</strong>

</p>
<p style="margin:1em 0px"><strong>the libvirt.xml for the vm</strong>

</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1em 0px"><code class="lang-xml xml" style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;display:inline;white-space:pre;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background-color:rgb(248,248,255);background-repeat:initial initial"><span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">domain</span> <span class="attribute" style="color:rgb(0,128,128)">type</span>=<span class="value" style="color:rgb(221,17,68)">"kvm"</span>></span>

  <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">uuid</span>></span>6309376e-6964-46d0-b8a4-7724dead39ff<span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">uuid</span>></span>
  <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">name</span>></span>instance-00000017<span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">name</span>></span>
  <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">memory</span>></span>2097152<span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">memory</span>></span>
  <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">vcpu</span>></span>1<span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">vcpu</span>></span>
  <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">os</span>></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">type</span>></span>hvm<span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">type</span>></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">boot</span> <span class="attribute" style="color:rgb(0,128,128)">dev</span>=<span class="value" style="color:rgb(221,17,68)">"hd"</span>/></span>
  <span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">os</span>></span>
  <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">features</span>></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">acpi</span>/></span>
  <span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">features</span>></span>
  <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">clock</span> <span class="attribute" style="color:rgb(0,128,128)">offset</span>=<span class="value" style="color:rgb(221,17,68)">"utc"</span>></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">timer</span> <span class="attribute" style="color:rgb(0,128,128)">name</span>=<span class="value" style="color:rgb(221,17,68)">"pit"</span> <span class="attribute" style="color:rgb(0,128,128)">tickpolicy</span>=<span class="value" style="color:rgb(221,17,68)">"delay"</span>/></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">timer</span> <span class="attribute" style="color:rgb(0,128,128)">name</span>=<span class="value" style="color:rgb(221,17,68)">"rtc"</span> <span class="attribute" style="color:rgb(0,128,128)">tickpolicy</span>=<span class="value" style="color:rgb(221,17,68)">"catchup"</span>/></span>
  <span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">clock</span>></span>
  <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">cpu</span> <span class="attribute" style="color:rgb(0,128,128)">mode</span>=<span class="value" style="color:rgb(221,17,68)">"host-model"</span> <span class="attribute" style="color:rgb(0,128,128)">match</span>=<span class="value" style="color:rgb(221,17,68)">"exact"</span>/></span>
  <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">devices</span>></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">disk</span> <span class="attribute" style="color:rgb(0,128,128)">type</span>=<span class="value" style="color:rgb(221,17,68)">"file"</span> <span class="attribute" style="color:rgb(0,128,128)">device</span>=<span class="value" style="color:rgb(221,17,68)">"disk"</span>></span>
      <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">driver</span> <span class="attribute" style="color:rgb(0,128,128)">name</span>=<span class="value" style="color:rgb(221,17,68)">"qemu"</span> <span class="attribute" style="color:rgb(0,128,128)">type</span>=<span class="value" style="color:rgb(221,17,68)">"qcow2"</span> <span class="attribute" style="color:rgb(0,128,128)">cache</span>=<span class="value" style="color:rgb(221,17,68)">"none"</span>/></span>
      <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">source</span> <span class="attribute" style="color:rgb(0,128,128)">file</span>=<span class="value" style="color:rgb(221,17,68)">"/var/lib/nova/instances/instance-00000017/disk"</span>/></span>
      <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">target</span> <span class="attribute" style="color:rgb(0,128,128)">bus</span>=<span class="value" style="color:rgb(221,17,68)">"virtio"</span> <span class="attribute" style="color:rgb(0,128,128)">dev</span>=<span class="value" style="color:rgb(221,17,68)">"vda"</span>/></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">disk</span>></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">interface</span> <span class="attribute" style="color:rgb(0,128,128)">type</span>=<span class="value" style="color:rgb(221,17,68)">"bridge"</span>></span>
      <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">mac</span> <span class="attribute" style="color:rgb(0,128,128)">address</span>=<span class="value" style="color:rgb(221,17,68)">"fa:16:3e:78:44:10"</span>/></span>
      <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">source</span> <span class="attribute" style="color:rgb(0,128,128)">bridge</span>=<span class="value" style="color:rgb(221,17,68)">"br100"</span>/></span>
      <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">filterref</span> <span class="attribute" style="color:rgb(0,128,128)">filter</span>=<span class="value" style="color:rgb(221,17,68)">"nova-instance-instance-00000017-fa163e784410"</span>></span>
        <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">parameter</span> <span class="attribute" style="color:rgb(0,128,128)">name</span>=<span class="value" style="color:rgb(221,17,68)">"IP"</span> <span class="attribute" style="color:rgb(0,128,128)">value</span>=<span class="value" style="color:rgb(221,17,68)">"10.0.0.2"</span>/></span>
        <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">parameter</span> <span class="attribute" style="color:rgb(0,128,128)">name</span>=<span class="value" style="color:rgb(221,17,68)">"DHCPSERVER"</span> <span class="attribute" style="color:rgb(0,128,128)">value</span>=<span class="value" style="color:rgb(221,17,68)">"10.0.0.3"</span>/></span>
        <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">parameter</span> <span class="attribute" style="color:rgb(0,128,128)">name</span>=<span class="value" style="color:rgb(221,17,68)">"PROJNET"</span> <span class="attribute" style="color:rgb(0,128,128)">value</span>=<span class="value" style="color:rgb(221,17,68)">"10.0.0.0"</span>/></span>
        <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">parameter</span> <span class="attribute" style="color:rgb(0,128,128)">name</span>=<span class="value" style="color:rgb(221,17,68)">"PROJMASK"</span> <span class="attribute" style="color:rgb(0,128,128)">value</span>=<span class="value" style="color:rgb(221,17,68)">"255.255.255.0"</span>/></span>
      <span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">filterref</span>></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">interface</span>></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">serial</span> <span class="attribute" style="color:rgb(0,128,128)">type</span>=<span class="value" style="color:rgb(221,17,68)">"file"</span>></span>
      <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">source</span> <span class="attribute" style="color:rgb(0,128,128)">path</span>=<span class="value" style="color:rgb(221,17,68)">"/var/lib/nova/instances/instance-00000017/console.log"</span>/></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">serial</span>></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">serial</span> <span class="attribute" style="color:rgb(0,128,128)">type</span>=<span class="value" style="color:rgb(221,17,68)">"pty"</span>/></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">input</span> <span class="attribute" style="color:rgb(0,128,128)">type</span>=<span class="value" style="color:rgb(221,17,68)">"tablet"</span> <span class="attribute" style="color:rgb(0,128,128)">bus</span>=<span class="value" style="color:rgb(221,17,68)">"usb"</span>/></span>
    <span class="tag" style="color:rgb(0,0,128);font-weight:normal"><<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">graphics</span> <span class="attribute" style="color:rgb(0,128,128)">type</span>=<span class="value" style="color:rgb(221,17,68)">"vnc"</span> <span class="attribute" style="color:rgb(0,128,128)">autoport</span>=<span class="value" style="color:rgb(221,17,68)">"yes"</span> <span class="attribute" style="color:rgb(0,128,128)">keymap</span>=<span class="value" style="color:rgb(221,17,68)">"en-us"</span> <span class="attribute" style="color:rgb(0,128,128)">listen</span>=<span class="value" style="color:rgb(221,17,68)">"192.168.0.98"</span>/></span>
  <span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">devices</span>></span>
<span class="tag" style="color:rgb(0,0,128);font-weight:normal"></<span class="title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(0,0,128);font-weight:normal">domain</span>></span></code></pre>
<p style="margin:1em 0px">thx </p>
</div><div class="markdown-here-signature">-- <br><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Lei Zhang</span></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><br>

</span></div><div><font face="arial, sans-serif">Blog: <a href="http://jeffrey4l.github.com" target="_blank">http://jeffrey4l.github.com</a></font></div><div>twitter/weibo: @jeffrey4l</div><br>
</div>