You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H524
Darwin 19.6.0 Darwin Kernel Version 19.6.0: Tue Jan 12 22:13:05 PST 2021; root:xnu-6153.141.16~1/RELEASE_X86_64 x86_64 i386
/usr/local/bin/packer: Mach-O 64-bit executable x86_64
Packer Version: v1.7.3
VirutalBox Version: 6.1.22r144080
Guest VM
OS Version: CentOS Linux release 7.9.2009 (Core)
ks.cfg
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
network --bootproto=static --device=enp0s3 --gateway="192.168.1.10" --ip="192.168.1.126" --nameserver=8.8.8.8 --netmask=255.255.255.0 --noipv6 --activate
network --hostname=centos
# Root password
rootpw --iscrypted $6$/hWAHGCpkNucLKMj$BQ9fBA8vVuutZUe5IZ/Ur2N.llXlyIBB4lb8MqCR6F/WG4M8zgZpUFPlaucfvb59yAlVontNMtQ5OcZk73dgq/
# System services
services --disabled="chronyd"
# System timezone
timezone Asia/Taipei --isUtc --nontp
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
autopart --type=lvm
# Partition clearing information
clearpart --none --initlabel
%packages
@^minimal
@core
kexec-tools
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end
reboot
I already setting ssh_host : 192.168.1.126 in centos7.json, but I check log show me TCP connection to SSH ip/port failed: dial tcp 127.0.0.1:22: connect: connection refused, how to resolve this issue ?
By the way, I can build success before on packer 1.6.X.
The text was updated successfully, but these errors were encountered:
Have the same problem. Host is Windows 10, guest is Ubuntu 18 using VirtualBox-iso source and ssh_port is recognised if I set skip_nat_mapping=true but on Packer 1.7.4 ssh_host was ignored.
Still broken on 1.9.4 (VirtualBox 6.1.38). ssh_host is apparently ignored so I can't make the communicator connect directly to the other host only adapter in the machine.
What is further annoying is that the port mapping is broken as well. It adds the mapping with a source host of 127.0.0.1, however this does not work. On my machine at least it's the IP address of my local ethernet adapter that needs to be specified in the VirtualBox port mapping.
I proved this by letting Packer start the virtual machine then manually going in and changing the port mapping that it has created - eh voila.
Quite a frustrating start to proceedings.
Edit:
I've managed to solve this by manually overriding the port mapping:
Host Information
v1.7.3
6.1.22r144080
Guest VM
CentOS Linux release 7.9.2009 (Core)
ks.cfg
centos7.json
Packer Debug Log
Exepct step
I already setting
ssh_host
:192.168.1.126
in centos7.json, but I check log show meTCP connection to SSH ip/port failed: dial tcp 127.0.0.1:22: connect: connection refused
, how to resolve this issue ?By the way, I can build success before on packer 1.6.X.
The text was updated successfully, but these errors were encountered: