Created
September 4, 2020 18:49
-
-
Save SwampDragons/c0ad4948c5667d81c4276a6a3a7f9e46 to your computer and use it in GitHub Desktop.
Basic Ubuntu 20.04 autoinstallation using cd_files
This file contains 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
#cloud-config | |
autoinstall: | |
version: 1 | |
identity: | |
hostname: ubuntu-server | |
password: '$6$wdAcoXrU039hKYPd$508Qvbe7ObUnxoj15DRCkzC3qO7edjH0VV7BPNRDYK4QR8ofJaEEF2heacn0QgD.f8pO8SNp83XNdWG6tocBM1' | |
username: ubuntu | |
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' | |
This file contains 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
{ | |
"builders": [ | |
{ | |
"name": "ubuntu-2004-vmware", | |
"type": "vmware-iso", | |
"guest_os_type": "ubuntu-64", | |
"headless": false, | |
"iso_checksum": "sha256:443511f6bf12402c12503733059269a2e10dec602916c0a75263e5d990f6bb93", | |
"iso_url": "https://releases.ubuntu.com/20.04/ubuntu-20.04.1-live-server-amd64.iso", | |
"ssh_username": "ubuntu", | |
"ssh_password": "ubuntu", | |
"ssh_handshake_attempts": "100", | |
"ssh_timeout": "10000s", | |
"cd_files": ["./meta-data", "./user-data"], | |
"cd_label": "cidata", | |
"memory": 1024, | |
"boot_wait": "5s", | |
"boot_command": [ | |
"<enter><wait2><enter><wait><f6><esc><wait>", | |
" autoinstall<wait2> ds=nocloud", | |
"<wait><enter>" | |
] | |
} | |
], | |
"provisioners": [ | |
{ | |
"inline": [ | |
"ls /" | |
], | |
"type": "shell" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
meta-data is an empty file.
naming the volume "cidata" will cause ubuntu to automatically detect and mount it to load the data at boot.