On Wed, Jun 6, 2012 at 10:57 AM, Michael Johns <michaelj8982@xxxxxxxxx> wrote: > Hi list, > > Before using KVM I was using Xen, and am hoping to see if I can do > similar things in KVM. In Xen, I could watch for starting and stopping > virtual machines by using a script which polled the XenStore, a small > database from which small amounts of information about running > machines which indicated the presence or not of virtual machine > instances. > > I am wondering whether there is a similar mechanism I may be able to > use in KVM? I have been messing around with it and looking around > online for about a week now, but there just doesn't seem to be > anything which I can use in the same way. > If you are using libvirt, you could do something like [root@vmhost ~]# virsh list --all Id Name State ---------------------------------- 2 ubuntu-desktop-86 running - centos-64 shut off - crackdev shut off [root@vmhost ~]# and do some parsing. There are probably better ways to do it though. > Regards, > > Michael > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html