[lxc-devel] How to create a container without Internet connection??
黄奕
ruffian_hy at 126.com
Tue Jan 20 07:09:52 UTC 2015
Hello everybody,
I am using LXC in RedHat 7 and have to create a redhat container without Internet connection.
I tried to modify the template file of centos(changing the mirrorlist path to "file:///mnt" where i mount my .iso), but I failed and I got errors below:
Host CPE ID from /etc/os-release: cpe:/o:redhat:enterprise_linux:7.0:GA:server
This is not a CentOS or Redhat host and release is missing, defaulting to 6 use -R|--release to specify release
Checking cache download in /usr/local/var/cache/lxc/centos/x86_64/6/rootfs ...
Downloading centos minimal ..
Loaded plugins: langpacks, product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Disable the repository, so yum won't use it by default. Yum will then
just ignore the repository until you permanently enable it again or use
--enablerepo for temporary usage:
yum-config-manager --disable <repoid>
4. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base
Failed to download the rootfs, aborting.
Failed to download 'centos base'
failed to install centos
lxc_container: lxccontainer.c: create_run_template: 1125 container creation template for mylxc4 failed
lxc_container: lxc_create.c: main: 271 Error creating container mylxc4
If you could take a look, i really would geatly appreciate you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20150120/e33a03aa/attachment-0001.html>
More information about the lxc-devel
mailing list