[libvirt] Failed to terminate process 1275 with SIGTERM: Device or resource busy

Daniel P. Berrange berrange at redhat.com
Tue Jan 19 13:55:11 UTC 2016


On Tue, Jan 19, 2016 at 01:48:10PM +0000, Richard W.M. Jones wrote:
> On Tue, Jan 19, 2016 at 01:43:58PM +0000, Daniel P. Berrange wrote:
> > I don't think it does. Passing GRACEFUL flag means libvirt will try
> > /less/ hard to kill QEMU, so it is /more/ likely that you will get
> > the
> > 
> >   "Failed to terminate process 1275 with SIGTERM: Device or resource busy"
> > 
> > In general, that error message is something to be expected from the
> > virDomainDestroy() API, as we won't wait for death forever. If an
> > app wishes to wait forever, they should either re-issue the destroy
> > API call, or wait for an event notification of VIR_DOMAIN_EVENT_STOPPED
> > to arrive.
> 
> IIUC, we should trap this specific error, and then basically loop if
> it happens?  Is there a good way to trap specific errors without
> trying to match error message text?

You can match on err.code==VIR_ERR_SYSTEM_ERROR & err.int1 == EBUSY

The latter match is not entirely recommended, since if talking to a
libvirtd on a remote host with different operating system to the
client host, the errno values won't match, but I think it is fine
for libguestfs which always uses a local libvirt.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list