<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Here's the error I sometimes get on checkpoint/restore.  It just happened again.  In this test I had at least a 40 second break between checkpoint and restore, so extra sleep doesn't seem to help much.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Error unpausing domain: Timed out during operation: cannot acquire state change lock (held by monitor=qemuDispatchDomainMonitorCommand)
<div><br>
</div>
<div>Traceback (most recent call last):</div>
<div>  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper</div>
<div>    callback(asyncjob, *args, **kwargs)</div>
<div>  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb</div>
<div>    callback(*args, **kwargs)</div>
<div>  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 66, in newfn</div>
<div>    ret = fn(self, *args, **kwargs)</div>
<div>  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1312, in resume</div>
<div>    self._backend.resume()</div>
<div>  File "/usr/lib64/python3.6/site-packages/libvirt.py", line 2174, in resume</div>
<div>    if ret == -1: raise libvirtError ('virDomainResume() failed', dom=self)</div>
libvirt.libvirtError: Timed out during operation: cannot acquire state change lock (held by monitor=qemuDispatchDomainMonitorCommand)<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Tony Brian Albers <tba@kb.dk><br>
<b>Sent:</b> Wednesday, September 8, 2021 12:06 AM<br>
<b>To:</b> Leek, Jim <leek2@llnl.gov>; virt-tools-list@redhat.com <virt-tools-list@redhat.com><br>
<b>Subject:</b> Re: Triggering a checkpoint from inside the VM</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On 08/09/2021 08.31, Leek, Jim wrote:<br>
> 1. I guess you mean by Using a shared disk?  That could work, I had some trouble with the shared disk before, I don’t think I ever got it to work. I’ll have to check my notes. IT has the host machine locked down very securely in some ways, and sometimes that
 causes trouble.<br>
<br>
On my host I've set up a local network that only the VM's and the host <br>
has access to. That makes it possible to do smth like:<br>
<br>
user@host$  ssh user@vm ls -l somefile<br>
<br>
and then compare that output to something you've defined, and trigger <br>
the savevm based on that.<br>
<br>
> <br>
> 2. I did specify the settings in virt-manager and I can use virsh. But sometimes I get an error from libvirt when doing a series of savevm and loadvm in a row. I have a hope that using qemu-kvm without libvirt might make it more reliable.  But as I said,
 I’m having trouble getting the networking and display working properly without libvirt.<br>
> <br>
<br>
I think libvirt is necessary to make networking and display work(not <br>
entirely sure). But the errors you get might be because the processes <br>
are scheduled too close to one another, see if you can put something <br>
like a sleep() in between them. I think 10 seconds will do.<br>
<br>
/tony<br>
<br>
> <br>
> ---<br>
> Sent from Workspace ONE Boxer<<a href=""></a>https://urldefense.us/v3/__https://whatisworkspaceone.com/boxer__;!!G2kpM7uM-TzIFchu!hbhAdjLTl6sGjvB4cfYJDpIObK0BhNLmWmmi0NEBWX7ls4h84l2slu6DAIhiKh0$ ><br>
> <br>
> On September 7, 2021 at 10:58:03 PM PDT, Tony Brian Albers <tba@kb.dk> wrote:<br>
> On 08/09/2021 06.22, Leek, Jim wrote:<br>
> <br>
>><br>
>>     1.  Connect to the qemu monitor with telnet from inside the VM.  (Therefore skipping the whole ssh remote command thing.)<br>
> <br>
> I'd go the other way around, make the guest touch a file somewhere and<br>
> let the host check if the file is there/has been updated, and based on<br>
> that, run the savevm process.<br>
> <br>
> <br>
>>     2.  Run the VM without virt-manager (perhaps that would be simpler?)<br>
>><br>
> <br>
> I think you can specify the settings for the VM through virt-manager and<br>
> then just use virsh to manage it afterwards.<br>
> <br>
> Also, check out github for kvm backup scripts, I know there are some<br>
> that you could use.<br>
> <br>
> <br>
> HTH<br>
> <br>
> /tony<br>
> <br>
> <br>
> --<br>
> Tony Albers - Systems Architect - Data Department, Royal Danish Library,<br>
> Victor Albecks Vej 1, 8000 Aarhus C, Denmark<br>
> Tel: +45 2566 2383 - CVR/SE: 2898 8842 - EAN: 5798000792142<br>
> <br>
<br>
<br>
-- <br>
Tony Albers - Systems Architect - Data Department, Royal Danish Library, <br>
Victor Albecks Vej 1, 8000 Aarhus C, Denmark<br>
Tel: +45 2566 2383 - CVR/SE: 2898 8842 - EAN: 5798000792142</div>
</span></font></div>
</body>
</html>