Issue creating template using Static IP #644
-
Based on #17 I have setup my #cloud-config
autoinstall:
version: 1
apt:
geoip: true
preserve_sources_list: false
primary:
- arches: [amd64, i386]
uri: http://archive.ubuntu.com/ubuntu
- arches: [default]
uri: http://ports.ubuntu.com/ubuntu-ports
early-commands:
# Stop ssh server during install so that Packer does not get confused
- sudo systemctl stop ssh
users:
- default
- name: lab
lock_passwd: true
passwd: '$6$rounds=4096$XzEg6.VC4gm1WF9o$Gau4DDqkqHxIp5YK.9bjMiIO.ibnjAbdqXEW5Aoirw3n9rdej/bh9T7Jfs7q98Sz6iDbnn1cb8kw.JVIHswFO1'
identity:
hostname: control-vm
username: lab
password: '$6$rounds=4096$XzEg6.VC4gm1WF9o$Gau4DDqkqHxIp5YK.9bjMiIO.ibnjAbdqXEW5Aoirw3n9rdej/bh9T7Jfs7q98Sz6iDbnn1cb8kw.JVIHswFO1'
ssh:
allow-pw: true
install-server: true
user-data:
disable_root: false
locale: en_US
keyboard:
layout: us
network:
network:
version: 2
ethernets:
ens160:
addresses:
- 10.122.18.90/25
gateway4: 10.122.18.1
nameservers:
addresses:
- 64.102.6.247
storage:
layout:
name: direct
config:
- type: disk
id: disk0
match:
size: largest
- type: partition
id: boot-partition
device: disk0
size: 500M
- type: partition
id: root-partition
device: disk0
size: -1
late-commands:
- sed -i -e 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /target/etc/ssh/sshd_config
- echo 'lab ALL=(ALL) NOPASSWD:ALL' > /target/etc/sudoers.d/lab The machine is deployed as expected but Packer picks up a wrong IP address and does not continue ==> vsphere-iso.control_vm: Waiting for IP...
2023/08/15 02:18:32 packer-plugin-vsphere_v1.2.1_x5.0_linux_amd64 plugin: 2023/08/15 02:18:32 VM IP aquired: 172.16.3.167
2023/08/15 02:18:32 packer-plugin-vsphere_v1.2.1_x5.0_linux_amd64 plugin: 2023/08/15 02:18:32 VM IP is still the same: 172.16.3.167
2023/08/15 02:18:33 packer-plugin-vsphere_v1.2.1_x5.0_linux_amd64 plugin: 2023/08/15 02:18:33 VM IP is still the same: 172.16.3.167
2023/08/15 02:18:34 packer-plugin-vsphere_v1.2.1_x5.0_linux_amd64 plugin: 2023/08/15 02:18:34 VM IP is still the same: 172.16.3.167
2023/08/15 02:18:35 packer-plugin-vsphere_v1.2.1_x5.0_linux_amd64 plugin: 2023/08/15 02:18:35 VM IP is still the same: 172.16.3.167
2023/08/15 02:18:36 packer-plugin-vsphere_v1.2.1_x5.0_linux_amd64 plugin: 2023/08/15 02:18:36 VM IP is still the same: 172.16.3.167
2023/08/15 02:18:37 packer-plugin-vsphere_v1.2.1_x5.0_linux_amd64 plugin: 2023/08/15 02:18:37 VM IP is still the same: 172.16.3.167
2023/08/15 02:18:37 packer-plugin-vsphere_v1.2.1_x5.0_linux_amd64 plugin: 2023/08/15 02:18:37 VM IP seems stable enough: 172.16.3.167
2023/08/15 02:18:37 packer-plugin-vsphere_v1.2.1_x5.0_linux_amd64 plugin: 2023/08/15 02:18:37 [INFO] Waiting for SSH, up to timeout: 30m0s
==> vsphere-iso.control_vm: IP address: 172.16.3.167
==> vsphere-iso.control_vm: Using SSH communicator to connect: 172.16.3.167
==> vsphere-iso.control_vm: Waiting for SSH to become available...
2023/08/15 02:18:52 packer-plugin-vsphere_v1.2.1_x5.0_linux_amd64 plugin: 2023/08/15 02:18:52 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 172.16.3.167:22: i/o timeout
2023/08/15 02:19:12 packer-plugin-vsphere_v1.2.1_x5.0_linux_amd64 plugin: 2023/08/15 02:19:12 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 172.16.3.167:22: i/o timeout
2023/08/15 02:19:32 packer-plugin-vsphere_v1.2.1_x5.0_linux_amd64 plugin: 2023/08/15 02:19: See the IP address mismatch. I really have no idea where does that IP come from.... |
Beta Was this translation helpful? Give feedback.
Answered by
tenthirtyam
Aug 15, 2023
Replies: 1 comment
-
Not yet supported in this project but there is a pending PR that does. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tenthirtyam
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not yet supported in this project but there is a pending PR that does.