search for: virdomaininfo

Displaying 19 results from an estimated 19 matches for "virdomaininfo".

2010 Aug 14
1
cpuTimes and qemu-kvm on F13
http://libvirt.org/html/libvirt-libvirt.html#virDomainInfo http://libvirt.org/html/libvirt-libvirt.html#virVcpuInfo Both virDomainInfo and virVcpuInfo have a nanosecond cpuTime field. How do the two related to one another? With some experiementing, it appears the virDomainInfo::cpuTime is equal to the host CPU time used by the qemu-kvm process for the...
2013 Sep 25
2
Collecting system stats
...he virtual machines. This report will help figure out if we are running low on hypervisor disk, CPU or memory and if we need to add more. I can't find the libvirt API call to get system info, such as total memory in the system, free memory, total disk space, available disk space, etc. There is virDomainInfo which shows memory total and free about a particular VM, I guess I can use active/inactive domain list and then use virDomainInfo on each of the VM's, but that does not give me hypervisor stats. I am wondering if I will have to enable SNMP and use that to get hypervisors stats. I am creating t...
2013 Dec 23
3
Reg: Methods in DomainJobInfo
Hi All, I am new to libvirt. Please explain about the units (which is bytes or KB or MB) and uses of DomainJobInfo and DomainBlockInfo methods. Like getMemRemaining(), getDataRemaining() etc. Using libvirt version is libvirt-0.5.1. Thank you Regards, Rathidevi
2013 Feb 28
1
The accurate CPU usage of a domain?
Hi,all I want to get a relatively accurate cpu usage of a domain. I have a few questions about virDomainGetInfo: struct virDomainInfo{ unsigned char state : //the running state, one of virDomainState unsigned long maxMem :// the maximum memory in KBytes allowed unsigned long memory :// the memory in KBytes used by the domain unsigned short nrVirtCpu :// the number of virtual CPUs for the domain unsigned long long cpuTim...
2013 Sep 24
2
virDomainGetInfo() returns wrong domain state
..._DOMAIN_PAUSED) || (libvirt_state == VIR_DOMAIN_BLOCKED)) { state = cidl_vm_state_paused; } else if (libvirt_state == VIR_DOMAIN_SHUTOFF) { state = cidl_vm_state_defined; } else { state = cidl_vm_state_not_defined; } return state; } virDomainInfo res_util; virDomainPtr dom = virDomainLookupByName(virt, private_names[vm_idx]); res = virDomainGetInfo(dom, &res_util); vminfo[vm_idx].vm_state = vm_libvirt_state_to_vmm_state(res_util.st...
2013 Sep 25
0
Re: Collecting system stats
...ort > will help figure out if we are running low on hypervisor disk, CPU or > memory and if we need to add more. > > I can't find the libvirt API call to get system info, such as total memory > in the system, free memory, total disk space, available disk space, etc. > There is virDomainInfo which shows memory total and free about a particular > VM, I guess I can use active/inactive domain list and then use > virDomainInfo on each of the VM's, but that does not give me hypervisor > stats. I am wondering if I will have to enable SNMP and use that to get > hypervisors sta...
2013 Sep 25
0
Re: virDomainGetInfo() returns wrong domain state
..._DOMAIN_PAUSED) || (libvirt_state == VIR_DOMAIN_BLOCKED)) { state = cidl_vm_state_paused; } else if (libvirt_state == VIR_DOMAIN_SHUTOFF) { state = cidl_vm_state_defined; } else { state = cidl_vm_state_not_defined; } return state; } virDomainInfo res_util; virDomainPtr dom = virDomainLookupByName(virt, private_names[vm_idx]); res = virDomainGetInfo(dom, &res_util); vminfo[vm_idx].vm_state = vm_libvirt_state_to_vmm_state(res_util.st...
2013 Sep 26
0
Re: [libvirt] virDomainGetInfo() returns wrong domain state
...; > > } else { > > state = cidl_vm_state_not_defined; > > } > > return state; > > } While this part ^^^ looks okay, the part below looks suspicious. I mean not from API perspective, but from data perspective. > > > > virDomainInfo res_util; > > virDomainPtr dom = virDomainLookupByName(virt, > > private_names[vm_idx]); Are you sure you're passing the correct name here? That's the only possible source of the error here. > >...
2013 Sep 26
1
Re: [libvirt] virDomainGetInfo() returns wrong domain state
...; > > } else { > > state = cidl_vm_state_not_defined; > > } > > return state; > > } While this part ^^^ looks okay, the part below looks suspicious. I mean not from API perspective, but from data perspective. > > > > virDomainInfo res_util; > > virDomainPtr dom = virDomainLookupByName(virt, > > > private_names[vm_idx]); Are you sure you're passing the correct name here? That's the only possible source of the error here. > >...
2011 Feb 09
1
How to use Python Binding with Lbivirt.
HI, I am using ubuntu host machine and KVM is present as guest in that machine.Two virtual machines are there.I am using Python binding to query on the hypervisor and extract the VM related information. Here is my simple code: #!/*usr*/local/bin/*python * import libvirt import sys conn = libvirt.openReadOnly(None) if conn == None: print *'Failed to open connection to the
2019 Apr 08
0
[PATCH v4 3/7] v2v: switch to ocaml-libvirt
...-/* Get the remote domain state (running, etc.). Use virDomainGetState - * which is most efficient, but if it's not implemented, fall back to - * virDomainGetInfo. See equivalent code in virsh. - */ -static int -get_dom_state (virDomainPtr dom) -{ - int state, reason; - virErrorPtr err; - virDomainInfo info; - - if (virDomainGetState (dom, &state, &reason, 0) == 0) - return state; - - err = virGetLastError (); - if (!err || err->code != VIR_ERR_NO_SUPPORT) - return -1; - - if (virDomainGetInfo (dom, &info) == 0) - return info.state; - - return -1; -} - -/* See lib/lib...
2018 Aug 30
8
[PATCH 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2018 Nov 27
8
[PATCH v2 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2019 Jan 30
8
[PATCH v3 0/7] RFC: switch v2v to ocaml-libvirt
Hi, this is a mostly done attempt to switch to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not
2019 May 20
8
[PATCH v5 0/7] v2v: switch to ocaml-libvirt
Hi, this series switches virt-2v to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not test all
2019 Apr 08
12
[PATCH 43 0/7] v2v: switch to ocaml-libvirt
Hi, this series switches virt-2v to ocaml-libvirt, embedding the latest version of it from git. This way, it is possible to improve the way v2v connects to libvirt for both input, and output modules, and interacts with libvirt (e.g. no more virsh calls needed in virt-v2v). As side effect, virt-v2v now requires libvirt, as keeping it optional would create too much burden. I could not test all
2019 Apr 08
0
[PATCH v4 2/7] common: Bundle the libvirt-ocaml library for use by virt-v2v
...r; + + NONBLOCKING (r = virDomainSetMemory (dom, mem)); + CHECK_ERROR (r == -1, "virDomainSetMemory"); + + CAMLreturn (Val_unit); +} + +CAMLprim value +ocaml_libvirt_domain_get_info (value domv) +{ + CAMLparam1 (domv); + CAMLlocal2 (rv, v); + virDomainPtr dom = Domain_val (domv); + virDomainInfo info; + int r; + + NONBLOCKING (r = virDomainGetInfo (dom, &info)); + CHECK_ERROR (r == -1, "virDomainGetInfo"); + + rv = caml_alloc (5, 0); + Store_field (rv, 0, Val_int (info.state)); // These flags are compatible. + v = caml_copy_int64 (info.maxMem); Store_field (rv, 1, v); +...
2019 Dec 16
3
[v2v PATCH 0/2] Move libvirt-ocaml copy to v2v repo
libvirt-ocaml is used only by virt-v2v, so move it to this repository, instead of having it around in the common submodule. The removal from common will happen later. Pino Toscano (2): common: Bundle the libvirt-ocaml library for use by virt-v2v build: switch embedded copy of libvirt-ocaml .gitignore | 2 + 3rdparty/libvirt-ocaml/Makefile.am |
2017 Jun 27
3
[PATCH] libvirt: disallow non-local connections (RHBZ#1347830)
...he libvirt connection: %s"), + uristr); + return -1; + } + + if (uri->server && uri->server[0] != '\0') { + error (g, _("cannot add a non-local libvirt connection: %s"), + uristr); + return -1; + } + if (!readonly) { virDomainInfo info; virErrorPtr err; @@ -320,7 +354,7 @@ guestfs_impl_add_libvirt_dom (guestfs_h *g, void *domvp, * all disks are added or none are added. */ ckp = guestfs_int_checkpoint_drives (g); - r = for_each_disk (g, virDomainGetConnect (dom), doc, add_disk, &data); + r = for_each_dis...