Here is how to create a cloud-init disk image and OS disk image suitable for configuring into a libvirt domain file.
In my case I am naming my domain (a.k.a. virtual machine or VM) xenial
with a static IP address of 192.168.0.101
.
The filenames "network-config" and "user-data" files are arbitrary, so they can be named with a prefix for the domain, etc.
First, get the cloud image and convert into QCOW2 format:
qemu-img convert -O qcow2 xenial-server-cloudimg-amd64-disk1.img xenial-server-cloudimg-amd64-disk1.qcow2