Re: [libvirt] Current cpu and memory usage for Host and Domains

2010-01-18 Thread su disheng
On Sun, Jan 17, 2010 at 5:02 AM, Daniel P. Berrange wrote: > On Fri, Jan 15, 2010 at 11:52:09AM -0800, su disheng wrote: > > Seem there is no way to get host CPU usage in libvirt API? I can get > > freeMemory by virNodeGetFreeMemory, but no cpu usage API. > > How about add

Re: [libvirt] Current cpu and memory usage for Host and Domains

2010-01-15 Thread su disheng
Seem there is no way to get host CPU usage in libvirt API? I can get freeMemory by virNodeGetFreeMemory, but no cpu usage API. How about add a new api for it? The host CPU usage is also important for VM creation and migration decision, like the free memory. Yes, I know, I can got it from "top"...:

Re: [libvirt] [BUG?] "no domain with matching uuid" error, when vm restarts

2010-01-13 Thread su disheng
On Wed, Jan 13, 2010 at 2:39 AM, Daniel P. Berrange wrote: > On Tue, Jan 12, 2010 at 04:06:32PM -0800, su disheng wrote: > > Hi, > > In the following libvirt API calling sequence, I always get an error > "no > > domain with matching uuid" > >

[libvirt] [BUG?] "no domain with matching uuid" error, when vm restarts

2010-01-12 Thread su disheng
Hi, In the following libvirt API calling sequence, I always get an error "no domain with matching uuid" Connect _conn = new Connect("qemu:///system", false); _conn.domainDefineXML(kvm_guest_xml); Domain dm = _conn.domainLookupByName(kvm_guest_name); dm.create(