Changes for page proxmox
Last modified by Kevin Wiki on 2026/05/18 15:44
From version
10.2
edited by Kevin Wiki
on 2026/05/18 08:18
on 2026/05/18 08:18
Change comment:
There is no comment for this version
To version
11.2
edited by Kevin Wiki
on 2026/05/18 15:38
on 2026/05/18 15:38
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -138,6 +138,8 @@ 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: 142 + 141 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"}} ... ... @@ -149,7 +149,7 @@ 149 149 sudo systemctl start qemu-guest-agent.service 150 150 {{/code}} 151 151 152 -**reset machine-id** to not have overlapping ids from same templat 154 +**reset machine-id** to not have overlapping ids from same template 153 153 154 154 {{code language="bash"}} 155 155 cat /dev/null > /etc/machine-id ... ... @@ -156,8 +156,11 @@ 156 156 cat /dev/null > /var/lib/dbus/machine-id 157 157 {{/code}} 158 158 159 -**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 .161 +**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 160 160 163 +{{code language="bash"}} 164 +cloud-init clean 165 +{{/code}} 161 161 162 162 This is a debian example of what we are looking for: 163 163 ... ... @@ -167,8 +167,6 @@ 167 167 # A set of users which may be applied and/or used by various modules 168 168 # when a 'default' entry is found it will reference the 'default_user' 169 169 # from the distro configuration specified below 170 -users: 171 - - default 172 172 173 173 # If this is set, 'root' will not be able to ssh in and they 174 174 # will get a message to login instead as the default $user ... ... @@ -182,6 +182,13 @@ 182 182 # which has been a source of surprise. 183 183 preserve_sources_list: true 184 184 188 +# manually managed resolv 189 +manage_resolv_conf: false 190 + 191 +package_update: true 192 +packages: 193 + - qemu-guest-agent 194 + 185 185 # The modules that run in the 'init' stage 186 186 cloud_init_modules: 187 187 - seed_random ... ... @@ -201,6 +201,7 @@ 201 201 202 202 # The modules that run in the 'config' stage 203 203 cloud_config_modules: 214 + - keyboard 204 204 - locale 205 205 - set-passwords 206 206 - grub-dpkg ... ... @@ -227,20 +227,14 @@ 227 227 - final-message 228 228 - power-state-change 229 229 241 +runcmd: 242 + - systemctl enable qemu-guest-agent.service 243 + 230 230 # System and/or distro specific settings 231 231 # (not accessible to handlers/transforms) 232 232 system_info: 233 233 # This will affect which distro class gets used 234 234 distro: debian 235 - # Default user name + that default users groups (if added/used) 236 - default_user: 237 - name: debian 238 - lock_passwd: True 239 - gecos: Debian 240 - groups: [sudo] 241 - # Disables password-less sudo commands for default/debian user 242 - sudo: ["ALL=(ALL) ALL"] 243 - shell: /bin/bash 244 244 # Other config here will be given to the distro class and/or path classes 245 245 paths: 246 246 cloud_dir: /var/lib/cloud/