KVM/libguestfs-tools/virt-builder

is a command line tool for building new virtual machines.

Examples

 * and  to see if there is notes available.

virt-builder ubuntu-18.04 --format qcow2 --hostname YOUR_HOST_NAME --root-password password:YOUR_PASSWORD [  2.0] Downloading: http://libguestfs.org/download/builder/ubuntu-18.04.xz [ 286.1] Planning how to build this image [ 286.1] Uncompressing [ 288.2] Converting raw to qcow2 [ 291.1] Opening the new disk [ 298.2] Setting a random seed virt-builder: warning: random seed could not be set for this type of guest [ 298.2] Setting the hostname: YOUR_HOST_NAME [ 299.1] Setting passwords [ 299.8] Finishing off Output file: ubuntu-18.04.qcow2 Output size: 6.0G Output format: qcow2 Total usable space: 5.8G Free space: 4.3G (74%)
 * 1) 100.0%#   ################################################################################################################### 100.0%

To boot it under libvirt use  command.