proxmox:kvm:kvm-automated
This is an old revision of the document!
Table of Contents
Speedy KVM Creation
I created a special Debian 10 preseed iso just for my Proxmox kvm machines. I can go from zero to ready to rock in under 10 minutes!
Create the preseeded iso
The preseeded iso starts automatically, installs a few key packages, sets vim as my default editor and copies my ssh public key to my authorized_keys file so I can run the Ansible playbook right after install.
- I created the preseed file then added it to the ISO using my Zero Interaction method.
Create the Ansible Playbook
I created a small playbook to configure the system for me so it's set up the way I like.
- Run it like so:
ansible-playbook -v -b --ask-become-pass -i xxx.xxx.xxx.xxx, ansible.yml
—-
Create a VM
GUI
- Open the Proxmox web interface
- Upload the newly created preseed-iso to your Proxmox storage
- Create a VM with whatever settings you want, using the preseed-iso for the CD/DVD disk image.
- Start the virtual machine.
- Wait for it to complete. It took roughly 7 minutes for mine.
- Run the ansible playbook.
- Enjoy!
CLI
- ssh into Proxmox:
ssh user@proxmox
- The iso's on my system are located at
/media/sas/data/template/iso. Use your favorite file transfer method to get the iso file there (or the iso storage location on your system). - List current VMs:
sudo qm list
- Pick a free vmid and create a new VM with your preferred settings:
sudo qm create 150 --cdrom sas-storage:iso/preseed-debian-10.4.iso \ --name preseed --numa 0 --ostype l26 \ --cpu cputype=host --cores 2 --sockets 2 \ --memory 4096 \ --net0 bridge=vmbr90,virtio \ --bootdisk scsi0 --scsihw virtio-scsi-pci --scsi0 file=ssd-lvm:32 \ --serial0 socket --vga qxl --audio0 device=ich9-intel-hda,driver=spice
- Start the vm:
sudo qm start <vmid>
- Wait for it to complete.
- Run the ansible playbook.
- Enjoy!
proxmox/kvm/kvm-automated.1590616891.txt.gz · Last modified: by chuck
