Building vagrant-libvirt box based on the another one

Hi,

I’m trying to build my own vagrant-libvirt box based on a base openSUSE image which is available here:

https://app.vagrantup.com/opensuse/boxes/Tumbleweed.x86_64

Here is the packer config I’m trying to use:

(in general, the vagrant-workers branch from that repo)

Unfortunately, I’m getting the following error:

==> vagrant: Provisioning with shell script: /tmp/packer-shell074184219
==> vagrant: Packaging box...
==> vagrant: destroying Vagrant box...
==> vagrant: Running post-processor: vagrant
==> vagrant (vagrant): Creating a dummy Vagrant box to ensure the host system can create one correctly
==> vagrant (vagrant): Creating Vagrant box for 'libvirt' provider
Build 'vagrant' errored after 2 minutes 55 seconds: 1 error(s) occurred:

* Post-processor failed: unexpected EOF

==> Wait completed after 2 minutes 55 seconds

==> Some builds didn't complete successfully and had errors:
--> vagrant: 1 error(s) occurred:

* Post-processor failed: unexpected EOF

==> Builds finished but no artifacts were created.

crash.log has the following Go stack trace:

2021/07/14 18:25:57 ui: ==> vagrant: Running post-processor: vagrant
2021/07/14 18:25:57 [INFO] (telemetry) Starting post-processor vagrant
2021/07/14 18:25:57 ui: ==> vagrant (vagrant): Creating a dummy Vagrant box to ensure the host system can create one correctly
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: Turning dir into box: /tmp/packer754947142 => /tmp/box-579010797.box
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: Compressing with gzip compression level: -1
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: Skipping directory '/tmp/packer754947142' for box '/tmp/box-579010797.box'
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: Box add: '/tmp/packer754947142/metadata.json' to '/tmp/box-579010797.box'
2021/07/14 18:25:57 ui: ==> vagrant (vagrant): Creating Vagrant box for 'libvirt' provider
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: panic: interface conversion: interface {} is nil, not string
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: 
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: goroutine 44 [running]:
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: github.com/hashicorp/packer-plugin-vagrant/post-processor/vagrant.(*LibVirtProvider).Process(0x8e563c0, 0x5e66138, 0xc000258090, 0x5e66180, 0xc000480100, 0xc000a8c378, 0x14, 0x0, 0x5, 0x100, ...)
2021/07/14 18:25:57 packer-post-processor-vagrant plugin:       /home/circleci/go/pkg/mod/github.com/hashicorp/packer-plugin-vagrant@v1.0.0/post-processor/vagrant/libvirt.go:67 +0x918
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: github.com/hashicorp/packer-plugin-vagrant/post-processor/vagrant.(*PostProcessor).PostProcessProvider(0xc000d9d340, 0xc00021ada8, 0x7, 0x5e24c90, 0x8e563c0, 0x5e66138, 0xc000258090, 0x5e66180, 0xc000480100, 0x0, ...)
2021/07/14 18:25:57 packer-post-processor-vagrant plugin:       /home/circleci/go/pkg/mod/github.com/hashicorp/packer-plugin-vagrant@v1.0.0/post-processor/vagrant/post-processor.go:158 +0x831
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: github.com/hashicorp/packer-plugin-vagrant/post-processor/vagrant.(*PostProcessor).PostProcess(0xc000d9d340, 0x5e4ce20, 0xc0007a87c0, 0x5e66138, 0xc000258090, 0x5e66180, 0xc000480100, 0x0, 0x203000, 0x0, ...)
2021/07/14 18:25:57 packer-post-processor-vagrant plugin:       /home/circleci/go/pkg/mod/github.com/hashicorp/packer-plugin-vagrant@v1.0.0/post-processor/vagrant/post-processor.go:230 +0x199
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: github.com/hashicorp/packer-plugin-sdk/rpc.(*PostProcessorServer).PostProcess(0xc0007a8880, 0x1, 0xc0007ac020, 0x0, 0x0)
2021/07/14 18:25:57 packer-post-processor-vagrant plugin:       /home/circleci/go/pkg/mod/github.com/hashicorp/packer-plugin-sdk@v0.2.3/rpc/post_processor.go:108 +0x19a
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: reflect.Value.call(0xc00043ed80, 0xc0007a60b8, 0x13, 0x56cc20d, 0x4, 0xc000253f08, 0x3, 0x3, 0xc00008a800, 0xc000553ef8, ...)
2021/07/14 18:25:57 packer-post-processor-vagrant plugin:       /usr/local/go/src/reflect/value.go:476 +0x8e7
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: reflect.Value.Call(0xc00043ed80, 0xc0007a60b8, 0x13, 0xc000553f08, 0x3, 0x3, 0xc000703ab8, 0xc00043f790, 0x462380)
2021/07/14 18:25:57 packer-post-processor-vagrant plugin:       /usr/local/go/src/reflect/value.go:337 +0xb9
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: net/rpc.(*service).call(0xc0007a88c0, 0xc000314320, 0xc00021a9b8, 0xc00021a9f0, 0xc0001af980, 0xc0007ae020, 0x469d880, 0xc00021a000, 0x18a, 0x44d48a0, ...)
2021/07/14 18:25:57 packer-post-processor-vagrant plugin:       /usr/local/go/src/net/rpc/server.go:377 +0x189
2021/07/14 18:25:57 packer-post-processor-vagrant plugin: created by net/rpc.(*Server).ServeCodec
2021/07/14 18:25:57 packer-post-processor-vagrant plugin:       /usr/local/go/src/net/rpc/server.go:474 +0x44d
2021/07/14 18:25:57 [INFO] (telemetry) ending vagrant
2021/07/14 18:25:57 Deleting original artifact for build 'vagrant'
2021/07/14 18:25:57 /home/vadorovsky/bin/packer: plugin process exited
2021/07/14 18:25:57 ui error: Build 'vagrant' errored after 3 minutes 2 seconds: 1 error(s) occurred:

* Post-processor failed: unexpected EOF
2021/07/14 18:25:57 ui: 
==> Wait completed after 3 minutes 2 seconds
2021/07/14 18:25:57 machine readable: error-count []string{"1"}
2021/07/14 18:25:57 ui error: 
==> Some builds didn't complete successfully and had errors:
2021/07/14 18:25:57 machine readable: vagrant,error []string{"1 error(s) occurred:\n\n* Post-processor failed: unexpected EOF"}
2021/07/14 18:25:57 ui error: --> vagrant: 1 error(s) occurred:

* Post-processor failed: unexpected EOF
2021/07/14 18:25:57 ui: 
==> Builds finished but no artifacts were created.

Anyone has any ideas what could cause that?

Sorry if I’m making some obvious mistake, but I couldn’t really find any full docs or any full example which would build vagrant-libvirt boxes not from scratch, but rather from some already existing box.

I’m also attaching the full crash.log

crash.log.txt (2.1 MB)