HI Team,
i am trying to create a template from packer but getting stuck
[[0;32m centos-8.4-x86_64-server-vagrant: Not using a NetBridge --
skipping StepWaitGuestAddress^[[0m
ui: [[1;32m==> centos-8.4-x86_64-server-vagrant: Using SSH communicator to
connect: 127.0.0.1^[[0m
packer-builder-qemu plugin: [INFO] Waiting for SSH, up to timeout: 10m0s
ui: [[1;32m==> centos-8.4-x86_64-server-vagrant: Waiting for SSH to become
available...^[[0m
packer-builder-qemu plugin: [INFO] Attempting SSH connection to
127.0.0.1:3279...
packer-builder-qemu plugin: [DEBUG] reconnecting to TCP connection for SSH
: [DEBUG] handshaking with SSH
: [DEBUG] SSH handshake err: Timeout during SSH handshake
: [INFO] Attempting SSH connection to 127.0.0.1:3279...
: [DEBUG] reconnecting to TCP connection for SSH
: [DEBUG] handshaking with SSH
I have tried all search in google related tot hi problem but didn't succeed
please find attached json and kickstart file.
Can anyone help me on this.
Thanks,
Ashish
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/4e59ff98-9820-4d3e-9ea8-8cead2a429f5n%40googlegroups.com.
install
url --url http://linux.mirrors.es.net/centos/8.4.2105/isos/x86_64/
repo --name updates
--baseurl=http://linux.mirrors.es.net/centos/8.4.2105/isos/x86_64/
# for too new hardware
unsupported_hardware
text
skipx
bootloader
firewall --disabled
selinux --disabled
firstboot --disabled
lang en_US.UTF-8
keyboard us
timezone --utc Etc/UTC
zerombr
clearpart --all --initlabel
part /boot --size=250
part swap --hibernation
part / --size=3000 --grow
rootpw vagrant
authconfig --enableshadow --passalgo=sha512
user --name=vagrant --groups=vagrant --password=vagrant
reboot
%packages --nobase
@core
-*firmware
-b43-openfwwf
-efibootmgr
-audit*
-libX*
-fontconfig
-freetype
sudo
openssh-clients
openssh-server
gcc
make
perl
kernel-firmware
kernel-devel
%end
%post
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant
echo 'Defaults:vagrant env_keep += SSH_AUTH_SOCK' >> /etc/sudoers.d/vagrant
chmod 0440 /etc/sudoers.d/vagrant
sed -i 's/^.*requiretty/#Defaults requiretty/' /etc/sudoers
sed -i 's/rhgb //' /boot/grub/grub.conf
%end
{
"variables": {
"user": "vagrant",
"password": "vagrant",
"disk_size": "100000"
},
"builders":
[
{
"name": "centos-8.4-x86_64-server-vagrant", "type":
"qemu",
"format": "qcow2",
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
"iso_url":
"http://linux.mirrors.es.net/centos/8.4.2105/isos/x86_64/CentOS-8.4.2105-x86_64-boot.iso",
"iso_checksum":
"c79921e24d472144d8f36a0d5f409b12bd016d9d7d022fd703563973ca9c375c",
"http_directory": "/home/cm/packerbuild/build",
"ssh_username": "{{user `user`}}",
"ssh_password": "{{user `password`}}",
"ssh_wait_timeout": "10m",
"ssh_handshake_attempts": "10",
"shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P
now",
"headless": "true",
"boot_wait": "2m",
"boot_command": [
"<tab> text ks=/home/cm/packerbuild/build/ks.cfg<enter><wait>"
]
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E
-S bash '{{.Path}}'",
"scripts": [
"scripts/vagrant.sh",
"scripts/cleanup.sh"
]
}
],
"post-processors": [
{
"keep_input_artifact": false,
"output": "box/centos-8.4_x86_64-server.box",
"type": "vagrant"
}
]
}