User Tools

Site Tools


debian_ansible_hands-free_installs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
debian_ansible_hands-free_installs [2026/05/11 05:00] mikedebian_ansible_hands-free_installs [2026/05/12 07:48] (current) mike
Line 44: Line 44:
 # Enable the qemu guest agent(recommend) # Enable the qemu guest agent(recommend)
   qm set 9000 --agent enabled=1   qm set 9000 --agent enabled=1
 +  
 +=== Testing the Template (Optional) ===
 +== Start and Verify the VM ==
 +# Start the VM for testing
 +  qm start 9000
 +
 +# Check cloud-init configuration
 +  qm cloudinit dump 9000 user
 +
 +# Monitor startup process
 +  qm console 9000
 +
 +# Check the VM IP
 +  qm guest cmd 9000 network-get-interfaces
 +
 +== Verify Cloud-Init Completion ==
 +Once logged into the VM:
 +# Check cloud-init status
 +  sudo cloud-init status
 +
 +# View cloud-init logs
 +  sudo tail -20 /var/log/cloud-init-output.log
 +
 +# Check system information
 +  cat /etc/os-release
 +  
 +After successful testing, shutdown the VM:
 +# Shutdown the VM
 +  qm shutdown 9000
 +  
 +=== Converting to Template ===
 +Convert the VM to a template:
 +# Convert to template (irreversible operation)
 +  qm template 9000
 +  
 +=== Cloning VMs from Template ===
 +== Using Proxmox Web Interface ==
 +  - Navigate to Templates: In the PVE web interface, locate your template (VM ID 9000)
 +  - Clone Template: Right-click → “Clone” or use the Clone button
 +  - Configure Clone Settings:
 +    * VM ID: Choose an unused ID (e.g., 101)
 +    * Name: Descriptive name (e.g., “debian-selfhosted-server”)
 +    * Mode: Full Clone (recommended for production)
 +    * Target Storage: Select appropriate storage
 +
 +== Resize Disk After Cloning ==
 +  - Access Hardware Tab: Select the cloned VM -> Hardware Tab
 +  - Resize Disk: Select scsi0 disk -> 'Resize disk'
 +  - Set New Size: Enter desired size (e.g., 50GB for container hosts)
 +
 +== Configure Cloud-Init for New VM ==
 +  - Cloud-Init Tab: Navigate to the Cloud-Init tab
 +  - Configure Settings:
 +    * User: Set username (e.g., "admin")
 +    * Password: Set secure password
 +    * SSH Public Key: paste your SSH public key
 +    * IP Config: Choose DHCP or static IP configuration
 +  - Apply Changes: Click "Regenerate Image"
debian_ansible_hands-free_installs.1778500802.txt.gz · Last modified: by mike

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki