-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
packer lxc failing to create container #12907
Comments
Hi @Dialgatrainer02, With the information provided it's a bit hard for us to understand what the bug is, or if this is even a Packer or a LXC plugin issue that we can act on. To be sure, are you able to manually create a LXC container with the image you're building upon? That would be a first starting point in order to rule out problems like an unavailable image or a permission problem. Please note that I'm very much not a LXC expert, so please bear with me on that one. I see the template you're using refers to a configuration file located in Thanks in advance for elaborating on this problem! |
my /etc/lxc/default.conf is
i am trying to make an alpine image and i can successfully make it using the command: sudo lxc-create -t download -n packer-lxc -- -d alpine -a amd64 i just tried to do lxc start on the container using: sudo lxc-start packer-lxc and it gave an error
running with -F gives me
it seems to be having networking issues
|
Thanks for the quick confirmation. The I would also suggest taking a look at the options offered by the builder in order to get more troubleshooting information, typically as pointed out by LXC here through the |
i am running packer build and init with sudo and ill look into getting a logfile |
Regarding your bridge interface not existing, there's an issue on LXC that hints at the potential problem, I suggest taking a look at the (former) maintainer's suggestion: lxc/lxc#1218 (comment) |
This issue has been migrated to hashicorp/packer-plugin-lxc#76 due to the Packer Plugin split. Please follow the new issue for updates. |
On another note, since this is a LXC-specific bug, I'm transferring the issue to the plugin for further discussion. |
okay thanks for the help |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
Overview of the Issue
when i run packer build . i get errors saying it couldnt create the vm
and im unsure why i can create containers using
sudo lxc-create -t download -n packer-test -- -d alpine -a amd64
Reproduction Steps
install lxc
git clone https://github.com/jpancoast/image-builder.git
cd ./image-builder/lxc/examples/alpine
sudo packer init .
sudo chmod +x build.sh
sudo bash build.sh
Packer version
From
packer version
Simplified Packer Template
If the file is longer than a few dozen lines, please include the URL to the
gist of the log or use the Github detailed
format
instead of posting it directly in the issue.
git clone https://github.com/jpancoast/image-builder.git this is my first time using packer so just coping a git repo
Operating system and Environment details
OS, Architecture, and any other information you can provide about the
environment.
arch linux (just for testing)
x86_64
packer and lxc on latest versions
Log Fragments and crash.log files
Include appropriate log fragments. If the log is longer than a few dozen lines,
please include the URL to the gist of the log or
use the Github detailed format instead of posting it directly in the issue.
https://gist.github.com/Dialgatrainer02/c28b16d8a7ab72424323b91e3294d38e
Set the env var
PACKER_LOG=1
for maximum log detail.The text was updated successfully, but these errors were encountered: