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
--- libvirt-guests.sh 2016-02-23 10:29:33.287292357 +0100
+++ libvirt-guests.sh.back 2016-02-23 09:23:52.346580132 +0100
@@ -127,7 +127,7 @@
uri=$1
persistent=$2
- list=$(run_virsh_c "$uri" list --uuid $persistent | tr '\n' ' ')
+ list=$(run_virsh_c "$uri" list --uuid $persistent)
if [ $? -ne 0 ]; then
RETVAL=1
return 1
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list