Re: Clone VM with saved state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 12, 2016 at 03:15:16PM +0300, Michael Ravits wrote:
> Hi Kashyap,
> 
> Thanks for your answer!
> 
> Unfortunately my use case requires cloning the exact memory state, so I
> won't be able to use virt-sysprep.
> But the snapshot command looks like something I could use.
> Could you suggest how to proceed and create/start a new vm from that
> snapshot?

Afraid, I don't know of a trivial way to create a new VM from the kind
of snapshot ('external system checkpoint' snapshot) where you have two
files: disk state, and memory state.  You might have to play around a
bit and construct a script + XML definition file that allows you to
create a new VM from these files.   Maybe Eric Blake has better
suggestions.

If you _just_ want to save memory state, then you can try `virsh save`
and `virsh restore` (read more about them here: `man virsh`).

[...]

> > With 'virsh', you _can_ save the live disk and memory state:
> >
> >     $ virsh snapshot-create-as \
> >         --domain myvm snap1 \
> >         --diskspec vda,file=./disk-snap.qcow2,snapshot=external \
> >         --memspec file=./mem-snap.qcow2,snapshot=external \
> >         --atomic
> >
> >
> > --
> > /kashyap
> >

-- 
/kashyap

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users



[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux