[Libvir] [PATCH] Check availability of driver calls
by Richard W.M. Jones
This is a repost of a patch I sent before which adds the ability to
check for driver features. This is completely internal to libvirt and
does not add any public APIs.
The original discussion is here:
https://www.redhat.com/archives/libvir-list/2007-July/thread.html#00437
and continues here:
https://www.redhat.com/archives/libvir-list/2007-August/thread.html#00000
Daniel Veillard said:
>> +typedef int
>> + (*virDrvSupportsFeature) (virConnectPtr conn, virDrvFeature
feature);
>
>I would rather use , int features) where you OR the features, allows
>to know in one call if you get what you want or not.
My objection to that is here:
https://www.redhat.com/archives/libvir-list/2007-August/msg00000.html
Rich.
--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903
17 years, 3 months
[Libvir] [PATCH] check the file name for --log
by Atsushi SAKAI
Hi,
This patch fixes the trouble if execute virsh with
virsh --log --debug.
In this case FILE "--debug" is generated and
--debug is off.
This patch treat as error return
if it uses the hyphen "-" at the head of log file name.
Signed-off-by: Atsushi SAKAI <sakaia(a)jp.fujitsu.com>
Thanks
Atsushi SAKAI
17 years, 3 months
[Libvir] question about --quiet option
by Atsushi SAKAI
Hi,
I have a question about virsh --quiet specification.
It seems virsh --quiet option
supress virsh interactive mode boot-message and
vshPrintExtra only.(not includes vshPrint)
This is supposed specification.
Thanks
Atsushi SAKAI
17 years, 3 months
[Libvir] Re: [et-mgmt-tools] ANNOUNCE: virt-viewer release 0.0.1
by Daniel P. Berrange
On Fri, Aug 17, 2007 at 04:10:52PM +0200, Gerd Hoffmann wrote:
> Hi,
>
> > To connect to the guest with ID 7 running under QEMU
> >
> > virt-viewer --connect qemu:///system 7
>
> Can we *please* think about a standardized environment variable to set
> the default for --connect and which all tools are looking at?
Yes, this would be useful.
> virsh has VIRSH_DEFAULT_CONNECT_URI for that.
>
> I'd like to have *one* variable used by *all* libvirt-based tools,
> virt-viewer, virt-manager, virsh, ... We could simply reuse the virsh
> variable, or we could pick some other name without virsh in there,
> preferable also shorter and thus easier to remember. VIRT_URI maybe?
We should probably apply the change to libvirt, so that if 'NULL' is used
for the connect URI for virConnectOpen, and VIRT_CONNECT_URI is set, then
NULL gets substituted with the value of the env variable.
Dan.
--
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
17 years, 3 months
[Libvir] Set memory (decrease) from Virt Manager
by Bruce Evans
Hi,
I am trying to lower the amount of memory for a Domain
using the Virt manager.
I am denied from doing this if I want to decrease the memory
below 50MB, even though I can do it
from virsh. There appears to be a low end limit of
50MB in the Virt Manager.
If the current memory allocation is greater than 50MB, I can
decrease the amount from Virt Manager, but can't go under 50MB.
But if I use virsh, I can decrease the memory to, say, 13000KB
and it works. The Virt Manger will show this new amount but will
only enable the 'increase' icon in the 'Change Allocation option box.
The 'decrease' icon is disabled.
Is this a bug in Virt Manager? If not, why can't the memory
be decreased below 50MB?
Thanks,
-Bruce
Sun Microsystems
Systems Virtualiztion
17 years, 3 months
[Libvir] Stability of virsh / libvirt interfaces
by John Levon
This has probably been discussed before so apologies.
What is the current status of the interfaces, especially libvirt and
virsh? Are they guaranteed to be stable? Does this apply to every new
interface as soon as a release is done?
(I ask after noticing that virsh schedinfo can be used to *set*
parameters!)
thanks
john
17 years, 3 months
[Libvir] [PATCH] Fix some memory leaks of virsh schedinfo
by Saori Fukuta
Hi,
There are some memory leaks at the virsh schedinfo command.
So I fix them.
(e.g.)
When the virDomainSetSchedulerParameters failed, the allocated
memory as params is not freed.
# valgrind --leak-check=full virsh schedinfo PV_RH5_8 --weight 0
==18879== Memcheck, a memory error detector.
==18879== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
*snip*
==18879== 92 bytes in 1 blocks are definitely lost in loss record 6 of 23
==18879== at 0x40053C0: malloc (vg_replace_malloc.c:149)
==18879== by 0x80531D5: _vshMalloc (virsh.c:4201)
==18879== by 0x804BC44: cmdSchedinfo (virsh.c:1033)
==18879== by 0x80526CF: vshCommandRun (virsh.c:3839)
==18879== by 0x805452A: main (virsh.c:4741)
==18879==
==18879== LEAK SUMMARY:
==18879== definitely lost: 92 bytes in 1 blocks.
==18879== possibly lost: 0 bytes in 0 blocks.
==18879== still reachable: 14,234 bytes in 293 blocks.
==18879== suppressed: 0 bytes in 0 blocks.
Signed-off-by: Saori Fukuta <fukuta.saori(a)jp.fujitsu.com>
Thanks,
Saori Fukuta
17 years, 3 months
[Libvir] [PATCH] Fix some memory leaks in xs_internal.c
by Masayuki Sunou
Hi
Some memory releases is missed in xs_internal.c.
This patch fixes it.
Signed-off-by: Masayuki Sunou <fj1826dm(a)aa.jp.fujitsu.com>
Thanks,
Masayuki Sunou.
----------------------------------------------------------------------
Index: src/xs_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/xs_internal.c,v
retrieving revision 1.47
diff -u -p -r1.47 xs_internal.c
--- src/xs_internal.c 10 Aug 2007 18:25:15 -0000 1.47
+++ src/xs_internal.c 17 Aug 2007 05:19:00 -0000
@@ -578,6 +578,8 @@ xenStoreListDomains(virConnectPtr conn,
#endif
ids[ret++] = (int) id;
}
+ if (idlist)
+ free(idlist);
return(ret);
}
@@ -637,11 +639,10 @@ xenStoreLookupByName(virConnectPtr conn,
path = xs_get_domain_path(priv->xshandle, (unsigned int) id);
if (!found)
- return(NULL);
+ goto done;
ret = virGetDomain(conn, name, NULL);
if (ret == NULL) {
- if (path != NULL) free(path);
goto done;
}
ret->id = id;
@@ -651,6 +652,8 @@ done:
free(xenddomain);
if (idlist != NULL)
free(idlist);
+ if (path != NULL)
+ free(path);
return(ret);
}
----------------------------------------------------------------------
17 years, 3 months
[Libvir] [PATCH] Check the version of Xen in xenDaemonAttachDevice()
by Masayuki Sunou
Hi
When virsh attach-disk/attach-interface is executed in < Xen 3.0.4,
the OS type of domain is NULL in xenDaemonAttachDevice().
As a result, the command becomes segmentation fault.
This patch fixes it by checking the version of Xen in xenDaemonAttachDevice().
Signed-off-by: Masayuki Sunou <fj1826dm(a)aa.jp.fujitsu.com>
Thanks,
Masayuki Sunou.
----------------------------------------------------------------------
Index: src/xend_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/xend_internal.c,v
retrieving revision 1.132
diff -u -p -r1.132 xend_internal.c
--- src/xend_internal.c 9 Aug 2007 20:19:12 -0000 1.132
+++ src/xend_internal.c 16 Aug 2007 07:38:42 -0000
@@ -3091,6 +3091,9 @@ xenDaemonAttachDevice(virDomainPtr domai
priv = (xenUnifiedPrivatePtr) domain->conn->privateData;
+ if (domain->id < 0 && priv->xendConfigVersion < 3)
+ return(-1);
+
str = virDomainGetOSType(domain);
if (strcmp(str, "linux"))
hvm = 1;
----------------------------------------------------------------------
17 years, 3 months