Re: [libvirt] [PATCH v2] BSD: implement nodeGetMemoryStats

2014-01-03 Thread Ryota Ozaki
Hi Roman, Unfortunately Mac OS X doesn't has the sysctl MIBs. So ifdef __APPLE__ should be dropped. I still don't know the correct API for that purpose though, host_statistics seems to be used according to http://stackoverflow.com/questions/609 . ozaki-r On Sat, Jan 4, 2014 at 12:13 AM,

Re: [libvirt] [PATCH] vbox: add support for v4.2.20+ and v4.3.4+

2013-12-30 Thread Ryota Ozaki
On Mon, Dec 30, 2013 at 5:55 PM, Jean-Baptiste Rouault jean-baptiste.roua...@diateam.net wrote: On Sunday 29 December 2013 14:44:10 Ryota Ozaki wrote: On Wed, Dec 25, 2013 at 12:47 AM, Jean-Baptiste Rouault jean-baptiste.roua...@diateam.net wrote: While working on adding virDomain*Stats

Re: [libvirt] [PATCH] vbox: add support for v4.2.20+ and v4.3.4+

2013-12-29 Thread Ryota Ozaki
On Wed, Dec 25, 2013 at 12:47 AM, Jean-Baptiste Rouault jean-baptiste.roua...@diateam.net wrote: While working on adding virDomain*Stats support to the vbox driver, we found bugs in the VirtualBox API C bindings. These bugs have been fixed in versions 4.2.20 and 4.3.4. However, the changes in

Re: [libvirt] [PATCH 3/3] vbox: handle several errors correctly in vboxHostDeviceGetXMLDesc

2013-12-02 Thread Ryota Ozaki
01, 2013 at 11:46:07PM +0900, Ryota Ozaki wrote: In the original code, errors of Get{Vendor,Product}Id, VBOX_UTF16_TO_UTF8, strtol were ignored. In order to handle the errors, the patch introduces vboxGetVendorProductIds utility function because adding error codes in the loop is difficult

[libvirt] [PATCH 1/3] vbox: fix incorrect loop condition in vboxHostDeviceGetXMLDesc

2013-12-01 Thread Ryota Ozaki
. Thus, we can remove USBFilterCount def-nhostdevs safely. Reported-by: Laine Stump la...@laine.org Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- src/vbox/vbox_tmpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 983a595

[libvirt] [PATCH 2/3] vbox: handle errors of virDomainHostdevDefAlloc correctly

2013-12-01 Thread Ryota Ozaki
of other memory allocations in the loop. The deallocation code is separated from the allocation code because it will be used by a further patch for fixing other error handlings. Reported-by: Laine Stump la...@laine.org Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- src/vbox/vbox_tmpl.c | 19

[libvirt] [PATCH 3/3] vbox: handle several errors correctly in vboxHostDeviceGetXMLDesc

2013-12-01 Thread Ryota Ozaki
-by: Ryota Ozaki ozaki.ry...@gmail.com --- src/vbox/vbox_tmpl.c | 74 1 file changed, 51 insertions(+), 23 deletions(-) diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 9336514..27c21bd 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox

Re: [libvirt] [PATCH 2/4] vbox: pull vboxHostDeviceGetXMLDesc out from vboxDomainGetXMLDesc

2013-11-25 Thread Ryota Ozaki
Hi Laine, On Mon, Nov 25, 2013 at 8:26 PM, Laine Stump la...@laine.org wrote: On 11/21/2013 04:41 PM, Ryota Ozaki wrote: The USB-related code in vboxDomainGetXMLDesc is deeply nested and difficult to add new code. So flatten it. To do so, the code is pulled out from vboxDomainGetXMLDesc

Re: [libvirt] [PATCH 3/4] vbox: import vbox_CAPI_v4_3.h from SDK

2013-11-25 Thread Ryota Ozaki
On Mon, Nov 25, 2013 at 8:26 PM, Laine Stump la...@laine.org wrote: On 11/21/2013 04:41 PM, Ryota Ozaki wrote: vbox_CAPI_v4_3.h is almost same as sdk/bindings/xpcom/include/VBoxCAPI_v4_3.h of http://download.virtualbox.org/virtualbox/4.3.2/VirtualBoxSDK-4.3.2-90405.zip, but modified to fix

Re: [libvirt] [PATCH 4/4] vbox: add support for 4.3 APIs

2013-11-25 Thread Ryota Ozaki
On Mon, Nov 25, 2013 at 8:26 PM, Laine Stump la...@laine.org wrote: On 11/21/2013 04:41 PM, Ryota Ozaki wrote: Makefile.am, vbox_V4_3.c and vbox_driver.c do regular modifitions to support a new version of APIs. vbox_tmpl.c basically fixes incompatibilities since 4.2. The affected

[libvirt] [PATCH] m4: use -Wl,-pie instead of -pie for clang

2013-11-22 Thread Ryota Ozaki
,-pie next. By doing so, we can handle both cases. The patch is tested on Mac OS X 10.8.5 and Fedora 19. Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- m4/virt-compile-pie.m4 | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/m4/virt-compile-pie.m4 b/m4/virt-compile

[libvirt] [PATCH 1/4] vbox: cleanup vboxAttachUSB

2013-11-21 Thread Ryota Ozaki
This cleanup flattens deeply nested code. Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- src/vbox/vbox_tmpl.c | 153 ++- 1 file changed, 79 insertions(+), 74 deletions(-) diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 942570f

[libvirt] [PATCH 2/4] vbox: pull vboxHostDeviceGetXMLDesc out from vboxDomainGetXMLDesc

2013-11-21 Thread Ryota Ozaki
The USB-related code in vboxDomainGetXMLDesc is deeply nested and difficult to add new code. So flatten it. To do so, the code is pulled out from vboxDomainGetXMLDesc to make the function short and to leaverage early return and goto for error handling. Signed-off-by: Ryota Ozaki ozaki.ry

[libvirt] [PATCH 4/4] vbox: add support for 4.3 APIs

2013-11-21 Thread Ryota Ozaki
and Fedora 19. Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- src/Makefile.am| 3 +- src/vbox/vbox_V4_3.c | 13 + src/vbox/vbox_driver.c | 8 ++ src/vbox/vbox_tmpl.c | 74 -- 4 files changed, 95 insertions(+), 3 deletions

[libvirt] [PATCH 0/4] Add support for VirtualBox 4.3 APIs

2013-11-21 Thread Ryota Ozaki
by new APIs, but just fixes incompatibilies since API 4.2. This patch set is tested on Mac OS X 10.8.5 and Fedora 19. ozaki-r Ryota Ozaki (4): vbox: cleanup vboxAttachUSB vbox: pull vboxHostDeviceGetXMLDesc out from vboxDomainGetXMLDesc vbox: import vbox_CAPI_v4_3.h from SDK vbox: add

Re: [libvirt] Planning for next release

2013-11-19 Thread Ryota Ozaki
2013/11/19 11:13 Daniel Veillard veill...@redhat.com: If we want to land a release on Mon Dec 2, I would suggest entering freeze next week. The amount of patches since 1.1.4 is not very large so we could start the freeze say on Wed 27, but IMHO it all depennds if Dan patches about splitting

Re: [libvirt] [PATCH] vbox: fix segfault on virsh dumpxml with the existence of USB filters

2013-11-19 Thread Ryota Ozaki
On Tue, Nov 19, 2013 at 11:29 PM, Laine Stump la...@laine.org wrote: On 11/18/2013 05:39 PM, Ryota Ozaki wrote: A USB filter is stored in a hostdev. The original code doesn't allocate hostdev-info that is expected to be allocated with hostdev. So use virDomainHostdevDefAlloc() to allocate both

Re: [libvirt] Planning for next release

2013-11-19 Thread Ryota Ozaki
On Wed, Nov 20, 2013 at 1:08 PM, Daniel Veillard veill...@redhat.com wrote: On Wed, Nov 20, 2013 at 12:30:13PM +0900, Ryota Ozaki wrote: 2013/11/19 11:13 Daniel Veillard veill...@redhat.com: If we want to land a release on Mon Dec 2, I would suggest entering freeze next week. The amount

Re: [libvirt] [PATCH] build: silence a clang warning in virsh.c

2013-11-18 Thread Ryota Ozaki
On Tue, Nov 5, 2013 at 3:58 AM, Doug Goldstein car...@gentoo.org wrote: On Mon, Nov 4, 2013 at 12:26 PM, Ryota Ozaki ozaki.ry...@gmail.com wrote: On Tue, Nov 5, 2013 at 1:08 AM, Eric Blake ebl...@redhat.com wrote: On 11/04/2013 03:49 AM, Ryota Ozaki wrote: This patch shuts up the following

[libvirt] [PATCH v2] build: silence a clang warning in virsh.c

2013-11-18 Thread Ryota Ozaki
-by: Ryota Ozaki ozaki.ry...@gmail.com --- tools/virsh.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 241c5b8..1edffb3 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -2757,8 +2757,12 @@ vshReadlineInit(vshControl *ctl) int

[libvirt] [PATCH] vbox: fix segfault on virsh dumpxml with the existence of USB filters

2013-11-18 Thread Ryota Ozaki
A USB filter is stored in a hostdev. The original code doesn't allocate hostdev-info that is expected to be allocated with hostdev. So use virDomainHostdevDefAlloc() to allocate both as we expect. Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- src/vbox/vbox_tmpl.c | 3 ++- 1 file changed

Re: [libvirt] [PATCH v2] build: silence a clang warning in virsh.c

2013-11-18 Thread Ryota Ozaki
Hi Eric, Thank you for very kind replying and investigations. And I'm sorry I'm slow to react. On Tue, Nov 19, 2013 at 1:44 AM, Eric Blake ebl...@redhat.com wrote: On 11/18/2013 09:03 AM, Eric Blake wrote: The warning happens because rl_readline_name on Mac OS X is still 'char *', while it

[libvirt] [PATCH] build: silence a clang warning in virsh.c

2013-11-04 Thread Ryota Ozaki
10.8.5 (clang-500.2.75) and Fedora 19 (gcc 4.8.1). Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- tools/virsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh.c b/tools/virsh.c index 241c5b8..f45ee0a 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -2758,7

Re: [libvirt] [PATCH] build: silence a clang warning in virsh.c

2013-11-04 Thread Ryota Ozaki
On Tue, Nov 5, 2013 at 1:08 AM, Eric Blake ebl...@redhat.com wrote: On 11/04/2013 03:49 AM, Ryota Ozaki wrote: This patch shuts up the following warning of clang: virsh.c:2761:22: error: assigning to 'char *' from 'const char [6]' discards qualifiers [-Werror,-Wincompatible-pointer

Re: [libvirt] [PATCH] virnetsocket: fix getsockopt on FreeBSD

2013-11-03 Thread Ryota Ozaki
On Mon, Nov 4, 2013 at 10:37 AM, Daniel P. Berrange berra...@redhat.com wrote: On Sun, Nov 03, 2013 at 05:18:17PM -0600, Doug Goldstein wrote: On Sat, Nov 2, 2013 at 11:20 AM, Ryota Ozaki ozaki.ry...@gmail.com wrote: ping? Hope it's in the next release. It fixes libvirtd to accept virsh

Re: [libvirt] [PATCH] MacOS: Handle changes to args in xdrproc_t

2013-11-02 Thread Ryota Ozaki
On Wed, Oct 30, 2013 at 1:30 PM, Doug Goldstein car...@cardoe.com wrote: On Tue, Oct 29, 2013 at 6:28 PM, Eric Blake ebl...@redhat.com wrote: On 10/28/2013 12:05 PM, Doug Goldstein wrote: With Mac OS X 10.9, xdrproc_t is no longer defined as: typedef bool_t (*xdrproc_t) (XDR *, void *, ...);

Re: [libvirt] [PATCH] MacOS: Handle changes to xdrproc_t definition

2013-11-02 Thread Ryota Ozaki
On Sat, Nov 2, 2013 at 11:55 AM, Eric Blake ebl...@redhat.com wrote: On 10/30/2013 10:28 AM, Doug Goldstein wrote: With Mac OS X 10.9, xdrproc_t is no longer defined as: typedef bool_t (*xdrproc_t)(XDR *, ...); but instead as: typdef bool_t (*xdrproc_t)(XDR *, void *, unsigned int); For

Re: [libvirt] [PATCH] virnetsocket: fix getsockopt on FreeBSD

2013-11-02 Thread Ryota Ozaki
ping? Hope it's in the next release. It fixes libvirtd to accept virsh accesses on localhost. ozaki-r On Fri, Oct 25, 2013 at 12:48 AM, Ryota Ozaki ozaki.ry...@gmail.com wrote: aa0f099 introduced a strict error checking for getsockopt and it revealed that getting a peer credential

[libvirt] [PATCH] virnetsocket: fix getsockopt on FreeBSD

2013-10-24 Thread Ryota Ozaki
on FreeBSD 8.4, 9.2 and 10.0-BETA1. Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- src/rpc/virnetsocket.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index 3eb5708..04bf25a 100644 --- a/src/rpc

Re: [libvirt] [PATCH] rpc: Retrieve peer PID via new getsockopt() for Mac

2013-10-22 Thread Ryota Ozaki
On Mon, Oct 21, 2013 at 11:59 PM, Doug Goldstein car...@cardoe.com wrote: While LOCAL_PEERCRED on the BSDs does not return the pid information of the peer, Mac OS X 10.8 added LOCAL_PEERPID to retrieve the pid so we should use that when its available to get that information. ACK. I tested on

Re: [libvirt] [PATCH] nodeinfo: fix physical memory size on Mac OS X

2013-10-22 Thread Ryota Ozaki
On Mon, Oct 21, 2013 at 11:57 PM, Doug Goldstein car...@gentoo.org wrote: On Sun, Oct 20, 2013 at 10:28 PM, Ryota Ozaki ozaki.ry...@gmail.com wrote: Hi Doug, On Mon, Oct 21, 2013 at 10:51 AM, Doug Goldstein car...@gentoo.org wrote: On Sun, Oct 20, 2013 at 10:14 AM, Ryota Ozaki ozaki.ry

[libvirt] [PATCH] nodeinfo: fix physical memory size on Mac OS X

2013-10-20 Thread Ryota Ozaki
HW_PHYSMEM is available on Mac OS X as well as FreeBSD, however, its resulting value for Mac OS X is 32 bits. Mac OS X provides HW_MEMSIZE that is 64 bits version of HW_PHYSMEM. We have to use it. I tested the patch on Mac OS X 10.6.8, 10.7.4, 10.8.5 and FreeBSD 9.2. Signed-off-by: Ryota Ozaki

Re: [libvirt] [PATCH] nodeinfo: fix physical memory size on Mac OS X

2013-10-20 Thread Ryota Ozaki
Hi Doug, On Mon, Oct 21, 2013 at 10:51 AM, Doug Goldstein car...@gentoo.org wrote: On Sun, Oct 20, 2013 at 10:14 AM, Ryota Ozaki ozaki.ry...@gmail.com wrote: HW_PHYSMEM is available on Mac OS X as well as FreeBSD, however, its resulting value for Mac OS X is 32 bits. Mac OS X provides

Re: [libvirt] [PATCH 1/2] vbox: assemble duplicate state conversions

2013-10-15 Thread Ryota Ozaki
On Tue, Oct 15, 2013 at 8:04 PM, Daniel P. Berrange berra...@redhat.comwrote: On Tue, Oct 15, 2013 at 01:19:41AM +0900, Ryota Ozaki wrote: Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- src/vbox/vbox_tmpl.c | 70 +--- 1 file changed

[libvirt] [PATCH] virprocess: make virProcessGetStartTime work on Mac OS X

2013-10-15 Thread Ryota Ozaki
with the following error: error : virProcessGetStartTime:822 : Unable to get MIB of kern.proc.pid: No such file or directory This is unexpected. man 3 sysctl of Snow Leopard says it should work... Anyway libvirtd is able to launch on Snow Leopard regardless of the error. Signed-off-by: Ryota

Re: [libvirt] [PATCH] virprocess: make virProcessGetStartTime work on Mac OS X

2013-10-15 Thread Ryota Ozaki
Hi Doung, On Wed, Oct 16, 2013 at 3:44 AM, Doug Goldstein car...@gentoo.org wrote: On Tue, Oct 15, 2013 at 12:05 PM, Ryota Ozaki ozaki.ry...@gmail.com wrote: This patch addresses the following warning output by libvirtd: warning : virProcessGetStartTime:843 : Process start time

[libvirt] [PATCH 1/2] vbox: assemble duplicate state conversions

2013-10-14 Thread Ryota Ozaki
Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- src/vbox/vbox_tmpl.c | 70 +--- 1 file changed, 22 insertions(+), 48 deletions(-) diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 5e5ea85..10a3775 100644 --- a/src/vbox/vbox_tmpl.c

[libvirt] [PATCH 2/2] vbox: handle 'saved' state of VMs

2013-10-14 Thread Ryota Ozaki
VirtualBox has 'saved' state for VMs saved by the hypervisor. However, the state is treated as VIR_DOMAIN_NOSTATE by the vbox driver, resulting that virsh shows 'no state' for saved VMs. The fix treats the state as VIR_DOMAIN_SHUTOFF as same as other domains such as qemu. Signed-off-by: Ryota

Re: [libvirt] [PATCH 1/2] rpc: fix getsockopt for LOCAL_PEERCRED on Mac OS X

2013-10-07 Thread Ryota Ozaki
Hi Michal, On Mon, Oct 7, 2013 at 5:33 PM, Michal Privoznik mpriv...@redhat.com wrote: On 05.10.2013 07:56, Ryota Ozaki wrote: This fixes the following error: error : virGetUserEnt:703 : Failed to find user record for uid '32654' '32654' (it's random and varies) comes from getsockopt

Re: [libvirt] [PATCH 1/2] rpc: fix getsockopt for LOCAL_PEERCRED on Mac OS X

2013-10-07 Thread Ryota Ozaki
Hi Daniel, On Mon, Oct 7, 2013 at 6:51 PM, Daniel P. Berrange berra...@redhat.com wrote: On Mon, Oct 07, 2013 at 10:33:44AM +0200, Michal Privoznik wrote: On 05.10.2013 07:56, Ryota Ozaki wrote: This fixes the following error: error : virGetUserEnt:703 : Failed to find user record

[libvirt] [PATCH 2/2] nodeinfo: make freebsdNodeGetCPUCount work on Mac OS X

2013-10-05 Thread Ryota Ozaki
. And the unit of the return frequency is also different. Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- src/nodeinfo.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 33a79b7..0c92cfa 100644 --- a/src/nodeinfo.c +++ b/src

[libvirt] [PATCH 0/2] Fixes for Mac OS X

2013-10-05 Thread Ryota Ozaki
-February/msg00033.html I tested the patches on Mac OS X 10.8.5. Ryota Ozaki (2): rpc: fix getsockopt for LOCAL_PEERCRED on Mac OS X nodeinfo: make freebsdNodeGetCPUCount work on Mac OS X src/nodeinfo.c | 15 --- src/rpc/virnetsocket.c | 4 2 files changed, 16

[libvirt] [PATCH 1/2] rpc: fix getsockopt for LOCAL_PEERCRED on Mac OS X

2013-10-05 Thread Ryota Ozaki
, LOCAL_PEERCRED has to be used with SOL_LOCAL level. With SOL_LOCAL, getsockopt returns a correct uid. Note that SOL_LOCAL can be found in /System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/un.h. Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- src/rpc/virnetsocket.c | 4 1 file

[libvirt] [PATCH 1/2] rpc: fix getsockopt for LOCAL_PEERCRED on Mac OS X

2013-10-05 Thread Ryota Ozaki
, LOCAL_PEERCRED has to be used with SOL_LOCAL level. With SOL_LOCAL, getsockopt returns a correct uid. Note that SOL_LOCAL can be found in /System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/un.h. Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- src/rpc/virnetsocket.c | 4 1 file

[libvirt] [PATCH 2/2] nodeinfo: make freebsdNodeGetCPUCount work on Mac OS X

2013-10-05 Thread Ryota Ozaki
. And the unit of the return frequency is also different. Signed-off-by: Ryota Ozaki ozaki.ry...@gmail.com --- src/nodeinfo.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 33a79b7..0c92cfa 100644 --- a/src/nodeinfo.c +++ b/src

[libvirt] [PATCH 0/2] Fixes for Mac OS X

2013-10-05 Thread Ryota Ozaki
-February/msg00033.html ozaki-r Ryota Ozaki (2): rpc: fix getsockopt for LOCAL_PEERCRED on Mac OS X nodeinfo: make freebsdNodeGetCPUCount work on Mac OS X src/nodeinfo.c | 15 --- src/rpc/virnetsocket.c | 4 2 files changed, 16 insertions(+), 3 deletions(-) -- 1.8.3.4

Re: [libvirt] [PATCH] util: Fix virUUIDGeneratePseudoRandomBytes

2011-10-29 Thread Ryota Ozaki
On Sat, Oct 29, 2011 at 12:06 AM, Eric Blake ebl...@redhat.com wrote: On 10/28/2011 05:06 AM, Ryota Ozaki wrote: It forgets to move a pointer to a buffer for UUID and as a result fills only the first byte of the buffer. ---  src/util/uuid.c |    2 +-  1 files changed, 1 insertions(+), 1

[libvirt] [PATCH] util: Fix virUUIDGeneratePseudoRandomBytes

2011-10-28 Thread Ryota Ozaki
It forgets to move a pointer to a buffer for UUID and as a result fills only the first byte of the buffer. --- src/util/uuid.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/util/uuid.c b/src/util/uuid.c index 0df3ebc..823a2b9 100644 --- a/src/util/uuid.c +++

Re: [libvirt] [PATCH] virsh: Fix error message on vol-create-from failure

2011-10-26 Thread Ryota Ozaki
On Wed, Oct 26, 2011 at 7:18 PM, Wenyi Gao we...@linux.vnet.ibm.com wrote: On Mon, 2011-10-24 at 20:44 +0900, Ryota Ozaki wrote: If vol-create-from is failed due to 'input volume not found', virsh outputs like this:   $ sudo virsh vol-create-from testpool test-vol.xml test.img   error: failed

[libvirt] [PATCH] storage: Fix error message on vol-create-from failure

2011-10-24 Thread Ryota Ozaki
If vol-create-from is failed due to 'input volume not found', virsh outputs like this: $ sudo virsh vol-create-from testpool test-vol.xml test.img error: failed to get vol 'test.img', specifying --pool might help error: Storage volume not found: no storage vol with matching path However,

[libvirt] [PATCH] virsh: Fix error message on vol-create-from failure

2011-10-24 Thread Ryota Ozaki
If vol-create-from is failed due to 'input volume not found', virsh outputs like this: $ sudo virsh vol-create-from testpool test-vol.xml test.img error: failed to get vol 'test.img', specifying --pool might help error: Storage volume not found: no storage vol with matching path However,

Re: [libvirt] [PATCH] storage: Fix error message on vol-create-from failure

2011-10-24 Thread Ryota Ozaki
Sorry, please ignore this. The title should be 'virsh: ' not 'storage: '. I'll post another one soon. ozaki-r On Mon, Oct 24, 2011 at 8:18 PM, Ryota Ozaki ozaki.ry...@gmail.com wrote: If vol-create-from is failed due to 'input volume not found', virsh outputs like this:  $ sudo virsh vol

[libvirt] [PATCH] docs: Document filesystem type='block' for LXC

2011-10-21 Thread Ryota Ozaki
Commit 77791dc0e allows LXC to use a host block device as a guest filesystem, but it isn't documented yet. --- docs/formatdomain.html.in |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 95d33c0..dc6b152 100644

[libvirt] [PATCH][Take2] virsh: Fix vol-info's 'Type' output

2011-10-21 Thread Ryota Ozaki
We have a new vol type dir in addition to file and block, but virsh doesn't know it. Fix it. Additionally, the patch lets virsh output unknown if not matched any of them. --- tools/virsh.c | 19 --- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/tools/virsh.c

Re: [libvirt] [PATCH] virsh: Fix vol-info's 'Type' output

2011-10-21 Thread Ryota Ozaki
On Thu, Oct 20, 2011 at 8:30 PM, Osier Yang jy...@redhat.com wrote: 于 2011年10月20日 18:44, Ryota Ozaki 写道: We have a new type dir in addition to file and block, but s/type/vol type/ virsh doen't know it. Fix it. s/doen't/doesn't/ Additionally, the patch lets virsh output unknown

[libvirt] [PATCH] virsh: Fix vol-info's 'Type' output

2011-10-20 Thread Ryota Ozaki
We have a new type dir in addition to file and block, but virsh doen't know it. Fix it. Additionally, the patch lets virsh output unknown if not matched any of them. --- tools/virsh.c | 19 --- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/tools/virsh.c

[libvirt] [PATCH] lxc: Fix 'autostart' doesn't take effect actually

2010-07-29 Thread Ryota Ozaki
lxcStartup forgot to call lxcAutostartConfigs. Fix it. This patch should fix https://bugzilla.redhat.com/show_bug.cgi?id=589863 . --- src/lxc/lxc_driver.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 4fc1ecd..b286692

Re: [libvirt] [PATCHv3] lxc: Fix return values of veth.c functions - complete

2010-07-29 Thread Ryota Ozaki
On Fri, Jul 30, 2010 at 2:32 AM, Laine Stump la...@laine.org wrote: From: Ryota Ozaki ozaki.ry...@gmail.com From: Ryota Ozaki ozaki.ry...@gmail.com Previously, the functions in src/lxc/veth.c could sometimes return positive values on failure rather than -1. This made accurate error

Re: [libvirt] [PATCH] lxc: Fix return value handlings of vethInterfaceUpOrDown and moveInterfaceToNetNs

2010-07-28 Thread Ryota Ozaki
On Wed, Jul 28, 2010 at 10:15 AM, Laine Stump la...@laine.org wrote:  On 07/27/2010 11:11 AM, Ryota Ozaki wrote: On Mon, Jul 26, 2010 at 11:37 PM, Laine Stumpla...@laine.org  wrote:  On 07/26/2010 08:31 AM, Ryota Ozaki wrote: On Mon, Jul 26, 2010 at 6:51 PM, Daniel P. Berrangeberra

[libvirt] [PATCH] lxc: Fix error handlings of veth functions

2010-07-28 Thread Ryota Ozaki
moveInterfaceToNetNs and vethInterfaceUpOrDown may return a positive value when they fail. We should check if the value is not zero instead of checking if it's negative. This defect may be related to the bug: https://bugzilla.redhat.com/show_bug.cgi?id=607496 . It would not fix the bug, but would

Re: [libvirt] [PATCH] lxc: Fix return value handlings of vethInterfaceUpOrDown and moveInterfaceToNetNs

2010-07-27 Thread Ryota Ozaki
a consensus. ozaki-r On Mon, Jul 26, 2010 at 11:37 PM, Laine Stump la...@laine.org wrote:  On 07/26/2010 08:31 AM, Ryota Ozaki wrote: On Mon, Jul 26, 2010 at 6:51 PM, Daniel P. Berrangeberra...@redhat.com  wrote: On Sun, Jul 25, 2010 at 02:25:05AM +0900, Ryota Ozaki wrote: On Sat, Jul 24

Re: [libvirt] [PATCH] lxc: Fix return value handlings of vethInterfaceUpOrDown and moveInterfaceToNetNs

2010-07-27 Thread Ryota Ozaki
On Mon, Jul 26, 2010 at 11:37 PM, Laine Stump la...@laine.org wrote:  On 07/26/2010 08:31 AM, Ryota Ozaki wrote: On Mon, Jul 26, 2010 at 6:51 PM, Daniel P. Berrangeberra...@redhat.com  wrote: On Sun, Jul 25, 2010 at 02:25:05AM +0900, Ryota Ozaki wrote: On Sat, Jul 24, 2010 at 11:44 PM

Re: [libvirt] [PATCH] lxc: Fix return value handlings of vethInterfaceUpOrDown and moveInterfaceToNetNs

2010-07-26 Thread Ryota Ozaki
On Mon, Jul 26, 2010 at 6:51 PM, Daniel P. Berrange berra...@redhat.com wrote: On Sun, Jul 25, 2010 at 02:25:05AM +0900, Ryota Ozaki wrote: On Sat, Jul 24, 2010 at 11:44 PM, Ryota Ozaki ozaki.ry...@gmail.com wrote: Hi Laine, On Sat, Jul 24, 2010 at 2:58 AM, Laine Stump la...@laine.org

Re: [libvirt] [PATCH] lxc: Fix return value handlings of vethInterfaceUpOrDown and moveInterfaceToNetNs

2010-07-24 Thread Ryota Ozaki
Hi Laine, On Sat, Jul 24, 2010 at 2:58 AM, Laine Stump la...@laine.org wrote:  On 07/23/2010 01:25 PM, Ryota Ozaki wrote: Both may return a positive value when they fail. We should check if the value is not zero instead of checking if it's negative. I notice that  lxcSetupInterfaces has

Re: [libvirt] [PATCH] lxc: Fix return value handlings of vethInterfaceUpOrDown and moveInterfaceToNetNs

2010-07-24 Thread Ryota Ozaki
On Sat, Jul 24, 2010 at 11:44 PM, Ryota Ozaki ozaki.ry...@gmail.com wrote: Hi Laine, On Sat, Jul 24, 2010 at 2:58 AM, Laine Stump la...@laine.org wrote:  On 07/23/2010 01:25 PM, Ryota Ozaki wrote: Both may return a positive value when they fail. We should check if the value is not zero

[libvirt] [PATCH] lxc: Fix return value handlings of vethInterfaceUpOrDown and moveInterfaceToNetNs

2010-07-23 Thread Ryota Ozaki
Both may return a positive value when they fail. We should check if the value is not zero instead of checking if it's negative. lxcContainerRenameAndEnableInterfaces is expected to return a negative value on a failure, so the patch changes the return value to -1 if vethInterfaceUpOrDown fails.

Re: [libvirt] [PATCH] Implement support for virtio plan9fs filesystem passthrough in QEMU

2010-07-21 Thread Ryota Ozaki
On Wed, Jul 21, 2010 at 8:27 PM, Daniel P. Berrange berra...@redhat.com wrote: Make use of the existing filesystem element to support plan9fs filesystem passthrough in the QEMU driver    filesystem type='mount'      source dir='/export/to/guest'/      target dir='/import/from/host'/    

Re: [libvirt] [PATCH] lxc: Ensure to kill init process by sending SIGKILL if needed

2010-07-21 Thread Ryota Ozaki
ping? Note that this patch would fix https://bugzilla.redhat.com/show_bug.cgi?id=592170 . Thanks, ozaki-r On Sat, Jul 17, 2010 at 1:13 AM, Ryota Ozaki ozaki.ry...@gmail.com wrote: Init process may remain after sending SIGTERM for some reason. For example, if original init program is used

[libvirt] Memory

2010-07-17 Thread Ryota Ozaki
Hi Jaromír 2010/7/17 Jaromír Červenka cerv...@cervajz.com: Hello, Could anybody explain me a little bit what is the difference between currentMemory and maxMemory. I use qemu-kvm hypervisor. When I have 1024MB maxMemory and 512MB of currentMemory, I can see just 512MB in guest os (free -m). 

Re: [libvirt] Memory

2010-07-17 Thread Ryota Ozaki
? AFAIK yes, it has to be down by you or some other resource control program. Both libvirt and the hypervisor (qemu) just provide API to change. (Of course your system can provide such feature using the API if you implement it.) ozaki-r Jaromir. Dne 17. července 2010 13:49 Ryota Ozaki ozaki.ry

[libvirt] [PATCH] lxc: Ensure to kill init process by sending SIGKILL if needed

2010-07-16 Thread Ryota Ozaki
Init process may remain after sending SIGTERM for some reason. For example, if original init program is used, it is definitely not killed by SIGTERM. --- src/lxc/lxc_controller.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/lxc/lxc_controller.c

Re: [libvirt] [PATCH] daemon: dispatch.c should include stdio.h (and stdarg.h)

2010-07-14 Thread Ryota Ozaki
On Thu, Jul 8, 2010 at 9:45 PM, Jiri Denemark jdene...@redhat.com wrote: dispatch.c requires stdio.h (and stdarg.h), however, currently dispatch.c implicitly relys on rpc/xdr.h to include stdio.h. If rpc/xdr.h unxpectedly does not include stdio.h, the compilation of dispatch.c fails. This

Re: [libvirt] [PATCH] daemon: Fix compilation error of dispatch.c

2010-07-08 Thread Ryota Ozaki
On Thu, Jul 8, 2010 at 6:26 PM, Daniel P. Berrange berra...@redhat.com wrote: On Thu, Jul 08, 2010 at 03:53:06AM +0900, Ryota Ozaki wrote: On Thu, Jul 8, 2010 at 3:31 AM, Ryota Ozaki ozaki.ry...@gmail.com wrote: On Thu, Jul 8, 2010 at 2:40 AM, Daniel Veillard veill...@redhat.com wrote

[libvirt] [PATCH] daemon: dispatch.c should include stdio.h (and stdarg.h)

2010-07-08 Thread Ryota Ozaki
dispatch.c requires stdio.h (and stdarg.h), however, currently dispatch.c implicitly relys on rpc/xdr.h to include stdio.h. If rpc/xdr.h unxpectedly does not include stdio.h, the compilation of dispatch.c fails. This can happen, for example, when portablexdr is installed under /usr/local; because

Re: [libvirt] [PATCH] daemon: Fix compilation error of dispatch.c

2010-07-07 Thread Ryota Ozaki
Unfortunately the errors still happen after updating. Even worse, they happen on an old commit that I was able to compile successfully so far. So I guess my box went wrong at some point. FYI. My box has repaired by removing /usr/local/include/rpc/ which is installed by portablexdr to build

Re: [libvirt] [PATCH] daemon: Fix compilation error of dispatch.c

2010-07-07 Thread Ryota Ozaki
On Thu, Jul 8, 2010 at 2:40 AM, Daniel Veillard veill...@redhat.com wrote: On Thu, Jul 08, 2010 at 01:55:23AM +0900, Ryota Ozaki wrote: Unfortunately the errors still happen after updating. Even worse, they happen on an old commit that I was able to compile successfully so far. So I guess

Re: [libvirt] [PATCH] daemon: Fix compilation error of dispatch.c

2010-07-05 Thread Ryota Ozaki
On Mon, Jul 5, 2010 at 6:52 PM, Daniel P. Berrange berra...@redhat.com wrote: On Sun, Jul 04, 2010 at 07:02:32AM +0900, Ryota Ozaki wrote: [error message]   CC     libvirtd-dispatch.o dispatch.c: In function 'remoteDispatchFormatError': dispatch.c:83: error: 'va_list' undeclared (first use

Re: [libvirt] [PATCH] daemon: Fix compilation error of dispatch.c

2010-07-05 Thread Ryota Ozaki
On Mon, Jul 5, 2010 at 9:46 PM, Daniel Veillard veill...@redhat.com wrote: On Mon, Jul 05, 2010 at 07:40:50PM +0900, Ryota Ozaki wrote: On Mon, Jul 5, 2010 at 6:52 PM, Daniel P. Berrange berra...@redhat.com wrote: On Sun, Jul 04, 2010 at 07:02:32AM +0900, Ryota Ozaki wrote: [error message

Re: [libvirt] [PATCH] daemon: Fix compilation error of dispatch.c

2010-07-05 Thread Ryota Ozaki
On Mon, Jul 5, 2010 at 10:11 PM, Ryota Ozaki ozaki.ry...@gmail.com wrote: On Mon, Jul 5, 2010 at 9:46 PM, Daniel Veillard veill...@redhat.com wrote: On Mon, Jul 05, 2010 at 07:40:50PM +0900, Ryota Ozaki wrote: On Mon, Jul 5, 2010 at 6:52 PM, Daniel P. Berrange berra...@redhat.com wrote

[libvirt] [PATCH] daemon: Fix compilation error of dispatch.c

2010-07-03 Thread Ryota Ozaki
[error message] CC libvirtd-dispatch.o dispatch.c: In function 'remoteDispatchFormatError': dispatch.c:83: error: 'va_list' undeclared (first use in this function) dispatch.c:83: error: (Each undeclared identifier is reported only once dispatch.c:83: error: for each function it appears in.)

Re: [libvirt] [PATCH] cgroup: Add missing errno == ENOENT check in virCgroupRemoveRecursively

2010-06-30 Thread Ryota Ozaki
On Wed, Jun 30, 2010 at 3:21 AM, Eric Blake ebl...@redhat.com wrote: On 06/28/2010 08:49 PM, Ryota Ozaki wrote:      grpdir = opendir(grppath);      if (grpdir == NULL) { +        if (errno == ENOENT) +            return 0; Shouldn't this be continue instead of return 0, so as to go

[libvirt] [PATCH] cgroup: Fix compilation broken on MinGW due to dirent-d_type

2010-06-30 Thread Ryota Ozaki
As pointed out by Eric Blake, using dirent-d_type breaks compilation on MinGW. This patch addresses this by using '#if defined' as same as doing for virCgroupForDriver. --- src/util/cgroup.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/util/cgroup.c

Re: [libvirt] [PATCH] cgroup: Fix compilation broken on MinGW due to dirent-d_type

2010-06-30 Thread Ryota Ozaki
On Wed, Jun 30, 2010 at 8:49 PM, Ryota Ozaki ozaki.ry...@gmail.com wrote: As pointed out by Eric Blake, using dirent-d_type breaks compilation on MinGW. This patch addresses this by using '#if defined' as same as doing for virCgroupForDriver. Note that I didn't test this patch because I don't

Re: [libvirt] [PATCH] cgroup: Fix compilation broken on MinGW due to dirent-d_type

2010-06-30 Thread Ryota Ozaki
On Wed, Jun 30, 2010 at 11:34 PM, Eric Blake ebl...@redhat.com wrote: On 06/30/2010 05:49 AM, Ryota Ozaki wrote: As pointed out by Eric Blake, using dirent-d_type breaks compilation on MinGW. This patch addresses this by using '#if defined' as same as doing for virCgroupForDriver. ---  src

Re: [libvirt] [PATCH] cgroup: Add missing errno == ENOENT check in virCgroupRemoveRecursively

2010-06-28 Thread Ryota Ozaki
On Tue, Jun 29, 2010 at 1:41 AM, Eric Blake ebl...@redhat.com wrote: On 06/26/2010 11:21 AM, Ryota Ozaki wrote: ENOENT happens normally when a subsystem is enabled with any other subsystems and the directory of the target group has already removed in a prior loop. In that case, the function

[libvirt] [PATCH] lxc: Fix virsh console doesn't work after restarting libvirtd

2010-06-27 Thread Ryota Ozaki
Because tty path is unexpectedly not saved in the live configuration file of a domain, libvirtd cannot get the console of the domain back after restarting. The reason why the tty path isn't saved is that, to save the tty path, the save function, virDomainSaveConfig, requires that the target

[libvirt] [PATCH] cgroup: Add missing errno == ENOENT check in virCgroupRemoveRecursively

2010-06-26 Thread Ryota Ozaki
ENOENT happens normally when a subsystem is enabled with any other subsystems and the directory of the target group has already removed in a prior loop. In that case, the function should just return without leaving an error message. NB this is the same behavior as before introducing

[libvirt] [PATCH] lxc: Fix error handlings in lxcContainerRenameAndEnableInterfaces

2010-06-26 Thread Ryota Ozaki
The function is expected to return negative value on failure, however, it returns positive value when either setInterfaceName or vethInterfaceUpOrDown fails. Because the function returns the return value of either as is, however, the two functions may return positive value on failure. The patch

Re: [libvirt] [PATCH v2 1/2] cgroup: Change virCgroupRemove to remove all descendant groups at first

2010-06-24 Thread Ryota Ozaki
On Thu, Jun 24, 2010 at 5:41 AM, Eric Blake ebl...@redhat.com wrote: On 06/23/2010 10:00 AM, Ryota Ozaki wrote: As same as normal directories, a cgroup cannot be removed if it contains sub groups. This patch changes virCgroupRemove to remove all descendant groups (subdirectories) of a target

Re: [libvirt] [PATCH 1/2] cgroup: Change virCgroupRemove to remove all child groups at first

2010-06-23 Thread Ryota Ozaki
Hi Eric. Thanks for your kind review. On Wed, Jun 23, 2010 at 6:42 AM, Eric Blake ebl...@redhat.com wrote: On 05/23/2010 07:15 AM, Ryota Ozaki wrote: As same as normal directories, a cgroup cannot be removed if it contains sub groups. This patch changes virCgroupRemove to remove all child

Re: [libvirt] [PATCH 2/2] cgroup: Enable memory.use_hierarchy of cgroup for domain

2010-06-23 Thread Ryota Ozaki
On Wed, Jun 23, 2010 at 6:50 AM, Eric Blake ebl...@redhat.com wrote: On 05/23/2010 07:15 AM, Ryota Ozaki wrote: [Apologies for the delayed review, and for the fact that you had to ping us to remind us this had not been visited] Nevermind. I'm also sometimes late ;-) Through conversation

Re: [libvirt] [PATCH 1/2] cgroup: Change virCgroupRemove to remove all child groups at first

2010-06-23 Thread Ryota Ozaki
On Wed, Jun 23, 2010 at 10:37 PM, Eric Blake ebl...@redhat.com wrote: On 06/23/2010 05:51 AM, Ryota Ozaki wrote: Technically, any loop over readdir must first set errno to 0, then call readdir, and if it is NULL, check if errno is still 0.  Otherwise, you can miss subtle readdir failures. Oh

[libvirt] [PATCH v2 1/2] cgroup: Change virCgroupRemove to remove all descendant groups at first

2010-06-23 Thread Ryota Ozaki
As same as normal directories, a cgroup cannot be removed if it contains sub groups. This patch changes virCgroupRemove to remove all descendant groups (subdirectories) of a target group before removing the target group. The handling is required when we run lxc with ns subsystem of cgroup. Ns

[libvirt] [PATCH v2 2/2] cgroup: Enable memory.use_hierarchy of cgroup for domain

2010-06-23 Thread Ryota Ozaki
Through conversation with Kumar L Srikanth-B22348, I found that the function of getting memory usage (e.g., virsh dominfo) doesn't work for lxc with ns subsystem of cgroup enabled. This is because of features of ns and memory subsystems. Ns creates child cgroup on every process fork and as a

[libvirt] [PATCH v2 0/2] Fix problems on using lxc with cgroup ns subsystem

2010-06-23 Thread Ryota Ozaki
to bool - fix typo in commit log - change some 'child' to 'descendant' in commit log to make representation proper Ryota Ozaki (2): cgroup: Change virCgroupRemove to remove all descendant groups at first cgroup: Enable memory.use_hierarchy of cgroup for domain src/util/cgroup.c | 122

Re: [libvirt] Suggest to enter freeze for 0.8.2 this week-end

2010-06-19 Thread Ryota Ozaki
On Fri, Jun 18, 2010 at 11:02 PM, Daniel Veillard veill...@redhat.com wrote:  As previously suggested, I think it's time to get a new release going, and if we want to have it by end of the month it would be good to enter feature freeze over the week-end. I am seeing some un-ack'ed patches on

Re: [libvirt] About cgroup mechanism using in libvirt

2010-06-16 Thread Ryota Ozaki
On Thu, Jun 17, 2010 at 1:48 PM, Alex Jia a...@redhat.com wrote: Thanks for Daniel and Balbir. In fact, libvirt just have implemented CPU scheduler controller for QEMU driver now, the following controller is still not available for QEMU driver at present: 1. Memory controller 2. CPU set

Re: [libvirt] Unable to telnet in the Virtual Domain.

2010-06-01 Thread Ryota Ozaki
Hi Kumar On Tue, Jun 1, 2010 at 8:09 PM, Kumar L Srikanth-B22348 b22...@freescale.com wrote: Hi Ozaki, I need some help regarding telnet in the Virtual Domain. I created a Virtual Domain using libvirt and able to start the same with some ip address. I also installed telnet server in the

Re: [libvirt] Mounting /dev/tty* to the Virtual Domain.

2010-06-01 Thread Ryota Ozaki
On Tue, Jun 1, 2010 at 5:20 PM, Kumar L Srikanth-B22348 b22...@freescale.com wrote: Hi All, How to mount /dev/tty* files to the Virtual Domain ‘/dev’ directory. Some of the packages are not installing in the Virtual Domain, due the absence of these files in the /dev directory. In the rootfs

[libvirt] [PATCH 0/2][RESEND] Fix problems on using lxc with cgroup ns subsystem

2010-05-23 Thread Ryota Ozaki
is not properly accounted. Ryota Ozaki (2): cgroup: Change virCgroupRemove to remove all child groups at first cgroup: Enable memory.use_hierarchy of cgroup for domain -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

  1   2   3   >