[lxc-users] lxc launch imported image results in "ENTERHOSTNAME" hostname

Ron Kelley rkelleyrtp at gmail.com
Fri Apr 28 00:26:49 UTC 2017


Greetings all,

I had a CentOS6 container running on an LXD 2.12 server and wanted to test my backup procedures for future use.  I used the “lxc publish” command to publish it to my local image repository then “lxc image export” to save it as a *tgz file.  I shutdown the container and removed it.  Next, I reset lxd (removing all /var/lib/lxd stuff then running “lxd init”), imported the image back into LXD, then launched a new container based on the image (lxd image launch <image_name> “my_new_container").  

The container booted fine, but the hostname is stuck at “ENTERHOSTNAME”. I have manually set the hostname via /etc/hosts and /etc/sysconfig/network in the container.  Still have ENTERHOSTNAME  I have even copied the container to a new container and still have the same issue.  Where is the “ENTERHOSTNAME” value getting set?

This seems to indicate LXD is passing the hostname “ENTERHOSTNAME” to the container, but I can’t find the “hostname” setting in the profile.  The command “lxc config set “my_new_container” hostname my_new_hostname” results in “bad key”.

Any clues?





More information about the lxc-users mailing list