Skip to content
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

vmware esxi post-install errors #225

Open
dcarvalh04 opened this issue Apr 24, 2024 · 3 comments
Open

vmware esxi post-install errors #225

dcarvalh04 opened this issue Apr 24, 2024 · 3 comments

Comments

@dcarvalh04
Copy link

Hi all,

I've tried muliple ways to build a vmware esxi image using this template but always end up getting the error below. Also, it's looking for a scripts folder which does not exist anymore, does any of you have the same issue or found any solution ? I still get a "dd.gz" file that I'm going to test but wanted to bring this up anyway.

`2024/04/24 09:18:18 packer-post-processor-shell-local plugin: [INFO] (shell-local communicator): Executing local shell command [/bin/sh -c PACKER_BUILDER_TYPE='qemu' PACKER_BUILD_NAME='esxi' PACKER_HTTP_ADDR='10.0.2.2:0' PACKER_HTTP_IP='10.0.2.2' PACKER_HTTP_PORT='0' /tmp/packer-shell4017962310]
==> qemu.esxi (shell-local): ++ PACKER_OUTPUT=output-esxi/packer-esxi
==> qemu.esxi (shell-local): ++ IMG_FMT=raw
==> qemu.esxi (shell-local): ++ '[' '!' -f output-esxi/packer-esxi ']'
==> qemu.esxi (shell-local): ++ sync -f output-esxi/packer-esxi
==> qemu.esxi (shell-local): +++ mktemp -d /tmp/packer-maas-XXXX
==> qemu.esxi (shell-local): ++ TMP_DIR=/tmp/packer-maas-HCVp
==> qemu.esxi (shell-local): ++ trap cleanup EXIT
==> qemu.esxi (shell-local): ++ sleep 5
==> qemu.esxi (shell-local): ++ qemu-nbd --socket=/tmp/packer-maas-HCVp/qemu-img.sock --format=raw --shared=10 output-esxi/packer-esxi
==> qemu.esxi (shell-local): ++ mkdir -p /tmp/packer-maas-HCVp/root
==> qemu.esxi (shell-local): + source ./post.sh
==> qemu.esxi (shell-local): ++ BOOT_DIR=/tmp/packer-maas-HCVp/boot
==> qemu.esxi (shell-local): ++ echo 'Adding curtin-hooks to image...'
qemu.esxi (shell-local): Adding curtin-hooks to image...
==> qemu.esxi (shell-local): ++ mount_part 1 /tmp/packer-maas-HCVp/boot fusefat
==> qemu.esxi (shell-local): ++ PART=1
==> qemu.esxi (shell-local): ++ MOUNTPOINT=/tmp/packer-maas-HCVp/boot
==> qemu.esxi (shell-local): ++ FUSEDRV=fusefat
==> qemu.esxi (shell-local): ++ DEV=/tmp/packer-maas-HCVp/p1
==> qemu.esxi (shell-local): ++ mkdir -p /tmp/packer-maas-HCVp/boot
==> qemu.esxi (shell-local): ++ mkdir -p /tmp/packer-maas-HCVp/p1
==> qemu.esxi (shell-local): ++ retries=0
==> qemu.esxi (shell-local): ++ '[' -f /tmp/packer-maas-HCVp/p1/nbd ']'
==> qemu.esxi (shell-local): ++ sleep 1
==> qemu.esxi (shell-local): ++ nbdfuse /tmp/packer-maas-HCVp/p1 --command nbdkit -s nbd socket=/tmp/packer-maas-HCVp/qemu-img.sock --filter=partition partition=1
==> qemu.esxi (shell-local): ++ (( ++retries > 10 ))
==> qemu.esxi (shell-local): ++ '[' -f /tmp/packer-maas-HCVp/p1/nbd ']'
==> qemu.esxi (shell-local): ++ case "${FUSEDRV}" in
==> qemu.esxi (shell-local): ++ fusefat /tmp/packer-maas-HCVp/p1/nbd /tmp/packer-maas-HCVp/boot -o rw+ -s
==> qemu.esxi (shell-local): volume mounted in rw mode
==> qemu.esxi (shell-local): fat type: FAT16
==> qemu.esxi (shell-local): root dir off : 205824
==> qemu.esxi (shell-local): dataclusters :51091
==> qemu.esxi (shell-local): first data byte : 222208
==> qemu.esxi (shell-local): 1st fat off : 1024
==> qemu.esxi (shell-local): 2nd fat off : 103424
==> qemu.esxi (shell-local): fat_eoc_value: 65535
==> qemu.esxi (shell-local): fat_eoc_value is eoc?: 1
==> qemu.esxi (shell-local): ++ cp -rv curtin /tmp/packer-maas-HCVp/boot
qemu.esxi (shell-local): 'curtin' -> '/tmp/packer-maas-HCVp/boot/curtin'
==> qemu.esxi (shell-local): ++ echo 'Adding post-install scripts to image...'
qemu.esxi (shell-local): 'curtin/curtin-hooks' -> '/tmp/packer-maas-HCVp/boot/curtin/curtin-hooks'
qemu.esxi (shell-local): Adding post-install scripts to image...
==> qemu.esxi (shell-local): ++ cp -v scripts.tar.xz /tmp/packer-maas-HCVp/boot/curtin/
==> qemu.esxi (shell-local): cp: cannot stat 'scripts.tar.xz': No such file or directory
==> qemu.esxi (shell-local): + cleanup
==> qemu.esxi (shell-local): + for dev in "${TMP_DIR}"/p*/ "${TMP_DIR}"/disk/ "${TMP_DIR}"/boot/
==> qemu.esxi (shell-local): + dev=/tmp/packer-maas-HCVp/p1
==> qemu.esxi (shell-local): + '[' -d /tmp/packer-maas-HCVp/p1 ']'
==> qemu.esxi (shell-local): + fusermount -u -z /tmp/packer-maas-HCVp/p1
==> qemu.esxi (shell-local): + grep -qs '/tmp/packer-maas-HCVp/p1 ' /proc/mounts
==> qemu.esxi (shell-local): + for dev in "${TMP_DIR}"/p*/ "${TMP_DIR}"/disk/ "${TMP_DIR}"/boot/
==> qemu.esxi (shell-local): + dev=/tmp/packer-maas-HCVp/disk
==> qemu.esxi (shell-local): + '[' -d /tmp/packer-maas-HCVp/disk ']'
==> qemu.esxi (shell-local): + for dev in "${TMP_DIR}"/p*/ "${TMP_DIR}"/disk/ "${TMP_DIR}"/boot/
==> qemu.esxi (shell-local): + dev=/tmp/packer-maas-HCVp/boot
==> qemu.esxi (shell-local): + '[' -d /tmp/packer-maas-HCVp/boot ']'
==> qemu.esxi (shell-local): + fusermount -u -z /tmp/packer-maas-HCVp/boot
==> qemu.esxi (shell-local): + grep -qs '/tmp/packer-maas-HCVp/boot ' /proc/mounts
==> qemu.esxi (shell-local): + rm -rf /tmp/packer-maas-HCVp
2024/04/24 09:18:24 packer-post-processor-shell-local plugin: error: Script exited with non-zero exit status: 1. Allowed exit codes are: [0]
2024/04/24 09:18:24 [INFO] (telemetry) ending shell-local
2024/04/24 09:18:24 [INFO] (telemetry) Starting post-processor compress
==> qemu.esxi: Running post-processor: (type compress)
==> qemu.esxi (compress): Using pgzip compression with 16 cores for vmware-esxi.dd.gz
==> qemu.esxi (compress): Archiving output-esxi/packer-esxi with pgzip
==> qemu.esxi (compress): Archive vmware-esxi.dd.gz completed
2024/04/24 09:18:40 [INFO] (telemetry) ending compress
2024/04/24 09:18:40 Deleting original artifact for build 'qemu.esxi'

Build 'qemu.esxi' errored after 6 minutes 22 seconds: 1 error(s) occurred:

  • Post-processor failed: Script exited with non-zero exit status: 1. Allowed exit codes are: [0]

==> Wait completed after 6 minutes 22 seconds
2024/04/24 09:18:41 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:

  • Post-processor failed: Script exited with non-zero exit status: 1. Allowed exit codes are: [0]
    2024/04/24 09:18:41 machine readable: qemu.esxi,error []string{"1 error(s) occurred:\n\n* Post-processor failed: Script exited with non-zero exit status: 1. Allowed exit codes are: [0]"}

  • Post-processor failed: Script exited with non-zero exit status: 1. Allowed exit codes are: [0]
    ==> Builds finished but no artifacts were created.
    2024/04/24 09:18:41 [INFO] (telemetry) Finalizing.

==> Wait completed after 6 minutes 22 seconds

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

  • Post-processor failed: Script exited with non-zero exit status: 1. Allowed exit codes are: [0]

==> Builds finished but no artifacts were created.
2024/04/24 09:18:41 waiting for all plugin processes to complete...
2024/04/24 09:18:41 /root/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.1.0_x5.0_linux_amd64: plugin process exited
2024/04/24 09:18:41 /usr/bin/packer: plugin process exited
2024/04/24 09:18:41 /usr/bin/packer: plugin process exited`

image

image

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label May 25, 2024
@ironashram
Copy link

having this issue myself too

@ironashram
Copy link

ok i totally missed the Makefile

make scripts.tar.xz

is necessary in order to create it

@github-actions github-actions bot removed the stale label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants