Public bug reported:
Two years ago I was able to create a Virtualbox Ubuntu 20.04 guest in a Windows
10 host with Packer 1.5.6, using an unattended installation.
The Packer command was:
"boot_command": [
"<enter><enter><f6><esc><wait> ",
"autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/",
"<enter>"
],
The user-data file was:
#cloud-config
autoinstall:
version: 1
identity:
realname: mclibre
hostname: ubuntu
password:
'$6$mclibre$YiuRPSZM3ZXVe4UyIqv1dvy9rUjf5/LsGCkDyaex.WN45wzVTuRmW5QLuctuicGAFZIO2M3QR8NLdtQYatKTn1'
username: mclibre
locale: es_ES.UTF-8
keyboard:
layout: es
network:
network:
version: 2
ethernets:
ens33: {dhcp4: true, dhcp-identifier: mac}
ssh:
install-server: true
late-commands:
- sed -i 's/^#*\(send dhcp-client-identifier\).*$/\1 = hardware;/'
/target/etc/dhcp/dhclient.conf
- 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/"
/target/etc/netplan/00-installer-config.yaml'
Now, I have tried to create a Virtualbox Ubuntu 20.04.4/.3/.2/.1 guest using
packer 1.5.6 but Packer can't create the image because once the installation is
done, after rebooting the SSH server does not answer (the packer log error
says: SSH handshake err: Timeout during SSH handshake).
I have tried with the last version of Packer, Packer 1.8.0, and the result is
the same. I can create a Ubuntu Server 20.4 image but not a Ubuntu Server
20.4.1, .2, .3 or .4 image.
I can provide as much aditional information as you want.
Thanking you in advance,
Bartolome Sintes
** Affects: ubuntu
Importance: Undecided
Status: New
** Tags: packer ssh unattended virtualbox
** Description changed:
Two years ago I was able to create a Virtualbox Ubuntu 20.04 guest in a
Windows 10 host with Packer 1.5.6, using an unattended installation.
The Packer command was:
- "boot_command": [
- "<enter><enter><f6><esc><wait> ",
- "autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/",
- "<enter>"
- ],
+ "boot_command": [
+ "<enter><enter><f6><esc><wait> ",
+ "autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/",
+ "<enter>"
+ ],
The user-data file was:
#cloud-config
autoinstall:
- version: 1
- identity:
- realname: mclibre
- hostname: ubuntu
- password:
'$6$mclibre$YiuRPSZM3ZXVe4UyIqv1dvy9rUjf5/LsGCkDyaex.WN45wzVTuRmW5QLuctuicGAFZIO2M3QR8NLdtQYatKTn1'
- username: mclibre
- locale: es_ES.UTF-8
- keyboard:
- layout: es
- network:
- network:
- version: 2
- ethernets:
- ens33: {dhcp4: true, dhcp-identifier: mac}
- ssh:
- install-server: true
- late-commands:
- - sed -i 's/^#*\(send dhcp-client-identifier\).*$/\1 = hardware;/'
/target/etc/dhcp/dhclient.conf
- - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/"
/target/etc/netplan/00-installer-config.yaml'
- Now, I have tried to create a Virtualbox Ubuntu 20.04.4/.3/.2/.1 guest using
packer 1.5.6 but Packer can't not create the image because once the
installation is done, after rebooting the SSH server does not answer (the
packer log error says: SSH handshake err: Timeout during SSH handshake).
+ version: 1
+ identity:
+ realname: mclibre
+ hostname: ubuntu
+ password:
'$6$mclibre$YiuRPSZM3ZXVe4UyIqv1dvy9rUjf5/LsGCkDyaex.WN45wzVTuRmW5QLuctuicGAFZIO2M3QR8NLdtQYatKTn1'
+ username: mclibre
+ locale: es_ES.UTF-8
+ keyboard:
+ layout: es
+ network:
+ network:
+ version: 2
+ ethernets:
+ ens33: {dhcp4: true, dhcp-identifier: mac}
+ ssh:
+ install-server: true
+ late-commands:
+ - sed -i 's/^#*\(send dhcp-client-identifier\).*$/\1 = hardware;/'
/target/etc/dhcp/dhclient.conf
+ - 'sed -i "s/dhcp4: true/&\n dhcp-identifier: mac/"
/target/etc/netplan/00-installer-config.yaml'
+ Now, I have tried to create a Virtualbox Ubuntu 20.04.4/.3/.2/.1 guest using
packer 1.5.6 but Packer can't create the image because once the installation is
done, after rebooting the SSH server does not answer (the packer log error
says: SSH handshake err: Timeout during SSH handshake).
I have tried with the last version of Packer, Packer 1.8.0, and the result is
the same. I can create a Ubuntu Server 20.4 image but not a Ubuntu Server
20.4.1, .2, .3 or .4 image.
I can provide as much aditional information as you want.
Thanking you in advance,
Bartolome Sintes
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1964642
Title:
Packer virtualbox ssh can't connect to unattended Ubuntu 20.04.1/2/3/4
but can connect to Ubuntu 20.4
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1964642/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs