Changes for page proxmox

Last modified by Kevin Wiki on 2026/05/18 15:44

From version 10.4
edited by Kevin Wiki
on 2026/05/18 08:22
Change comment: There is no comment for this version
To version 9.6
edited by Kevin Wiki
on 2026/05/18 08:16
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -138,20 +138,9 @@
138 138  
139 139  After creating the VM and before making it into a template there are some programs and settings we want to ensure exists always.
140 140  
141 -(% id="cke_bm_721114S" style="display:none" %)** **(%%)**clear bash history** to not leave any configuration in history, clear and disable history file before proceeding:
141 +qemu-guest-agent is for allowing proxmox to query information from the VM such as IP address, shutdown commands, etc
142 142  
143 143  {{code language="bash"}}
144 -unset HISTFILE
145 -export HISTSIZE=0
146 -export HISTFILESIZE=0
147 -
148 -sudo rm /.bash_history
149 -rm ~/.bash_history
150 -{{/code}}
151 -
152 -**qemu-guest-agent** is for allowing proxmox to query information from the VM such as IP address, shutdown commands, etc
153 -
154 -{{code language="bash"}}
155 155  sudo apt update
156 156  sudo apt upgrade -y
157 157  sudo apt install qemu-guest-agent -y
... ... @@ -160,21 +160,8 @@
160 160  sudo systemctl start qemu-guest-agent.service
161 161  {{/code}}
162 162  
163 -**reset machine-id** to not have overlapping ids from same template
152 +cloud-init is a great hook for installing or configuring programs or receiving variables from cloudinit CDROM drive. Making it easier to change IP, hostname, DNS, username/password, etc between VMs.
164 164  
165 -{{code language="bash"}}
166 -cat /dev/null > /etc/machine-id
167 -cat /dev/null > /var/lib/dbus/machine-id
168 -{{/code}}
169 -
170 -**cloud-init** is a great hook for installing or configuring programs or receiving variables from cloudinit CDROM drive. Making it easier to change IP, hostname, DNS, username/password, etc between VMs
171 -
172 -{{code language="bash"}}
173 -cloud-init clean
174 -{{/code}}
175 -
176 -This is a debian example of what we are looking for:
177 -
178 178  {{code language="yaml"}}
179 179  # The top level settings are used as module
180 180  # and system configuration.
... ... @@ -184,6 +184,7 @@
184 184  users:
185 185   - default
186 186  
163 +
187 187  # If this is set, 'root' will not be able to ssh in and they
188 188  # will get a message to login instead as the default $user
189 189  disable_root: true
... ... @@ -196,6 +196,18 @@
196 196   # which has been a source of surprise.
197 197   preserve_sources_list: true
198 198  
176 +# If you use datasource_list array, keep array items in a single line.
177 +# If you use multi line array, ds-identify script won't read array items.
178 +# Example datasource config
179 +# datasource:
180 +# Ec2:
181 +# metadata_urls: [ 'blah.com' ]
182 +# timeout: 5 # (defaults to 50 seconds)
183 +# max_wait: 10 # (defaults to 120 seconds)
184 +
185 +
186 +
187 +
199 199  # The modules that run in the 'init' stage
200 200  cloud_init_modules:
201 201   - seed_random
... ... @@ -215,6 +215,9 @@
215 215  
216 216  # The modules that run in the 'config' stage
217 217  cloud_config_modules:
207 + - snap
208 + - ssh-import-id
209 + - keyboard
218 218   - locale
219 219   - set-passwords
220 220   - grub-dpkg
... ... @@ -224,11 +224,20 @@
224 224   - timezone
225 225   - disable-ec2-metadata
226 226   - runcmd
219 + - byobu
227 227  
228 228  # The modules that run in the 'final' stage
229 229  cloud_final_modules:
230 230   - package-update-upgrade-install
224 + - fan
225 + - landscape
226 + - lxd
231 231   - write-files-deferred
228 + - puppet
229 + - chef
230 + - mcollective
231 + - salt-minion
232 + - reset_rmc
232 232   - scripts-vendor
233 233   - scripts-per-once
234 234   - scripts-per-boot
... ... @@ -235,9 +235,9 @@
235 235   - scripts-per-instance
236 236   - scripts-user
237 237   - ssh-authkey-fingerprints
238 -# - keys-to-console
239 + - keys-to-console
239 239   - install-hotplug
240 -# - phone-home
241 + - phone-home
241 241   - final-message
242 242   - power-state-change
243 243  
... ... @@ -251,9 +251,8 @@
251 251   name: debian
252 252   lock_passwd: True
253 253   gecos: Debian
254 - groups: [sudo]
255 - # Disables password-less sudo commands for default/debian user
256 - sudo: ["ALL=(ALL) ALL"]
255 + groups: [adm, audio, cdrom, dialout, dip, floppy, plugdev, sudo, video]
256 + sudo: ["ALL=(ALL) NOPASSWD:ALL"]
257 257   shell: /bin/bash
258 258   # Other config here will be given to the distro class and/or path classes
259 259   paths:
... ... @@ -265,6 +265,7 @@
265 265   primary: https://deb.debian.org/debian
266 266   security: https://deb.debian.org/debian-security
267 267   ssh_svcname: ssh
268 +
268 268  {{/code}}
269 269  
270 270