Last active
February 12, 2026 03:44
-
-
Save jarrod180/d02eb5e63b8257dd148a6bbb7a571ed9 to your computer and use it in GitHub Desktop.
Deploy a ubuntu OVA to VMWare ESXi with cloud init user-data yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| First create a cloud config YAML file, save it for example, as "my-user-data.yaml" | |
| --- | |
| #cloud-config | |
| hostname: ubuntu-vm1 | |
| users: | |
| - default | |
| - name: someuser | |
| sudo: ALL=(ALL) NOPASSWD:ALL | |
| groups: users, admin | |
| ssh_authorized_keys: "ssh-rsa AAAAB3NzaC1yc................... my-ssh-key" | |
| # Now Using OVF Tool, deploy the image and pass the user data yaml as a property | |
| ovftool --name=<vmname> --skipManifestCheck --noSSLVerify --datastore=<ds name> --powerOn=True --net:"VM Network=VM Network" --overwrite --powerOffTarget --X:injectOvfEnv --allowExtraConfig --prop:user-data=$(cat my-user-data.yaml | base64 --wrap=0) ./ubuntu-20.04-server-cloudimg-amd64.ova 'vi:///<user>:<pass>@your.server' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment