[Qemu-devel] register_savevm()
When are save() and load() handlers actually used? When are they trying to save and restore state?
Re: [Qemu-devel] register_savevm()
On 17 April 2015 at 14:03, Catalin Vasile wrote: > When are save() and load() handlers actually used? > When are they trying to save and restore state? These are used for: * live migration * VM state save/load (eg via monitor 'savevm' and 'loadvm' commands or command line -loadvm option). Note that the register_savevm() function is legacy and should not be used in any new code. Devices should use VMStateDescription structs instead. -- PMM
Re: [Qemu-devel] register_savevm()
Does loadvm create new virtual devices (dev.init(), dev.realize(), etc.) for the vm to run onto and then load VMStateDescription? On Fri, Apr 17, 2015 at 4:40 PM, Peter Maydell wrote: > On 17 April 2015 at 14:03, Catalin Vasile > wrote: > > When are save() and load() handlers actually used? > > When are they trying to save and restore state? > > These are used for: > * live migration > * VM state save/load (eg via monitor 'savevm' and 'loadvm' > commands or command line -loadvm option). > > Note that the register_savevm() function is legacy and should > not be used in any new code. Devices should use VMStateDescription > structs instead. > > -- PMM >
Re: [Qemu-devel] register_savevm()
On 17 April 2015 at 14:54, Catalin Vasile wrote: > Does loadvm create new virtual devices (dev.init(), dev.realize(), etc.) for > the vm to run onto and then load VMStateDescription? loadvm itself does not, no. You have to start QEMU with the exact same configuration and command line options, which means the usual startup will create all the devices and connect them up. Then you can do a loadvm which will read the state into all the existing devices. -- PMM