<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">I started out with lxd but ran into
      problems when I tried googling for instructions on how to assign a
      static IP address to a container.  All of the instructions I found
      said to edit /var/lib/lxc/<container>/config, and there was
      no /var/lib/lxc/ directory.  So I uninstalled lxd and installed
      lxc instead.<br>
      <br>
      Michael<br>
      <br>
      <br>
      <br>
      On 10/20/2016 01:59 PM, McDonagh, Ed wrote:<br>
    </div>
    <blockquote
cite="mid:958BC02A5AE38D4EB51ED22A42412F5B0191E66D65@SUTXCH08.ad.rmh.nhs.uk"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="Generator" content="Microsoft Word 14 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I’m
            very much not a guru on this topic, but it strikes me to
            check if you are using lxc for a reason, rather than using
            lxd?<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">If
            you don’t have a legacy reason, I don’t know why you
            wouldn’t want to use the new tools that are being developed.
            <o:p></o:p></span></p>
        <p class="MsoNormal"><a moz-do-not-send="true"
            name="_MailEndCompose"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></a></p>
        <div>
          <div style="border:none;border-top:solid #B5C4DF
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"
                  lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"
                lang="EN-US"> lxc-users
                [<a class="moz-txt-link-freetext" href="mailto:lxc-users-bounces@lists.linuxcontainers.org">mailto:lxc-users-bounces@lists.linuxcontainers.org</a>]
                <b>On Behalf Of </b>Michael Peek<br>
                <b>Sent:</b> 20 October 2016 18:57<br>
                <b>To:</b> LXC users mailing-list<br>
                <b>Subject:</b> Re: [lxc-users] LXC containers w/ static
                IPs work on some hosts, not on others<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <p class="MsoNormal">There is no lxc-profile command, and
            lxc-ls and lxc-info don't list anything about a profile.  I
            have no idea if that means anything.<br>
            <br>
            Michael<br>
            <br>
            <br>
            <br>
            On 10/20/2016 01:53 PM, McDonagh, Ed wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">It
              will be the new lxc software, but without the niceness of
              the lxd interface.</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hence
              all his commands being lxc-command instead of lxc command</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
          <div>
            <div style="border:none;border-top:solid #B5C4DF
              1.0pt;padding:3.0pt 0cm 0cm 0cm">
              <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""
                    lang="EN-US">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif""
                  lang="EN-US"> lxc-users [<a moz-do-not-send="true"
                    href="mailto:lxc-users-bounces@lists.linuxcontainers.org">mailto:lxc-users-bounces@lists.linuxcontainers.org</a>]
                  <b>On Behalf Of </b>Ron Kelley<br>
                  <b>Sent:</b> 20 October 2016 18:51<br>
                  <b>To:</b> LXC users mailing-list<br>
                  <b>Subject:</b> Re: [lxc-users] LXC containers w/
                  static IPs work on some hosts, not on others</span><o:p></o:p></p>
            </div>
          </div>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">hmmm, seems you are running the
            “original” version of lxc and not the new lxc/lxd software.
             Please ignore my comments then…<o:p></o:p></p>
          <div>
            <p class="MsoNormal"> <o:p></o:p></p>
          </div>
          <div>
            <p class="MsoNormal"> <o:p></o:p></p>
            <div>
              <div>
                <p class="MsoNormal">On Oct 20, 2016, at 1:47 PM,
                  Michael Peek <<a moz-do-not-send="true"
                    href="mailto:peek@nimbios.org">peek@nimbios.org</a>>
                  wrote:<o:p></o:p></p>
              </div>
              <p class="MsoNormal"> <o:p></o:p></p>
              <div>
                <div>
                  <div>
                    <p class="MsoNormal"># lxc profile show<br>
                      The program 'lxc' is currently not installed. You
                      can install it by typing:<br>
                      apt install lxd-client<br>
                      <br>
                      Maybe that's part of the problem?  Am I missing a
                      package?  Here are the packages I have installed
                      for lxc:<br>
                      <br>
                      # dpkg -l | grep lxc | cut -c1-20<br>
                      ii  liblxc1         <br>
                      ii  lxc             <br>
                      ii  lxc-common      <br>
                      ii  lxc-templates   <br>
                      ii  lxc1            <br>
                      ii  lxcfs           <br>
                      ii  python3-lxc     <br>
                      <br>
                      Michael<br>
                      <br>
                      On 10/20/2016 01:43 PM, Ron Kelley wrote:<o:p></o:p></p>
                  </div>
                  <blockquote
                    style="margin-top:5.0pt;margin-bottom:5.0pt">
                    <div>
                      <p class="MsoNormal">"lxc profile show”.  Usually,
                        you have a default profile that gets applied to
                        your container unless you have created a
                        new/custom profile.<o:p></o:p></p>
                    </div>
                    <div>
                      <p class="MsoNormal"> <o:p></o:p></p>
                    </div>
                    <div>
                      <p class="MsoNormal"> <o:p></o:p></p>
                    </div>
                    <div>
                      <p class="MsoNormal"> <o:p></o:p></p>
                    </div>
                    <div>
                      <p class="MsoNormal"> <o:p></o:p></p>
                    </div>
                    <div>
                      <p class="MsoNormal"> <o:p></o:p></p>
                      <div>
                        <div>
                          <p class="MsoNormal">On Oct 20, 2016, at 1:41
                            PM, Michael Peek <<a
                              moz-do-not-send="true"
                              href="mailto:peek@nimbios.org">peek@nimbios.org</a>>
                            wrote:<o:p></o:p></p>
                        </div>
                        <p class="MsoNormal"> <o:p></o:p></p>
                        <div>
                          <div>
                            <div>
                              <p class="MsoNormal">How do I tell?<br>
                                <br>
                                Michael<br>
                                <br>
                                <br>
                                <br>
                                On 10/20/2016 01:35 PM, Ron Kelley
                                wrote:<o:p></o:p></p>
                            </div>
                            <blockquote
                              style="margin-top:5.0pt;margin-bottom:5.0pt">
                              <p class="MsoNormal">What profile(s) are
                                you using for your LXC containers? <o:p>
                                </o:p></p>
                              <div>
                                <p class="MsoNormal"> <o:p></o:p></p>
                              </div>
                              <div>
                                <p class="MsoNormal"> <o:p></o:p></p>
                              </div>
                              <div>
                                <p class="MsoNormal"> <o:p></o:p></p>
                                <div>
                                  <div>
                                    <p class="MsoNormal">On Oct 20,
                                      2016, at 1:33 PM, Michael Peek
                                      <<a moz-do-not-send="true"
                                        href="mailto:peek@nimbios.org">peek@nimbios.org</a>>
                                      wrote:<o:p></o:p></p>
                                  </div>
                                  <p class="MsoNormal"> <o:p></o:p></p>
                                  <div>
                                    <div>
                                      <p class="MsoNormal"
                                        style="margin-bottom:12.0pt">Hi
                                        gurus,<br>
                                        <br>
                                        I'm scratching my head again. 
                                        I'm using the following commands
                                        to create an LXC container with
                                        a static IP address:<o:p></o:p></p>
                                      <p class="MsoNormal"># lxc-create
                                        -n my-container-1 -t download --
                                        -d ubuntu -r xenial -a amd64<br>
                                        <br>
                                        # vi
                                        /var/lib/lxc/my-container-1/config<br>
                                        <br>
                                        Change:<br>
                                        # Network configuration<br>
                                        # lxc.network.type = veth<br>
                                        # lxc.network.link = lxcbr0<br>
                                        # lxc.network.flags = up<br>
                                        # lxc.network.hwaddr =
                                        00:16:3e:0d:ec:13<br>
                                        lxc.network.type = macvlan<br>
                                        lxc.network.link = eno1<br>
                                        <br>
                                        # vi
                                        /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces<br>
                                        <br>
                                        Change:<br>
                                        #iface eth0 inet dhcp<br>
                                        iface eth0 inet static<br>
                                          address xxx.xxx.xxx.4<br>
                                          netmask 255.255.255.0<br>
                                          network xxx.xxx.xxx.0<br>
                                          broadcast xxx.xxx.xxx.255<br>
                                          gateway xxx.xxx.xxx.1<br>
                                          dns-nameservers xxx.xxx.0.66
                                        xxx.xxx.128.66 8.8.8.8<br>
                                          dns-search my.domain<br>
                                        <br>
                                        # lxc-start -n my-container-1 -d<o:p></o:p></p>
                                      <p class="MsoNormal"><br>
                                        It failed to work.  I reviewed
                                        my notes from past posts to the
                                        list but found no
                                        discrepancies.  So I deleted the
                                        container and tried it on
                                        another host -- and it worked. 
                                        Next I deleted that container
                                        and went back to the first host,
                                        and it failed.  Lastly, I tried
                                        the above steps on multiple
                                        hosts and found that it works
                                        fine on some hosts, but not on
                                        others, and I have no idea why. 
                                        On hosts where this fails there
                                        are no error messages, but the
                                        container can't access the
                                        network, and nothing on the
                                        network can access the
                                        container.<br>
                                        <br>
                                        Is there some step that I'm
                                        missing?<br>
                                        <br>
                                        Thanks for any help,<br>
                                        <br>
                                        Michael Peek<o:p></o:p></p>
                                    </div>
                                    <p class="MsoNormal">_______________________________________________<br>
                                      lxc-users mailing list<br>
                                      <a moz-do-not-send="true"
                                        href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
                                      <a moz-do-not-send="true"
                                        href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a><o:p></o:p></p>
                                  </div>
                                </div>
                                <p class="MsoNormal"> <o:p></o:p></p>
                              </div>
                              <p class="MsoNormal"><br>
                                <br>
                                <br>
                                <br>
                                <o:p></o:p></p>
                              <pre>_______________________________________________<o:p></o:p></pre>
                              <pre>lxc-users mailing list<o:p></o:p></pre>
                              <pre><a moz-do-not-send="true" href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><o:p></o:p></pre>
                              <pre><a moz-do-not-send="true" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a><o:p></o:p></pre>
                            </blockquote>
                            <p class="MsoNormal"> <o:p></o:p></p>
                          </div>
                          <p class="MsoNormal">_______________________________________________<br>
                            lxc-users mailing list<br>
                            <a moz-do-not-send="true"
                              href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
                            <a moz-do-not-send="true"
                              href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a><o:p></o:p></p>
                        </div>
                      </div>
                      <p class="MsoNormal"> <o:p></o:p></p>
                    </div>
                    <p class="MsoNormal"><br>
                      <br>
                      <br>
                      <br>
                      <o:p></o:p></p>
                    <pre>_______________________________________________<o:p></o:p></pre>
                    <pre>lxc-users mailing list<o:p></o:p></pre>
                    <pre><a moz-do-not-send="true" href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><o:p></o:p></pre>
                    <pre><a moz-do-not-send="true" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a><o:p></o:p></pre>
                  </blockquote>
                  <p class="MsoNormal"> <o:p></o:p></p>
                </div>
                <p class="MsoNormal">_______________________________________________<br>
                  lxc-users mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
                  <a moz-do-not-send="true"
                    href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a><o:p></o:p></p>
              </div>
            </div>
            <p class="MsoNormal"> <o:p></o:p></p>
          </div>
          <div class="MsoNormal" style="text-align:center"
            align="center">
            <hr align="center" size="4" width="100%">
          </div>
          <p class="MsoNormal"><strong><span style="color:#400040">Attention:
              </span></strong><span style="color:#400040"><br>
              <strong>This e-mail and any attachment is for authorised
                use by the intended recipient(s) only. It may contain
                proprietary, confidential and/or privileged information
                and should not be copied, disclosed, distributed,
                retained or used by any other party. If you are not an
                intended recipient please notify the sender immediately
                and delete this e-mail (including attachments and
                copies).
              </strong><b><br>
                <strong>The statements and opinions expressed in this
                  e-mail are those of the author and do not necessarily
                  reflect those of the Royal Marsden NHS Foundation
                  Trust. The Trust does not take any responsibility for
                  the statements and opinions of the author.
                </strong><br>
                <strong>Website:</strong></b></span><strong><span
                style="color:red"> <a moz-do-not-send="true"
                  href="http://www.royalmarsden.nhs.uk">
                  http://www.royalmarsden.nhs.uk</a></span></strong><o:p></o:p></p>
          <div class="MsoNormal" style="text-align:center"
            align="center">
            <hr align="center" size="4" width="100%">
          </div>
          <p class="MsoNormal"><br>
            <br>
            <br>
            <o:p></o:p></p>
          <pre>_______________________________________________<o:p></o:p></pre>
          <pre>lxc-users mailing list<o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><o:p></o:p></pre>
          <pre><a moz-do-not-send="true" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a><o:p></o:p></pre>
        </blockquote>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <p>
      </p>
      <hr>
      <font color="#400040"><strong>Attention: </strong><br>
      </font><strong><font color="#ff0000"><font color="#400040">This
            e-mail and any attachment is for authorised use by the
            intended recipient(s) only. It may contain proprietary,
            confidential and/or privileged information and should not be
            copied, disclosed, distributed, retained or used by any
            other party. If you are not an intended recipient please
            notify the sender immediately and delete this e-mail
            (including attachments and copies). <br>
            The statements and opinions expressed in this e-mail are
            those of the author and do not necessarily reflect those of
            the Royal Marsden NHS Foundation Trust. The Trust does not
            take any responsibility for the statements and opinions of
            the author. <br>
            Website:</font> <a moz-do-not-send="true"
            href="http://www.royalmarsden.nhs.uk">http://www.royalmarsden.nhs.uk</a><br>
        </font></strong>
      <hr>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
lxc-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a>
<a class="moz-txt-link-freetext" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>