ansible-role-libvirt-vm
ansible-role-libvirt-vm copied to clipboard
Install VM with virt-builder
Hello,
I open this issue because I wish to implement a way to install VMs with virt-builder
(from libguestfs project).
I wish to list here everything we need to think about and the useful information.
-
virt-builder
can set up some basic settings on the VM OS, like the hostname and the root password. It can also copy a file to the desired location on the VM volume. -
virt-builder
downloads (from a libguestfs-maintained repository or a custom one) a template of a given OS (containing partitions) and deploy it on a file (raw or qcow) or on a block device, with ability to automatically expand the partitions to fit the given device. - Sadly,
virt-builder
can't yet use qemu storage backends to access target storage, so you have to map it to a block device in order to deploy on it usingvirt-builder
. For instance, for RBD, you have to map it using RADOS kernel module or RBD-NBD implementation.
Do you think this is a good idea?
Hi, I'm wondering if there is any overlap between this and what we already have in this role? If not, maybe it would make sense as a separate role?
i.e. would a virt-builder implementation just replace the entire role, or would it reuse any existing code?
I think it would be another method of provisionning a VM.
If I understand correctly, there is currently only 2 ways to provision a VM volume: image
and backing_image
.
We could add a third option builder
.
I think it sounds like an alternative without too much overlap. I'd suggest making a separate role.
Could you explain a bit? I don't think it will overlap that much.
What I mean is that I don't think there will be much overlap. This role is one way to make a VM, and virt-builder is another way. I think adding both options to one role would be confusing.
OK, I see. Thanks for clarifying.