<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hello everybody,</div><div>I am using LXC in RedHat 7 and have to  create a redhat container without Internet connection.</div><div>I tried to modify the template file of centos(changing the mirrorlist path to "<a href="http://file///mmnt" _src="http://file:///mmnt" style="color: rgb(19, 129, 68);">file:///mnt</a>" where i mount my .iso), but I failed and <span style="line-height: 1.7;">I got errors below:</span></div><div><br></div><div><span style="line-height: 1.7;">Host CPE ID from /etc/os-release: cpe:/o:redhat:enterprise_linux:7.0:GA:server</span></div><div><span style="line-height: 1.7;">This is not a CentOS or Redhat host and release is missing, defaulting to 6 use -R|--release to specify release</span></div><div><span style="line-height: 1.7;">Checking cache download in /usr/local/var/cache/lxc/centos/x86_64/6/rootfs ...</span></div><div><span style="line-height: 1.7;">Downloading centos minimal ..</span></div><div><span style="line-height: 1.7;">Loaded plugins: langpacks, product-id, subscription-manager</span></div><div><span style="line-height: 1.7;">This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.</span></div><div><span style="line-height: 1.7;"> </span><span style="line-height: 1.7;">One of the configured repositories failed (Unknown),</span></div><div><span style="line-height: 1.7;"> </span><span style="line-height: 1.7;">and yum doesn't have enough cached data to continue. At this point the only</span></div><div><span style="line-height: 1.7;"> </span><span style="line-height: 1.7;">safe thing yum can do is fail. There are a few ways to work "fix" this:</span></div><div><p class="MsoNormal"><span lang="EN-US"> </span><span style="line-height: 1.7;">     </span><span style="line-height: 1.7;">1. Contact the upstream for the repository and get them to fix the problem.</span></p><p class="MsoNormal"><span lang="EN-US"> </span><span style="line-height: 1.7;">    </span><span style="line-height: 1.7;">2. Reconfigure the baseurl/etc. for the repository, to point to a working</span></p><p class="MsoNormal"><span lang="EN-US">        upstream. This is most often useful if you are using a newer<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">        distribution release than is supported by the repository (and the<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">        packages for the previous distribution release still work).<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"> </span><span style="line-height: 1.7;">     </span><span style="line-height: 1.7;">3. Disable the repository, so yum won't use it by default. Yum will then</span></p><p class="MsoNormal"><span lang="EN-US">        just ignore the repository until you permanently enable it again or use<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">        --enablerepo for temporary usage:<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"> </span><span style="line-height: 1.7;">           </span><span style="line-height: 1.7;">yum-config-manager --disable <repoid></span></p><p class="MsoNormal"><span lang="EN-US"> </span><span style="line-height: 1.7;">    </span><span style="line-height: 1.7;">4. Configure the failing repository to be skipped, if it is unavailable.</span></p><p class="MsoNormal"><span lang="EN-US">        Note that yum will try to contact the repo. when it runs most commands,<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">        so will have to try and fail each time (and thus. yum will be be much<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">        slower). If it is a very temporary problem though, this is often a nice<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">        compromise:<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">            yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US"> </span><span style="line-height: 1.7;">Cannot find a valid baseurl for repo: base</span></p><p class="MsoNormal"><span lang="EN-US">Failed to download the rootfs, aborting.<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">Failed to download 'centos base'<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">failed to install centos<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US">lxc_container: lxccontainer.c: create_run_template: 1125 container creation template for mylxc4 failed<o:p></o:p></span></p><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif;">lxc_container: lxc_create.c: main: 271 Error creating container mylxc4</span></div><div><span lang="EN-US" style="font-size: 10.5pt; font-family: Calibri, sans-serif;"><br></span></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif">If you could take a look, i really would geatly appreciate you.</font></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>