Philip Prindeville
2014-Apr-25 17:49 UTC
[libvirt-users] Deriving VMs from a reference image via scripts
Hi. I have a reference .vmdk (and .xml) reference VM. I need to instantiate multiple new VM’s from this, but changing various parameters: name, MAC address, network connections, cores, memory size, disk size and backing store, etc. and then start these new VM’s… all via ‘virsh’ et al from a script. What are the steps to do this? I was looking at the command help and some tutorials but apparently not the right ones. Thanks, -Philip
Eric Blake
2014-Apr-25 18:51 UTC
Re: [libvirt-users] Deriving VMs from a reference image via scripts
On 04/25/2014 11:49 AM, Philip Prindeville wrote:> Hi. > > I have a reference .vmdk (and .xml) reference VM. I need to instantiate multiple new VM’s from this, but changing various parameters: name, MAC address, network connections, cores, memory size, disk size and backing store, etc. and then start these new VM’s… all via ‘virsh’ et al from a script.You may want to look at virt-sysprep, part of the libguestfs suite of tools, which can automate a number of these tasks when creating derivative cloned VMs. From the tools perspective, most of your work will be done outside of virsh, in prepping the new disk images and creating new derivative xml, then finally calling into virsh to start the new xml. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org