virProcessKillPainfully will raise a libvirt error, so log it. We
can drop the manual pid logging since ProcessKill always reports
the pid in its error message.
---
src/bhyve/bhyve_process.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c
index 14588a9..f2ec712 100644
--- a/src/bhyve/bhyve_process.c
+++ b/src/bhyve/bhyve_process.c
@@ -283,9 +283,8 @@ virBhyveProcessStop(bhyveConnPtr driver,
/* First, try to kill 'bhyve' process */
if (virProcessKillPainfully(vm->pid, true) != 0)
- VIR_WARN("Failed to gracefully stop bhyve VM '%s' (pid: %d)",
- vm->def->name,
- (int)vm->pid);
+ VIR_WARN("Failed to gracefully stop bhyve VM '%s': %s",
+ vm->def->name, virGetLastErrorMessage());
/* Cleanup network interfaces */
bhyveNetCleanup(vm);
--
2.5.0