We still have the downloaded template on/var/cache/lxc/download/centos/6/amd64/default/. Can we use this and extend the expiry so when lxc-create runs, it will not try to download again (the image template which was already removed)?
It will take sometime for us to create our own template via the distrobuilder and the image spec.
Also what will be the command to create the container if we decided to use the new image created by the distro builder and image?
Extending the cache expiry is certainly worth a shot.
If that doesn’t work, you can probably get -t local to consume what you have on disk by making a new meta.tar.xz from the bits you have on disk and use the existing rootfs.tar.xz
Thanks a lot! Extending the cache expiry worked, but we will still try to create a new meta.tar.xz from rootfs so we don’t lose the data when the server restarts.
I am trying to create centos 6 image using distrobuilder but getting below error
Error: Error while downloading source: Failed to unpack "/tmp/distrobuilder/centos-6.10-x86_64/CentOS-6.10-x86_64-minimal.iso": Failed to run script: Failed to run script: fork/exec /proc/self/fd/10: no such file or directory
ERROR [2024-10-15T14:03:50-04:00] Failed running distrobuilder err="Error while downloading source: Failed to unpack \"/tmp/distrobuilder/centos-6.10-x86_64/CentOS-6.10-x86_64-minimal.iso\": Failed to run script: Failed to run script: fork/exec /proc/self/fd/10: no such file or directory"
Full Output
╰─$ \sudo /snap/bin/distrobuilder build-lxc centos.yaml /home/rpatil/ 1 ↵
INFO [2024-10-15T14:03:25-04:00] Downloading source
/tmp/distrobuilder/centos-6.10-x86_64/sha256sum.txt.asc: 100% (3.00GB/s)
gpg: Signature made Mon 02 Jul 2018 11:42:37 AM EDT
gpg: using RSA key 0946FCA2C105B9DE
gpg: Good signature from "CentOS-6 Key (CentOS 6 Official Signing Key) <centos-6-key@centos.org>" [expired]
gpg: Note: This key has expired!
Primary key fingerprint: C1DA C52D 1664 E8A4 386D BA43 0946 FCA2 C105 B9DE
/tmp/distrobuilder/centos-6.10-x86_64/CentOS-6.10-x86_64-minimal.iso: 100% (52.16MB/s)
INFO [2024-10-15T14:03:33-04:00] Unpacking image file=/tmp/distrobuilder/centos-6.10-x86_64/CentOS-6.10-x86_64-minimal.iso
INFO [2024-10-15T14:03:36-04:00] Unpacking root image file=/var/cache/distrobuilder.2074566337/temp_864290509/images/install.img
key=/var/cache/distrobuilder.2074566337/temp_864290509/RPM-GPG-KEY-CentOS-6
key=/var/cache/distrobuilder.2074566337/temp_864290509/RPM-GPG-KEY-CentOS-Debug-6
key=/var/cache/distrobuilder.2074566337/temp_864290509/RPM-GPG-KEY-CentOS-Security-6
key=/var/cache/distrobuilder.2074566337/temp_864290509/RPM-GPG-KEY-CentOS-Testing-6
Error: Error while downloading source: Failed to unpack "/tmp/distrobuilder/centos-6.10-x86_64/CentOS-6.10-x86_64-minimal.iso": Failed to run script: Failed to run script: fork/exec /proc/self/fd/10: no such file or directory
ERROR [2024-10-15T14:03:50-04:00] Failed running distrobuilder err="Error while downloading source: Failed to unpack \"/tmp/distrobuilder/centos-6.10-x86_64/CentOS-6.10-x86_64-minimal.iso\": Failed to run script: Failed to run script: fork/exec /proc/self/fd/10: no such file or directory"
INFO [2024-10-15T14:03:50-04:00] Removing cache directory
Anyone experience this error or any possible solution ?
I have to use Centos 6 for my legacy application is there any way I can build centos 6 LXC image ? I have containers running with centos 6 but those are running on openvz. we migrated to LXC in our organization and want to create centos 6 container in LXC.