mkdir cloud-init
hostname: vm2 instance-id: debian-12-genericcloud-amd64
#cloud-config users: - name: nutzer expiredate: '2037-09-01' lock_passwd: false sudo: ALL=(ALL) NOPASSWD:ALL plain_text_passwd: 'villa' shell: /bin/bash ssh_authorized_keys: - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP4YVUx3HYqDuH3W4ZVj/QGVGWzDjkWLDLaCvdxMLuE7 Ingo - name: root lock_passwd: false plain_text_passwd: 'vogelsang' runcmd: - sed -ri 's/^(PasswordAuthentication.*)/#\1/' /etc/ssh/sshd_config - systemctl restart ssh.service - hostnamectl set-hostname "vm2"
version: 2 ethernets: enp1s0: match: macaddress: "52:54:00:00:01:02" set-name: enp1s0 addresses: - 192.168.229.102/24 gateway4: 192.168.229.1 nameservers: search: [linuxhotel.de] addresses: [192.168.1.5]
ISO erzeugen:
xorriso -as mkisofs -output cloud-init.iso -volid cidata -rational-rock -joliet cloud-init/*