Changes for page proxmox
Last modified by Kevin Wiki on 2026/05/18 15:44
From version
11.3
edited by Kevin Wiki
on 2026/05/18 15:40
on 2026/05/18 15:40
Change comment:
There is no comment for this version
To version
9.5
edited by Kevin Wiki
on 2026/05/18 08:15
on 2026/05/18 08:15
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"%)** **(%%)**clearbash history**tonot leave anyconfigurationinhistory,clearanddisablehistoryfile beforeproceeding: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,23 +160,8 @@ 160 160 sudo systemctl start qemu-guest-agent.service 161 161 {{/code}} 162 162 163 - **resetmachine-id**tonothaveoverlapping idsfromsametemplate152 +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 -If you used a cloud-init base image it will have run the default cloudinit which installs and confi 173 - 174 -{{code language="bash"}} 175 -cloud-init clean 176 -{{/code}} 177 - 178 -This is a debian example of what we are looking for: 179 - 180 180 {{code language="yaml"}} 181 181 # The top level settings are used as module 182 182 # and system configuration. ... ... @@ -183,7 +183,10 @@ 183 183 # A set of users which may be applied and/or used by various modules 184 184 # when a 'default' entry is found it will reference the 'default_user' 185 185 # from the distro configuration specified below 160 +users: 161 + - 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,13 +196,18 @@ 196 196 # which has been a source of surprise. 197 197 preserve_sources_list: true 198 198 199 -# manually managed resolv 200 -manage_resolv_conf: false 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) 201 201 202 -package_update: true 203 -packages: 204 - - qemu-guest-agent 205 205 186 + 187 + 206 206 # The modules that run in the 'init' stage 207 207 cloud_init_modules: 208 208 - seed_random ... ... @@ -222,6 +222,8 @@ 222 222 223 223 # The modules that run in the 'config' stage 224 224 cloud_config_modules: 207 + - snap 208 + - ssh-import-id 225 225 - keyboard 226 226 - locale 227 227 - set-passwords ... ... @@ -232,11 +232,20 @@ 232 232 - timezone 233 233 - disable-ec2-metadata 234 234 - runcmd 219 + - byobu 235 235 236 236 # The modules that run in the 'final' stage 237 237 cloud_final_modules: 238 238 - package-update-upgrade-install 224 + - fan 225 + - landscape 226 + - lxd 239 239 - write-files-deferred 228 + - puppet 229 + - chef 230 + - mcollective 231 + - salt-minion 232 + - reset_rmc 240 240 - scripts-vendor 241 241 - scripts-per-once 242 242 - scripts-per-boot ... ... @@ -243,20 +243,25 @@ 243 243 - scripts-per-instance 244 244 - scripts-user 245 245 - ssh-authkey-fingerprints 246 - #- keys-to-console239 + - keys-to-console 247 247 - install-hotplug 248 - #- phone-home241 + - phone-home 249 249 - final-message 250 250 - power-state-change 251 251 252 -runcmd: 253 - - systemctl enable qemu-guest-agent.service 254 - 255 255 # System and/or distro specific settings 256 256 # (not accessible to handlers/transforms) 257 257 system_info: 258 258 # This will affect which distro class gets used 259 259 distro: debian 250 + # Default user name + that default users groups (if added/used) 251 + default_user: 252 + name: debian 253 + lock_passwd: True 254 + gecos: Debian 255 + groups: [adm, audio, cdrom, dialout, dip, floppy, plugdev, sudo, video] 256 + sudo: ["ALL=(ALL) NOPASSWD:ALL"] 257 + shell: /bin/bash 260 260 # Other config here will be given to the distro class and/or path classes 261 261 paths: 262 262 cloud_dir: /var/lib/cloud/ ... ... @@ -267,6 +267,7 @@ 267 267 primary: https://deb.debian.org/debian 268 268 security: https://deb.debian.org/debian-security 269 269 ssh_svcname: ssh 268 + 270 270 {{/code}} 271 271 272 272