How to create Debian VM on VMWare using preseed config file

Hi all,

I want to automate the installation of Debian VM on my VMWare infrastructure with using Ansible.

I would like know how can create the playbook to start the installation from the ISO file with giving the preseed config file to have auto-answer during the installation.

Steps:

  1. Create the VM with community.vmware.vmware_guest : DONE
    with add the Debian ISO file
  2. I’ma able to power on the VM to start with the ISO file

But I’m not able to give the path of the preseed.cfg file and start the installation.

I need help,
Thanks
Olivier

Hi @Olivier_Studer,

You can try by using vmware_guest_sendkey module to send keyboard input to boot loader menu, edit boot menu entry to add path to preseed.cfg (served on some HTTP/FTP server) and then boot the machine. I have personally not tested this but it should be achievable. There is a catch though, you cannot send an arbitrary combination of special keys and characters. You have to call the module multiple times, first by sending some special keys, then some characters, then some special keys and so on. Please consult the documentation for details:

https://docs.ansible.com/ansible/latest/collections/community/vmware/vmware_guest_sendkey_module.html

The other, more robust solution is to use PXE boot. I have outlined the basic idea here:

1 Like