Displaying 20 results from an estimated 29 matches for "virdomaingetinfo".
2013 Sep 24
2
virDomainGetInfo() returns wrong domain state
Hi Team,
I have written below code to get the VM state at run time. I found, though the VM is in shut-off state, when I use the function virDomainGetInfo(); I get state as running. Could you please let me know what wrong I am doing. To know the actual VM state I used 'virsh list' and it clearly shows the VM is in shut-off state. Please find the log and code snippet below.
Log from virsh:
=================
[host:~]$ virsh list --all
Id...
2013 Sep 26
1
Re: [libvirt] virDomainGetInfo() returns wrong domain state
...r information pulled are correct. And the same way we have used libvirt APIs to extract other informations at different places.
My question is if VM is in shut-off state does it mean running ? IF not, what is the correct state for this VM. I am wondering why the state is 'unsigned char' in virDomainGetInfo, why it could not be 'enum' as it is returning enums only.
Regards
Ritesh Sharma
-----Original Message-----
From: Michal Privoznik [mailto:mprivozn@redhat.com]
Sent: Thursday, September 26, 2013 12:54 PM
To: Panday Ritesh Sharma (rpanday)
Cc: libvir-list@redhat.com; libvirt-users@redh...
2013 Sep 25
0
Re: virDomainGetInfo() returns wrong domain state
...e help me with below query.
Regards
Ritesh Sharma
From: Panday Ritesh Sharma (rpanday)
Sent: Tuesday, September 24, 2013 8:22 PM
To: 'libvir-list@redhat.com'; 'libvirt-users@redhat.com'; Vinay Shankarkumar (vinays)
Cc: Basavaraj Bendigeri (bbendige); q-se-dev(mailer list)
Subject: virDomainGetInfo() returns wrong domain state
Hi Team,
I have written below code to get the VM state at run time. I found, though the VM is in shut-off state, when I use the function virDomainGetInfo(); I get state as running. Could you please let me know what wrong I am doing. To know the actual VM state I used...
2013 Feb 28
0
With no luck with virDomainGetInfo and virDomainMemoryStats for memory usage of a running vm
Hi, all
I am trying to get used memory of a running vm using libvirt and then to calculate the memory usage, but with no luck.
1.The used memory returned by virDomainGetInfo is equal to max memory with no virtio balloon driver set. When using virtio balloon driver and setting currentMemory less than memory in the xml, the used memory returned by virDomainGetInfo is nearly equal to currentMemroy. Again, I can't get the memory used by vm. 2. When I turned to virDom...
2013 Sep 26
0
Re: [libvirt] virDomainGetInfo() returns wrong domain state
On 24.09.2013 16:51, Panday Ritesh Sharma (rpanday) wrote:
>
>
> Hi Team,
>
> I have written below code to get the VM state at run time. I found,
> though the VM is in shut-off state, when I use the function
> virDomainGetInfo(); I get state as running. Could you please let me
> know what wrong I am doing. To know the actual VM state I used ‘virsh
> list’ and it clearly shows the VM is in shut-off state. Please find the
> log and code snippet below.
>
>
>
> Log from virsh:
>
> ===========...
2014 Jul 05
1
Source code of virt-manager
Hi,
Does anyone know where I could view the source code of virt-manager? Because I'm trying to learn how the virt-manager gets the CPU usage of a VM(the graph it displays). I'm trying to make a program using java that gets the CPU usage of a VM in KVM. Anybody have suggestions on where I could start?Thanks
regards,
Marco
2013 Feb 07
0
There seems a deadlock in libvirt
...c5782b50) at qemu/qemu_driver.c:2181
priv = 0x7f69a0093b00
driver = 0x7f69b80ca8e0
vm = 0x7f69a0093370
ret = -1
err = <optimized out>
balloon = <optimized out>
__FUNCTION__ = "qemudDomainGetInfo"
#6 0x00007f69c9f63eda in virDomainGetInfo (domain=0x7f69980e3650,
info=0x7f69c5782b50) at libvirt.c:4230
ret = <optimized out>
conn = <optimized out>
__func__ = "virDomainGetInfo"
__FUNCTION__ = "virDomainGetInfo"
#7 0x0000000000439bca in remoteDispatchDomainGetInfo (ret=0x7f...
2011 Sep 13
1
cpu time totals
Hi!
I'm comparing the cpu usage of a VM from virDomainGetInfo and the
usages returned per-vcpu from virDomainGetVcpus and the totals do
not match up.
I expect that the cpu usages reported per-vcpu, when summed, should
equal the total cpu usage of the domain, but there is quite a large
gap between them. Is there something I'm missing?
See this exa...
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 un...
2018 Feb 27
2
Fail in virDomainUpdateDeviceFlags (libvirt-4.0.0 + Qemu-kvm 2.9.0 + Ceph 10.2.10)
...N_AFFECT_LIVE)] on CDROM (I want to change media path).
However, I enable libvirt debug log , the log as below:
"2018-02-26 13:09:13.638+0000: 50524: debug : virDomainLookupByName:412 :
conn=0x7f7278000aa0, name=6ec499397d594ef2a64fcfc938f38225
2018-02-26 13:09:13.638+0000: 50515: debug : virDomainGetInfo:2431 :
dom=0x7f726c000c30, (VM: name=6ec499397d594ef2a64fcfc938f38225,
uuid=6ec49939-7d59-4ef2-a64f-cfc938f38225), info=0x7f72b9059b20
2018-02-26 13:09:13.638+0000: 50515: debug : qemuGetProcessInfo:1479 : Got
status for 71205/0 user=14674 sys=3627 cpu=5 rss=105105
2018-02-26 13:09:13.644+0000: 5...
2015 Oct 28
0
How to find memory utilization percent of kvm guest?
I currently use following approach but its failing
Find Max memory using following API
vdgiRet = virDomainGetInfo(domPtr, infoPtr);
memTotal = infoPtr->memory;
Find current utilization using following API
rVal = virDomainMemoryStats (domPtr, memStats, VIR_DOMAIN_MEMORY_STAT_NR, 0) ;
for (i = 0; i < rVal; i++)
{
if (memStats[i].tag == 7)
...
2012 Apr 12
2
No way to obtain guest's cpu and mem usage?
Hi everybody,
I'm using the PHP API to make a web interface interact with the virtual
machines installed on some hypervisor.
Everything is fine, but I would like to find a way to get the guest's
cpu and mem usage, so that it should be possible to make some rrd
graphs. I didn't find out anything and also it seems looking around that
there is no way to obtain those data.
What is strange
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
2010 Nov 14
2
java binding and virtualbox-ose
...ListDefinedDomains:4593 :
conn=0x95a1910, names=0x95e9b58, maxnames=1
Id Name State
----------------------------------
11:37:18.666: debug : virDomainLookupByName:1974 : conn=0x95a1910, name=tty
11:37:18.669: debug : virGetDomain:345 : New hash entry 0x95dad48
11:37:18.669: debug : virDomainGetInfo:2825 : domain=0x95dad48, info=0xbfeca708
- tty shut off
11:37:18.673: debug : virDomainFree:2062 : domain=0x95dad48
11:37:18.673: debug : virUnrefDomain:422 : unref domain 0x95dad48 tty 1
11:37:18.673: debug : virReleaseDomain:376 : release domain 0x95dad48 tty
11:37:18.673: debu...
2009 Jun 19
0
Re: [libvirt] domain.info() sometimes returns state zero for running machines
...irt.c: virDomainGetName (domain=0x9b580a0)
>> DEBUG: libvirt.c: virDomainGetUUIDString (domain=0x9b580a0, buf=0xbff74b07)
>> DEBUG: libvirt.c: virDomainGetUUID (domain=0x9b580a0, uuid=0xbff74aac)
>> DEBUG: libvirt.c: virDomainGetOSType (domain=0x9b580a0)
>> DEBUG: libvirt.c: virDomainGetInfo (domain=0x9b580a0, info=0xbff74b2c)
>> DEBUG: libvirt.c: virDomainGetAutostart (domain=0x9b580a0,
>> autostart=0xbff74b44)
>> DEBUG: libvirt.c: virDomainFree (domain=0x9b580a0)
>> DEBUG: hash.c: virUnrefDomain (unref domain 0x9b580a0
>> ac06e4f0-59b1-11de-8a39-080020...
2020 Jan 10
2
Re: [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
...tKeepAlive(
virConnResetLastError (
virConnSetErrorFunc (
virDomainAttachDeviceFlags (
virDomainBlockPeek (
virDomainBlockStats (
virDomainCreateXML (
virDomainDestroy (
virDomainDestroyFlags (
virDomainDetachDeviceFlags (
virDomainFree (
virDomainGetConnect (
virDomainGetCPUStats(
virDomainGetID (
virDomainGetInfo (
virDomainGetMaxMemory (
virDomainGetName (
virDomainGetSchedulerParameters (
virDomainGetSchedulerType (
virDomainGetUUID (
virDomainGetUUIDString (
virDomainGetVcpus (
virDomainGetXMLDesc (
virDomainInterfaceStats (
virDomainLookupByID (
virDomainLookupByName (
virDomainLookupByUUIDString (
virD...
2013 Oct 09
3
Re: failing connections w/ virt-manager
Am 08.10.2013 14:46, schrieb Stefan G. Weichinger:
>> Try enabling the flag, re-emerging the package, setting the logs and
>> then reproduce it again. Check the logs and you should see why it's
>> disconnecting.
The docs say that libvirtd has to listen on the TCP port ... checked that:
# netstat -alnp | grep libv
tcp 0 0 0.0.0.0:16509 0.0.0.0:*
2020 Jan 10
5
[PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
libguestfs usually needs qemu. However it only requires an emulator
for the same architecture, not for all architectures.
libvirt-daemon-kvm pulls in qemu which pulls in emulators for all
architectures, as well as a bunch of other stuff we don't need at all
like network interface support and nwfilter.
There are no Fedora TCG-only arches, so drop the conditional section.
I also made support
2019 Apr 08
0
[PATCH v4 3/7] v2v: switch to ocaml-libvirt
...-Wmissing-prototypes"
-
-#define ERROR_MESSAGE_LEN 512
-
-static void
-ignore_errors (void *ignore, virErrorPtr ignore2)
-{
- /* empty */
-}
-
-/* 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 !=...
2012 Feb 09
1
virsh migrate results in error: Timed out during operation: cannot acquire state change lock
...0 0xeaac10
13:52:08.009: debug : remoteIODecodeMessageLength:9314 : Got length, now
need 2540 total (2536 more)
13:52:08.009: debug : remoteIOEventLoop:9812 : Giving up the buck 14
0xeaac10 (nil)
13:52:08.010: debug : remoteIO:9990 : All done with our call 14 (nil)
0xeaac10
13:52:08.010: debug : virDomainGetInfo:3017 : domain=0xe5da00,
info=0x7fff102893e0
13:52:08.010: debug : remoteIO:9886 : Do proc=16 serial=7 length=64
wait=(nil)
13:52:08.010: debug : remoteIO:9961 : We have the buck 16 0xeaac10 0xeaac10
13:52:08.010: debug : remoteIODecodeMessageLength:9314 : Got length, now
need 88 total (84 more)...