<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    On 8/29/2011 10:29 PM, Trey Dockendorf wrote:
    <blockquote
cite="mid:CAN0oX1YyPyxtjx6oEzbHPqocm=9SrDTi8R+h5oa1M6knuW1HuA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div>Have you looked into using virt-manager?  When I started
          using KVM I found that new VM provisioning was
          much simpler with that interface. <br>
        </div>
      </div>
    </blockquote>
    <br>
    Alas, Virtmanager doesn't seem to be a supported program under
    Gentoo - the distribution I use.  If its X-based, it wouldn't work
    anyhow - I'm strictly a command line shop.<br>
    <blockquote
cite="mid:CAN0oX1YyPyxtjx6oEzbHPqocm=9SrDTi8R+h5oa1M6knuW1HuA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div><br>
        </div>
        <div>Once you've created your domain with "virt-install" you can
          make changes using virsh.</div>
        <div><br>
        </div>
        <div>virsh -c qemu:///system edit Test</div>
        <div><br>
        </div>
        <div>That will allow you to directly edit the domain.</div>
        <div><br>
        </div>
        <div>In the virt-install line you used "bridge=br0" , maybe
          replace that with "bridge=tap5".  If that doesn't do it, once
          your editing the XML you can try something like the
          following...</div>
      </div>
    </blockquote>
    <br>
    I'm familiar with virsh edit and have used it to probe around a
    bit.  Actually tried the "bridge=tap5" a few days ago and get the
    message:<br>
    <br>
    <i>ERROR    internal error Failed to add tap interface to bridge.
      tap5 is not a bridge device</i><br>
    <br>
    <blockquote
cite="mid:CAN0oX1YyPyxtjx6oEzbHPqocm=9SrDTi8R+h5oa1M6knuW1HuA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div><br>
        </div>
        <div>
          <div>    <interface type='bridge'></div>
          <div>      <mac address='52:54:00:4d:74:c7'/></div>
          <div>      <source bridge='tap5'/></div>
          <div>      <model type='virtio'/></div>
          <div>      <address type='pci' domain='0x0000' bus='0x00'
            slot='0x03' function='0x0'/></div>
          <div>    </interface></div>
        </div>
        <div><br>
        </div>
        <div>That was created using virt-manager, so you probably need
          to use what virt-install created for your mac address and
          address.</div>
      </div>
    </blockquote>
    <br>
    Gave that a shot, attempting to create a new domain with "br0"
    replaced by "tap5" and got the same error message:<br>
    <br>
    <i>error: internal error Failed to add tap interface to bridge. tap5
      is not a bridge device</i><br>
    <br>
    <br>
    <blockquote
cite="mid:CAN0oX1YyPyxtjx6oEzbHPqocm=9SrDTi8R+h5oa1M6knuW1HuA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div><br>
        </div>
        <div>Is your init failing on /dev/vda3 and then kernel panic?
           If so it's likely your guest OS doesn't have the necessary
          kernel modules loaded.  Depending on your distro it will vary,
          but using CentOS 6 I've found they are automatically loaded.
           This is what's loaded in CentOS 6</div>
      </div>
    </blockquote>
    <br>
    Well, yes and no.  Its failing with a kernel panic because KVM is
    being started with if=none instead of if=virtio.  If I manually
    change it, it works fine.  Just need to know where to update that in
    the domain XML file.<br>
    <br>
    For what its worth, the image runs 100% fine with started manually
    with:<br>
    <br>
    <i>kvm -net nic,model=virtio -net tap,ifname=tap5,script=no  -drive
      file=test1.img,if=virtio,boot=on -curses -no-reboot -m 2g -smp 2</i><br>
    <br>
    So I know the image is good.<br>
    <br>
    <blockquote
cite="mid:CAN0oX1YyPyxtjx6oEzbHPqocm=9SrDTi8R+h5oa1M6knuW1HuA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div><br>
        </div>
        <div># lsmod | grep virtio</div>
        <div>
          <div>virtio_blk              5087  5 </div>
          <div>virtio_pci              6733  0 </div>
          <div>virtio_ring             7169  2 virtio_blk,virtio_pci</div>
          <div>virtio                  4824  2 virtio_blk,virtio_pci</div>
        </div>
        <div><br>
        </div>
        <div>Try changing the disk to ide , and then verifying your
          system is able to load the virtio modules.</div>
        <div><br>
        </div>
        <div>Also , once you have your XML the way you like, if your
          going to stick with command line look at using virsh though I
          highly recommend virt-manager.</div>
        <div><br>
        </div>
        <div>I'm still very new to KVM myself, so hopefully that was of
          some use</div>
        <div><br>
        </div>
        <div>- Trey</div>
      </div>
    </blockquote>
    <br>
    Thanks!<br>
    <br>
  </body>
</html>