Difference between revisions of "CentOS 7.x lxc container creation fails due to host resolution"

From Notes_Wiki
m
m
 
Line 1: Line 1:
<yambe:breadcrumb>CentOS_7.x_lxc_troubleshooting|CentOS 7.x lxc troubleshooting</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x virtualization|Virtualization]] > [[CentOS 7.x lxc|Lxc]] > [[CentOS 7.x lxc troubleshooting|Troubleshooting]] > [[CentOS 7.x lxc container creation fails due to host resolution]]
=CentOS 7.x lxc container creation fails due to host resolution=


It is possible that CentOS 7.x container creation fails with errors similar to
It is possible that CentOS 7.x container creation fails with errors similar to
Line 12: Line 11:
</pre>
</pre>
for centos-7 containers.  To solve the issue edit above file and add appropriate nameserver.  If 4.2.2.2 and 8.8.8.8 are used then the settings should work at multiple locations without any problem.
for centos-7 containers.  To solve the issue edit above file and add appropriate nameserver.  If 4.2.2.2 and 8.8.8.8 are used then the settings should work at multiple locations without any problem.
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x virtualization|Virtualization]] > [[CentOS 7.x lxc|Lxc]] > [[CentOS 7.x lxc troubleshooting|Troubleshooting]] > [[CentOS 7.x lxc container creation fails due to host resolution]]

Latest revision as of 08:59, 25 August 2022

Home > CentOS > CentOS 7.x > Virtualization > Lxc > Troubleshooting > CentOS 7.x lxc container creation fails due to host resolution

It is possible that CentOS 7.x container creation fails with errors similar to

[Errno 14] curl#6 - "Could not resolve host: centos.mirror.snu.edu.in; Unknown error"
Trying other mirror.

even though DNS is working fine. This is possible because lxc (unfortunately) uses DNS configuration from cache and not from host. That is lxc-create uses DNS configuration from

/var/cache/lxc/centos/x86_64/7/rootfs/etc/resolv.conf

for centos-7 containers. To solve the issue edit above file and add appropriate nameserver. If 4.2.2.2 and 8.8.8.8 are used then the settings should work at multiple locations without any problem.



Home > CentOS > CentOS 7.x > Virtualization > Lxc > Troubleshooting > CentOS 7.x lxc container creation fails due to host resolution