Code Monkey home page Code Monkey logo

Comments (3)

Romainj1 avatar Romainj1 commented on September 24, 2024

I reproduced the same error !

2 points:

Please note that if you are using the Vagrant builder, then the Vagrant post-processor is unnecessary because the output of the Vagrant builder is already a Vagrant box; using this post-processor with the Vagrant builder will cause your build to fail.

from packer-plugin-vagrant.

jaunruh avatar jaunruh commented on September 24, 2024

+1

I am running a vagrant-libvirt post-processor for an azure-arm source.

source "azure-arm" "win22s" {
  // azure settings
}

build {
  sources = ["sources.azure-arm.win22s"]

  provisioner "file" {
    // file provisioners
  }

  provisioner "powershell" {
    // powershell provisioners
  }

  provisioner "windows-restart" {}

  provisioner "powershell" {
    // required vm preperation
  }

  post-processors {  
    post-processor "vagrant" {
      keep_input_artifact = true
      provider_override = "libvirt"
    }  
  }  
}

Resulting in the following .log:

==> azure-arm.win22s (vagrant): Creating a dummy Vagrant box to ensure the host system can create one correctly
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: Turning dir into box: /var/folders/vn/7nt3vs6d22bf_53xf12kvllr0000gn/T/packer1148182668 => /var/folders/vn/7nt3vs6d22bf_53xf12kvllr0000gn/T/box-2991777212.box
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: Compressing with gzip compression level: -1
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: Skipping directory '/var/folders/vn/7nt3vs6d22bf_53xf12kvllr0000gn/T/packer1148182668' for box '/var/folders/vn/7nt3vs6d22bf_53xf12kvllr0000gn/T/box-2991777212.box'
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: Box add: '/var/folders/vn/7nt3vs6d22bf_53xf12kvllr0000gn/T/packer1148182668/metadata.json' to '/var/folders/vn/7nt3vs6d22bf_53xf12kvllr0000gn/T/box-2991777212.box'
==> azure-arm.win22s (vagrant): Creating Vagrant box for 'libvirt' provider
Build 'azure-arm.win22s' errored after 20 minutes 43 seconds: 1 error(s) occurred:

* Post-processor failed: unexpected EOF

==> Wait completed after 20 minutes 43 seconds

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

* Post-processor failed: unexpected EOF

==> Builds finished but no artifacts were created.
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: panic: interface conversion: interface {} is nil, not string
2022/04/22 11:46:08 packer-post-processor-vagrant plugin:
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: goroutine 202 [running]:
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: github.com/hashicorp/packer-plugin-vagrant/post-processor/vagrant.(*LibVirtProvider).Process(0x5e655e0, {0x66285d8, 0xc000d8b0b0}, {0x6628620, 0xc0000cb2a0}, {0xc00012afa0, 0x41})
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: 	/Users/runner/go/pkg/mod/github.com/hashicorp/[email protected]/post-processor/vagrant/libvirt.go:67 +0x69b
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: github.com/hashicorp/packer-plugin-vagrant/post-processor/vagrant.(*PostProcessor).PostProcessProvider(0x10000c00040e770, {0xc000079a98, 0x28}, {0x65d0bb0, 0x9f6aac0}, {0x66285d8, 0xc000d8b0b0}, {0x6628620, 0xc0000cb2a0})
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: 	/Users/runner/go/pkg/mod/github.com/hashicorp/[email protected]/post-processor/vagrant/post-processor.go:158 +0x706
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: github.com/hashicorp/packer-plugin-vagrant/post-processor/vagrant.(*PostProcessor).PostProcess(0xc000b2edc0, {0xc0000780f0, 0x0}, {0x66285d8, 0xc000d8b0b0}, {0x6628620, 0xc0000cb2a0})
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: 	/Users/runner/go/pkg/mod/github.com/hashicorp/[email protected]/post-processor/vagrant/post-processor.go:230 +0x49a
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: github.com/hashicorp/packer-plugin-sdk/rpc.(*PostProcessorServer).PostProcess(0xc000d9a040, 0x79c70, 0xc0000df4c0)
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: 	/Users/runner/go/pkg/mod/github.com/hashicorp/[email protected]/rpc/post_processor.go:108 +0x18c
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: reflect.Value.call({0xc0005b6840, 0xc00000e948, 0x13}, {0x5e612c7, 0x4}, {0xc000791ef8, 0x3, 0x3})
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: 	/Users/runner/hostedtoolcache/go/1.17.8/x64/src/reflect/value.go:556 +0x845
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: reflect.Value.Call({0xc0005b6840, 0xc00000e948, 0x0}, {0xc000646ef8, 0x3, 0x3})
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: 	/Users/runner/hostedtoolcache/go/1.17.8/x64/src/reflect/value.go:339 +0xc5
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: net/rpc.(*service).call(0xc000d9a080, 0x0, 0x0, 0xc000079010, 0xc00049e480, 0x0, {0x4df1220, 0xc000079c50, 0x0}, {0x4c2a1a0, ...}, ...)
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: 	/Users/runner/hostedtoolcache/go/1.17.8/x64/src/net/rpc/server.go:377 +0x239
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: created by net/rpc.(*Server).ServeCodec
2022/04/22 11:46:08 packer-post-processor-vagrant plugin: 	/Users/runner/hostedtoolcache/go/1.17.8/x64/src/net/rpc/server.go:474 +0x405
2022/04/22 11:46:08 [INFO] (telemetry) ending vagrant
2022/04/22 11:46:08 /usr/local/bin/packer: plugin process exited
2022/04/22 11:46:08 Deleting original artifact for build 'azure-arm.win22s'

* Post-processor failed: unexpected EOF
==> Wait completed after 20 minutes 43 seconds
2022/04/22 11:46:08 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2022/04/22 11:46:08 machine readable: azure-arm.win22s,error []string{"1 error(s) occurred:\n\n* Post-processor failed: unexpected EOF"}

* Post-processor failed: unexpected EOF
==> Builds finished but no artifacts were created.
2022/04/22 11:46:08 [INFO] (telemetry) Finalizing.
2022/04/22 11:46:09 waiting for all plugin processes to complete...
2022/04/22 11:46:09 /usr/local/bin/packer: plugin process exited
2022/04/22 11:46:09 /usr/local/bin/packer: plugin process exited
2022/04/22 11:46:09 /usr/local/bin/packer: plugin process exited
2022/04/22 11:46:09 /usr/local/bin/packer: plugin process exited
2022/04/22 11:46:09 [ERR] Error decoding response stream 19: EOF
2022/04/22 11:46:09 /usr/local/bin/packer: plugin process exited

EDIT:
I have tried to execute this script on MacOS 12.3.1 and on Ubuntu 20.04 both running Packer 1.8.0.

from packer-plugin-vagrant.

Tash1nka avatar Tash1nka commented on September 24, 2024

Same here in 2024, running packer 1.10.1 with vagrant plugins v1.1.2 on Arch.

from packer-plugin-vagrant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.