Time to pause VM

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
ikada
Posts: 3
Joined: 31. Mar 2016, 23:03

Time to pause VM

Post by ikada »

How long does it take to pause a VM? I'm measuring ~100ms from the Python API but I just realized that the actual freeze could be near instantaneous and the time it takes to save the RAM might take the bulk of the time.

Is there a better way of measuring the internal time of the VM? I'm trying to minimize the time it takes to pause a VM so I can measure things while it's paused, then resume again, preferably at around 30Hz. (I realize this isn't a standard use case.)
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Time to pause VM

Post by noteirak »

Pausing a VM does not save the state on disk, the virtual CPU execution is just halted, so 100ms sounds about right.

Or are you refering to the saveState() operation?
If you do, saveState() returns a IProgress object on which you can wait for full completion of the action using waitForCompletion() with a timeout of -1
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply