Virtual Machine Management
There are two possible things you want to do. Create a new virtual machine instance on the existing infrastructure ("spinning up a vm") or create a new base image suitable for use with the infrastructure.
Spinning up a VM
Creating a new base image
To the largest extent possible, we use ansible to manage service configuration and machine bringup. Because ansible does all of the necessary configuration, the base images should be as stock as possible.
Creating a VM Environment
The easiest way to use virtualization on Linux is with virt-manager. On Ubuntu, follow . It is packaged on most distros. Make sure to check your distro's documentation, as you likely need to add yourself to a certain group to get permissions to manage virtual machines. Download a setup ISO for the distro you are creating a base image for. Here's some screenshots of the steps to follow.
Select "browse local" and find the ISO you're using.
The settings you use here don't particularly matter, since only the resulting disk image will be used.
Select 16GiB, which is our default base disk size.
Installing and Configuring Debian
Boot the new VM, and select "install".
Select the locale.
The default hostname is fine, Ansible will change it when necessary.
Leave this empty.
Enter the COSI Default Root Password.
Create the ansible user.
The defaults here are fine.
Chose the default.
Don't participte in the popularity contest.
Use the arrow keys and spacebar to deselect everything and select SSH server, then continue.
Use the defaults for GRUB.
Now that installation is complete, some additional setup is needed. Log in as root.
apt install ca-certificates sudo gpasswd -a ansible sudo systemctl enable getty@ttyS0 su ansible mkdir .ssh cd .ssh wget https://raw.githubusercontent.com/COSI-Lab/ansible/master/authorized_keys
The first command installs TLS certificates (needed for the later wget) and sudo (so the ansible user can elevate permissions). The third command enables a login console on the ttyS0 device, which will be used for 'virsh console' later. The rest is setting up ansible's public key for configuration when a new VM is spinned up from this image.