A virtual machine template can be very complex due to the high number of sections and attributes available, but fortunately, most defaults are fine, so we will start with another simple example.
Each virtual machine template needs to contain information about the required CPU and memory, and about which disk images should be available and to which networks the VM should be attached.
Most machines you need will probably be configured correctly, as follows:
NAME = web001 CPU = 0.25 VCPU = 4
The first is a dedicated host CPU portion (where 1.0 is a core at full power), and the second is the number of virtual CPUs attached to the virtual machine.
A swap partition would be practically useless if submitted into the Image Repository, so it is defined directly here in the machine template. The code is as follows:
MEMORY = 512 DISK = [ image_id = 2 ] DISK = [ type = swap, size = 1024 ]
This datablock is kept even after the VM shut down. Otherwise, it will be automatically...