I'm running several KVM with libvirt on a debian wheezy host. I want to check networking (maybe more later on) on the guests and if it is not available, restart the guest in question.

Is there something built-in in libvirt or would a simple pinging-bash-script be the answer? Are there any pre-build solutions?


I'd suggest not to search for libvirt-internal means since the question of service availability (or activity) strongly depends on the service (and guest system) used.

  • For monitoring the availability of network services on the guests, I'd prefer a bash script with ping since it will not cause much load and is easy to maintain/extend. Just register it with cron.

  • If you're considering the outbound/inbound network traffic of a guest then I'd suggest monitoring the traffic activity to/from the virtual network interfaces (and IP addresses of the guests) on the host. I'd use tshark for scripts and wireshark or iftop for manual inspection.

  • If you're considering traffic (or availability) of some service on the localhost address on the guests (hopefully not...), you must do it inside the guest because the host system can not know. Then, the tools depend on the guest system, of course.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.