<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dhits.nl/index.php?action=history&amp;feed=atom&amp;title=Proxmox_Cloud-init_with_custom_UserData</id>
	<title>Proxmox Cloud-init with custom UserData - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dhits.nl/index.php?action=history&amp;feed=atom&amp;title=Proxmox_Cloud-init_with_custom_UserData"/>
	<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Proxmox_Cloud-init_with_custom_UserData&amp;action=history"/>
	<updated>2026-06-13T14:00:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.dhits.nl/index.php?title=Proxmox_Cloud-init_with_custom_UserData&amp;diff=8996&amp;oldid=prev</id>
		<title>Tony: Created page with &quot;==Create the template==  qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci  qm set 9000 --scsi0 local-lvm:0,import-from=/var/lib/vz/template/iso/noble-server-cloudimg-amd64.img   qm set 9000 --ide2 local-lvm:cloudinit  qm set 9000 --boot order=scsi0  qm template 9000  ==Enable snippets on your storage== Datastore-&gt;local (or whatever storage you want to use) -&gt; edit and tag &quot;snippets&quot;  ==Create UserData file== create file &#039;&#039;&#039;/var/lib/vz/snip...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.dhits.nl/index.php?title=Proxmox_Cloud-init_with_custom_UserData&amp;diff=8996&amp;oldid=prev"/>
		<updated>2024-07-01T15:02:24Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Create the template==  qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci  qm set 9000 --scsi0 local-lvm:0,import-from=/var/lib/vz/template/iso/noble-server-cloudimg-amd64.img   qm set 9000 --ide2 local-lvm:cloudinit  qm set 9000 --boot order=scsi0  qm template 9000  ==Enable snippets on your storage== Datastore-&amp;gt;local (or whatever storage you want to use) -&amp;gt; edit and tag &amp;quot;snippets&amp;quot;  ==Create UserData file== create file &amp;#039;&amp;#039;&amp;#039;/var/lib/vz/snip...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Create the template==&lt;br /&gt;
 qm create 9000 --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci&lt;br /&gt;
 qm set 9000 --scsi0 local-lvm:0,import-from=/var/lib/vz/template/iso/noble-server-cloudimg-amd64.img&lt;br /&gt;
&lt;br /&gt;
 qm set 9000 --ide2 local-lvm:cloudinit&lt;br /&gt;
 qm set 9000 --boot order=scsi0&lt;br /&gt;
 qm template 9000&lt;br /&gt;
&lt;br /&gt;
==Enable snippets on your storage==&lt;br /&gt;
Datastore-&amp;gt;local (or whatever storage you want to use) -&amp;gt; edit and tag &amp;quot;snippets&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Create UserData file==&lt;br /&gt;
create file &amp;#039;&amp;#039;&amp;#039;/var/lib/vz/snippets/ansible.yaml&amp;#039;&amp;#039;&amp;#039; containing&lt;br /&gt;
 #cloud-config&lt;br /&gt;
 ssh_pwauth: false&lt;br /&gt;
&lt;br /&gt;
 users:&lt;br /&gt;
 - name: ansible&lt;br /&gt;
&lt;br /&gt;
   gecos: Ansible User&lt;br /&gt;
&lt;br /&gt;
   groups: users,admin,wheel&lt;br /&gt;
&lt;br /&gt;
   sudo: ALL=(ALL) NOPASSWD:ALL&lt;br /&gt;
&lt;br /&gt;
   shell: /bin/bash&lt;br /&gt;
&lt;br /&gt;
   lock_passwd: true&lt;br /&gt;
&lt;br /&gt;
   ssh_authorized_keys:&lt;br /&gt;
     - ssh-rsa AAAAB3&lt;br /&gt;
&lt;br /&gt;
NOTE: this is yaml, so check your indentation :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Clone the template==&lt;br /&gt;
&lt;br /&gt;
qm clone 9000 131 --name ansibletest&lt;br /&gt;
qm set 131 --cicustom &amp;quot;user=pbs-saspool:snippets/ansible.yaml&amp;quot;&lt;br /&gt;
qm set 131 --ipconfig0 ip=192.168.100.131/24,gw=192.168.100.15&lt;/div&gt;</summary>
		<author><name>Tony</name></author>
	</entry>
</feed>