[libvirt-users] Create multiple domains from single saved domain state (is UUID/name fixed?)

Martin Kletzander mkletzan at redhat.com
Tue Apr 19 09:23:32 UTC 2016


On Mon, Apr 18, 2016 at 10:05:02PM +0300, Michael Ravits wrote:
>Hi Jonas,
>
>I asked a similar question here last week. You could find it by searching
>for this topic in the mailing list archives: "Clone VM with saved state".
>That being said I'd be very glad if you could update here when you find a
>complete solution.
>
>- Michael
>

What I *think* Jones wants is to use virt-builder, it could cause some
problems if you started all of them.  What Michael wants is:

  virsh save running_domain saved-image-file.img
  virsh save-image-edit saved-image-file.img

Hope that helped,
Martin

>On Mon, Apr 18, 2016 at 9:49 PM, Jonas Finnemann Jensen <jonasfj at mozilla.com
>> wrote:
>
>> Hi,
>>
>> I would like to save a running domain (ie. disk + memory) and be able to
>> restore it multiple times creating duplicates of the orignal domain all
>> starting from the same state.
>> Use case:
>> I'm building a task-processing system for use in a CI flow.
>> I want to run multiple VMs in parallel using the same image (always
>> starting from the same state).
>> And to avoid needlessly booting between each task, I would like to save
>> (and distribute) the domain state, so that I just restore from memory.
>>
>> However, I can't seems to change the UUID or the name of a domain once it
>> is saved.
>> Nor do I seem able to rename a domain while it is running.
>>
>> I can obviously duplicate both the disks and the file to which I saved the
>> domain state using "virsh save".
>> But I seem unable to rename before I restore.. Any ideas?
>>
>> Could I do this with snapshots? I suspect not since I see
>> virDomainSnapshotRedefinePrep() calling
>> virDomainDefCheckABIStability which raises the error here:
>> https://fossies.org/dox/libvirt-1.3.3/domain__conf_8c_source.html#l17991
>>
>> Out of curiosity does anyone know what horrors might befall me if I were
>> to remove the lines protecting against name and UUID changes? Then compile
>> my own libvirt...
>> The comment in the code says name can be changed, but I'm guessing I would
>> have to change the UUID too. Does anyone see how that would create issues?
>> I'm not sure how libvirt uses the UUID internally.
>>
>> --
>> Regards Jonas Finnemann Jensen.
>>
>> _______________________________________________
>> libvirt-users mailing list
>> libvirt-users at redhat.com
>> https://www.redhat.com/mailman/listinfo/libvirt-users
>>

>_______________________________________________
>libvirt-users mailing list
>libvirt-users at redhat.com
>https://www.redhat.com/mailman/listinfo/libvirt-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20160419/d1675b9b/attachment.sig>


More information about the libvirt-users mailing list