[libvirt-users] VM cloning with memory state

Peter Krempa pkrempa at redhat.com
Mon Sep 23 08:31:47 UTC 2019


On Mon, Sep 23, 2019 at 11:17:21 +0300, Benny Zlotnik wrote:
> Hi,
> 
> We are trying to implement VM cloning with snapshots for ovirt. For
> the most part, everything seems to work fine.  However, when
> saved-state comes into play it gets complicated.  As it seems
> impossible to restore a saved state file for a different VM due to a
> mismatch in UUID and name, I was wondering if it is possible to
> somehow work around this?
> Is it a sensible thing to do? (these are essentially the same VMs in
> terms of configuration and disk content)
> Is there a better approach to cloning a VM entirely (with snapshots and memory)?

It is a rather bad idea to try to run a second copy of the same memory
state captured in the past:

1) network connections which exist become duplicate
2) the networking stack on the host may become confused by duplicated
   MAC addresses (changing the MAC in the XML is not enough when the
   guest is running!)
3) the state of pseudo-random number generators will be duplicated
4) Any other VM specific unique-identifiers will become duplicate
5) State of applications running in the guest would be duplicated. Apps
   may react very poorly to this.

This question has already appeared before but nobody yet provided a
satisfactory use case for cloning a running VM.




More information about the libvirt-users mailing list