The recent fix to libvirt-guests.sh.in works for what it intended to fix
(variable scope) but failed to adapt the loop in check_guests_shutdown
accordingly. Due to that it currently detects all guests as "Failed to
determine state of guest".
This change fixes loop to use the passed value and the call in the loop
to use what is iterated on.
Fixes: 7e476356 "tools: fix variable scope in in check_guests_shutdown"
Signed-off-by: Christian Ehrhardt <email address hidden>
All Xen PV and HVM with PV driver support a memory balloon device,
which cannot be disabled through the toolstack. Model the device
in the libxl driver, similar to the recently removed xend-based
driver.
Signed-off-by: Jim Fehlig <email address hidden>
Reviewed-by: Daniel P. Berrangé <email address hidden>
For openvzDomObjFromDomainLocked and openvzDomainLookupByID
let's return a locked and referenced @vm object so that callers
can then use the common and more consistent virDomainObjEndAPI
in order to handle cleanup rather than needing to know that the
returned object is locked and calling virObjectUnlock.
The LookupByName already returns the ref counted and locked object,
so this will make things more consistent.
Signed-off-by: John Ferlan <email address hidden>
Reviewed-by: Jim Fehlig <email address hidden>
openvz: Add more descriptive error message on Find failure
If openvzDomainLookupByID or openvzDomainLookupByName fails
to find a vm, let's be a bit more descriptive by providing
the failing id or name in the error message.
Signed-off-by: John Ferlan <email address hidden>
Reviewed-by: Jim Fehlig <email address hidden>
lxc: Fix possible leaked @vm in lxcDomainCreateXMLWithFiles
In error paths, if we call virDomainObjListRemove we will leak
the @vm because we have called with a reffed and locked @vm.
So rather than set it to NULL, relock the @vm and allow the
virDomainObjEndAPI to perform the magic of Unlock/Unref.