Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am planing to write a resource monitoring code using some API for vms running on kvm. I have already tried libvirt but I have other issues with it(vms started with qemu-kvm are not visible). Is there any other library similar to libvirt that can help me out? Thanks !

Sethu

share|improve this question

1 Answer 1

up vote 0 down vote accepted

in libvirts' defence - it's a management and monitoring system, if you run something outside it, how can it keep track?

Anyhow, without knowing what exactly you want to monitor it's hard to provide advice. In general, I would run a monitoring agent inside the guests to report the guests' own take on resource use, and also check resources allocated to the VM CPU threads using top, systemtap and the likes There's also the kvm_stat package, and quite a few additional tools, so everything really depends on what you need to know. Every monitoring tools adds a bit of overhead, so monitoring absolutely everything is usually an overkill

share|improve this answer
    
No, Libvirt works fine. I tried it out and it satisfies all my requirements. I dont want to know the resource usage inside vm. The problem I face with libvirt is, I have to start vms using the libvirt based tools like virsh or virt-manager inorder to monitor them. If I create a vm with plain qemu-kvm -m 1024 -hda image.img , A vm is created but not reflected in libvirts list of domains. –  sethu Jul 5 '11 at 14:15
    
this is working as it should, why and how can libvirt monitor a VM that it didn't start and configure? start a VM using libvirt, and then look for it in ps -ef - you'll see how many options are used, one of which is the qemu-monitor, which allows libvirt to tap into the VM, and poll data –  dyasny Jul 5 '11 at 16:19
    
Yeah , One of my requirements is using the -incoming <statefile> , which is not supported by libvirt. I am trying to clone a VM. So I clone a disk image, create a statefile and start a new vm using these two. Libvirt save can give me this functionality, but it takes the xml and stores it along with the statefile, thus not allowing me to use the newly cloned image. This is the only reason I am looking for other monitoring tools. Libvirt satisfies all my other needs, and if Libvirt can help me restore a VM with new image, then it is perfect for me :) –  sethu Jul 5 '11 at 16:50
    
well, libvirt can't be perfect, neither can any other system. however, since we're talking about opensource, you can always write the feature you need, and submit it. –  dyasny Jul 5 '11 at 19:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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