yes the network card is connected.
no, the vm is not pingable.
the template:
{
“builders”: [
{
“type”: “vsphere-iso”,
“vcenter_server”: “{{user vcenter-server
}}”,
“username”: “{{user vcenter-username
}}”,
“password”: “{{user vcenter-password
}}”,
“insecure_connection”: “true”,
“datacenter”: “{{user datacenter
}}”,
“vm_name”: “{{user vm-name
}}”,
“datastore”: “{{user datastore
}}”,
“folder”: “{{user folder
}}”,
“host”: “{{user host
}}”,
“cluster”: “{{user cluster
}}”,
“convert_to_template”: “true”,
“network_adapters”: [
{
“network”: “{{user network
}}”,
“network_card”: “vmxnet3”
}
],
“boot_order”: “disk,cdrom”,
“guest_os_type”: “debian10_64Guest”,
“ssh_username”: “{{user ssh-username
}}”,
“ssh_password”: “{{user ssh-password
}}”,
“CPUs”: “{{user vm-cpu-num
}}”,
“CPU_hot_plug”: true,
“RAM”: “{{user vm-mem-size
}}”,
“RAM_reserve_all”: true,
“RAM_hot_plug”: true,
“disk_controller_type”: “pvscsi”,
“storage”: [
{
“disk_size”: “{{user vm-disk-size
}}”,
“disk_thin_provisioned”: true
}
],
“iso_checksum”: “sha256:{{user iso-checksum
}}”,
“iso_urls”: “{{user iso-url
}}”,
“shutdown_command”: “echo ‘shutdown’ | sudo -S shutdown -P now”,
“http_directory”: “http”,
“boot_command”: [
“”,
"install ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ",
"debian-installer=fr_FR.UTF-8 ",
"auto ",
"locale=fr_FR.UTF-8 ",
"kbd-chooser/method=fr ",
"keyboard-configuration/xkb-keymap=fr ",
"netcfg/get_hostname={{ .Name }} ",
"netcfg/get_domain=domaine.local ",
"fb=false ",
"debconf/frontend=noninteractive ",
"console-setup/ask_detect=false ",
"console-keymaps-at/keymap=fr ",
"grub-installer/bootdev=/dev/sda ",
“”
]
}
],
“provisioners”: [
{
“environment_vars”: [
“HOME_DIR=/home/precom”,
“http_proxy={{user http-proxy
}}”,
“https_proxy={{user https-proxy
}}”,
“no_proxy={{user no-proxy
}}”
],
“inline”: [
“echo ‘Packer Template Build – Complete’”
],
“type”: “shell”
}
]
}
the preseed:
Setting the locales, country
Supported locales available in /usr/share/i18n/SUPPORTED
d-i debian-installer/language string fr
d-i debian-installer/country string fr
d-i debian-installer/locale string fr_FR.UTF-8
Keyboard setting
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string fr
d-i keyboard-configuration/xkb-keymap fr
d-i keyboard-configuration/modelcode string pc105
#network settings
#d-i netcfg/enable boolean false
d-i netcfg/choose_interface select auto
d-i netcfg/disable_autoconfig boolean true
d-i netcfg/get_ipaddress string 192.53.231.85
d-i netcfg/get_netmask string 255.255.255.0
d-i netcfg/get_gateway string 192.53.231.254
d-i netcfg/get_nameservers string 128.1.233.215
d-i netcfg/confirm_static boolean true
d-i netcfg/get_ipaddress seen true
d-i netcfg/get_netmask seen true
User creation
d-i passwd/user-fullname string xxxx
d-i passwd/username string precom
d-i passwd/user-password password xxxxx
d-i passwd/user-password-again password xxxx
d-i user-setup/allow-password-weak boolean true
Disk and Partitioning setup
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
d-i partman-auto/method string lvm
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/confirm_write_new_label boolean true*
Set mirror
apt-mirror-setup apt-setup/use_mirror boolean true
choose-mirror-bin mirror/http/proxy string
d-i mirror/country string manual
d-i mirror/http/directory string /debian
d-i mirror/http/hostname string httpredir.debian.org
d-i mirror/http/proxy string
Set root password
d-i passwd/root-login boolean false
d-i passwd/root-password-again password xxxx
d-i passwd/root-password password xxxxx
d-i passwd/user-fullname string xxxxx
d-i passwd/user-uid string 1000
d-i passwd/user-password password xxxxx
d-i passwd/user-password-again password xxxxx
d-i passwd/username string XXXX
Package installations
popularity-contest popularity-contest/participate boolean false
tasksel tasksel/first multiselect standard, ssh-server
d-i pkgsel/include string openssh-serv
d-i pkgsel/include string sudo wget curl open-vm-tools
d-i pkgsel/install-language-support boolean false
d-i pkgsel/update-policy select none
d-i pkgsel/upgrade select full-upgrade
d-i grub-installer/only_debian boolean true
d-i finish-install/reboot_in_progress note