

I’m using match.name: en* to prevent having to know the ethernet interface name in advance. The network section matches the Netplan configuration. The network block is a little wonky and the duplicate network is intentional and required due to a bug. Within the user-data, we’reĬreating the dustin user that may only login via SSH.

#UBUNTU VIRTUALBOX IMAGE PASSWORD#
I’m using this to prevent having to set a password for a default user. The user-data key allows us to use cloud-init configuration. The Autoinstallation documentation describes other available configuration options.

set the server’s hostname to ubuntu-server.#cloud-config autoinstall : version : 1 user-data : hostname : ubuntu-server users : - name : dustin lock_passwd : true ssh_authorized_keys : - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC9bAo+yzhzI/+FaeBj0i+HNy7O5BQ/mCMEHghvuAtH8XMJxGjikTPiC0t3YZ28XCyP+laRTVY6kdaWMCB5j40FE+UGco6YgXjW+dI0P/b0Idq+V9xTEJnPG元M1uurQQuBClPs3Ns8aYUiNKxniQqFf4XrmGzqmNxtbtgrjXhrpApqx2u196iPf6/ZJtvZ0+VdwyEO5hNgHUbsDBSN7zicFfzCcbrDFCZ4d2N圜7gD76dh3/cmRSTYPS23UNfZi9eBj85bzG7CM0+eeHa4NbWWZR2iJcfgQ/EKb5TtYIHf4d6G7uGZ9dLbn3fyaxsTUA9LsMEOhjePV4IRrltsfXIXrR5+oQAJsUHxo0bOUQTP4h3sm55BRoZHJqfMmKQ42jAYK1ESuQi036hyocf+brTnkSTgo03XzHc3hGFtwNANa7pSBT/KMALzdJn6OBurrexB5tbLplb88R2R5INFuvzYEjiZ42YkfR3JJMWgU/YRbSTo+WBJeyI1eIpeTOGciis= sudo : ALL=(ALL) NOPASSWD:ALL ssh : install-server : true network : network : version : 2 ethernets : enwild : match : name : en* addresses : - 192.168.0.137 /24 dhcp4 : false gateway4 : 192.168.0.1 nameservers : addresses : - 192.168.0.1
