virt-manager screen shot

My recent post on fixing terminator was months in the making, partly because I lost the environment I was using to double-check all the steps and partly because other things just kept coming up.  Several months back when I found the original fix it was only available as a patch in bugzilla.  I’d constructed a whole article about how to get the patch, update the spec file, build a new rpm, etc. but in the midst of this I lost the virtual machine I was using twice to a suspend that would not resume.  I also ran into some problems using yum-downloader to get the source rpm I could not reliably reproduce or document.

Time went by and an updated source rpm was available to fix vte so it seemed silly to document all the tedious steps to patch the spec file and rebuild when that work was already done, but then I was thwarted again when I rebooted my laptop and forgot I had a guest running.

It was a frustrating situation from the virt-manager GUI and the command line–my only options were resume (which didn’t work because of the error message below) and shut-down (which did the opposite of what I wanted the virtual machine to do).

On Google I found scant references to this situation so I turned to a company-wide mailing list at work where anyone can post technical questions.  I had the solution in 30 minutes!

This was the cryptic error message I received in virt-manager when trying to resume the guest:

Error restoring domain: Unable to read from monitor: Connection reset by peer

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 44, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1050, in startup
self._backend.create()
File "/usr/lib64/python2.6/site-packages/libvirt.py", line 510, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: Unable to read from monitor: Connection reset by peer

 

The error message made no sense to me--I can’t resume the domain because the monitor cannot be read?  How about, “Unable to resume domain.  If this persists try ‘virsh mangedsave-remove’ from a command line to remove the suspended session and reboot your machine.” Including the word “suspend” in the command instead of “managedsave” would also be more intuitive.

Here is the command to remove a corrupted suspended virtual machine session so you can boot your machine again–naturally you’ll lose the suspended session you had:

$ su -c 'virsh managedsave-remove NameOfDomain'

I’ve also confirmed on RHEL 6.2 (beta) that rebooting the hypervisor with a running guests, smoothly suspends and resumes them again when the hypervisor returns.

 

Feeling stuck?

Want clarity or help moving something forward?

Let me help