Simple KVM setup for Ubuntu 22.04 LTS.
In order to start, type:
mkdir -p ~/repos && cd ~/repos && git clone https://github.com/mikelogaciuk/ubuntu-kvm.git && cd ubuntu-kvm
Then generate all the needed directories:
rake generate:folders
Fetch cloud image and resize it to 30GB:
rake image:fetch
Generate SSH keys and link them to the project:
rake generate:ssh
Virsh:
rake pool:create
To prototype the machine, type:
terraform init
terraform apply
ssh -t [email protected] bash -l
In order to check if cloud-init has done its job, type:
sudo tail -30 /var/log/cloud-init-output.log
In order to destroy everything, type:
terraform destroy
ssh-keygen -f "$HOME/.ssh/known_hosts" -R "192.168.122.89"