[libvirt] libvirt-guests.sh not correctly working - patch included

Draget draget at speciesm.net
Tue Feb 23 09:53:15 UTC 2016


Greetings,

this mail is sent via CC to ubunutu-devel, because I am not 100% sure if
the found formating issue might originate from some ubuntu issue.

libvirst-guests.sh on Ubuntu Xenial would not work correctly for me.
Only one of the guests would be correctly suspended while the others
were killed violently.

Package: libvirt-bin
Version: 1.3.1-1ubuntu2
/usr/lib/libvirt/libvirt-guests.sh

The script writes a list of the VMs it will manage into
/usr/lib/libvirt/libvirt-guests but I noticed it was in the format:

<url> <vm uuid>
<vm uuid>
<vm uuid>

and only the first VM was handled. After reading through the script and
doing some try & error patches, I figured that the correct format should be:

<url> <vm uuid> <vm uuid> <vm uuid>

i.e. with no new lines. The attached patch makes sure the returned list
of VMs does not contain new lines. This fixed the issue.

Additionally I would suggest adding an information message on line line 444.
Changing:
      [ -f "$LISTFILE" ] && return 0
to:
      [ -f "$LISTFILE" ] && echo "No VMs started by libvirt-guests.sh,
not doing anything." && return 0

Regards,
Michael Gajda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-guests.sh.patch
Type: text/x-patch
Size: 369 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160223/e50ecfd9/attachment-0001.bin>


More information about the libvir-list mailing list