<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 03/07/2014 03:13 PM, Aline Manera
      wrote:<br>
    </div>
    <blockquote cite="mid:531A0C3A.4070701@linux.vnet.ibm.com"
      type="cite">
      <br>
      It will not work in most of cases.
      <br>
      <br>
      1. The default network and storage pool is usually created by
      libvirt with the default values.
      <br>
      &nbsp;&nbsp; So an kimchi user will face the same issue while running kimchi
      on nested virtualization.
      <br>
      &nbsp;&nbsp; I.e, there is not way to fix it. Just warning the user about
      the problem.
      <br>
      <br>
      2. This issue is in some way related to
      <a class="moz-txt-link-freetext" href="https://github.com/kimchi-project/kimchi/issues/265">https://github.com/kimchi-project/kimchi/issues/265</a>
      <br>
      &nbsp;&nbsp; And why should not the user delete default network/storage
      pool?
      <br>
      &nbsp;&nbsp; This limitation should be impose to user when a network/storage
      pool is used by a template or vm.
      <br>
      &nbsp;&nbsp; Otherwise, the user can remove it.
      <br>
      <br>
      &nbsp;&nbsp; Usually the default network/storage pool is created by libvirt.
      <br>
      &nbsp;&nbsp; But some time ago, we identified it did not happen in some
      distros.
      <br>
      &nbsp;&nbsp; And as the Kimchi default configuration for templates is
      pointing to those resources we decided to
      <br>
      &nbsp;&nbsp; create them manually on kimchi code to avoid problems while
      using the templates.
      <br>
      <br>
      &nbsp;&nbsp; So my proposal is: let's revisit all the supported distros and
      check if libvirt creates default
      <br>
      &nbsp;&nbsp; network/storage pool by default, and if so remove this code
      from kimchi.
      <br>
      &nbsp;&nbsp; Then default network/storage pool will have the same behavior
      from other networks/storage pools.
      <br>
      <br>
      <br>
    </blockquote>
    <br>
    <p>So when starting kimchi we just need to make sure the default
      network/storage pool are active.<br>
      And activate them if needed.<br>
      For nested virtualization, the default network will fail to
      activate as the address is already in use.<br>
      In this case, we can get the properly error and automatically edit
      the default network for the user to get an unused address.</p>
    <p>So the steps to close issue #302 are:<br>
      1) Check if libvirt creates the default network/storage pool by
      default<br>
      &nbsp;&nbsp;&nbsp; 1.1) If so, remove this code from kimchi code<br>
      2) On Kimchi start up, make sure default network/storage pool are
      active.<br>
      &nbsp;&nbsp;&nbsp; 2.1) If network activate fails <em>because</em> of the
      address is already in use, kimchi automatically update the network
      address and start it.</p>
    <br>
    <br>
    <blockquote cite="mid:531A0C3A.4070701@linux.vnet.ibm.com"
      type="cite">On 03/07/2014 06:52 AM, <a class="moz-txt-link-abbreviated" href="mailto:shaohef@linux.vnet.ibm.com">shaohef@linux.vnet.ibm.com</a>
      wrote:
      <br>
      <blockquote type="cite">From: ShaoHe Feng
        <a class="moz-txt-link-rfc2396E" href="mailto:shaohef@linux.vnet.ibm.com">&lt;shaohef@linux.vnet.ibm.com&gt;</a>
        <br>
        <br>
        let 'create' attr of networks model to create the default
        network
        <br>
        <br>
        ShaoHe Feng (3):
        <br>
        &nbsp;&nbsp; move _default_network_check from top model to networks model
        <br>
        &nbsp;&nbsp; add a new function to get an available network address
        <br>
        &nbsp;&nbsp; Issue #302: let 'create' attr of networks model to create
        default
        <br>
        &nbsp;&nbsp;&nbsp;&nbsp; network
        <br>
        <br>
        &nbsp; src/kimchi/model/model.py&nbsp;&nbsp;&nbsp; | 35
        ---------------------------------
        <br>
        &nbsp; src/kimchi/model/networks.py | 46
        +++++++++++++++++++++++++++++++++++++-------
        <br>
        &nbsp; src/kimchi/network.py&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; 7 +++++--
        <br>
        &nbsp; 3 files changed, 44 insertions(+), 44 deletions(-)
        <br>
        <br>
      </blockquote>
      <br>
      _______________________________________________
      <br>
      Kimchi-devel mailing list
      <br>
      <a class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
      <br>
      <a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
      <br>
      <br>
    </blockquote>
    <br>
  </body>
</html>