[libvirt] [PATCH 2/3] support for "Host only" and "Internal" networks in VirtualBox driver
by Pritesh Kothari
Hi All,
As discussed on the list resending the networking patch's. the patch's are as
below:
[PATCH 1/3]: contains support for "Internal" network in libvirt
[PATCH 2/3]: contains support for "Host only" and "Internal" networks in
VirtualBox driver
[PATCH 3/3]: contains networking API for hostonly networks in VirtualBox
driver in libvirt (it contains all the fix's proposed on list along with two
extra *DefinedNetworks functions)
The patches work as per cvs checkin today. (git SHA1 ID:
9136ae2056b45ea83854d3fe31d860f645b8c883)
Regards,
Pritesh
15 years, 6 months
[libvirt] [PATCH 1/3] support for "Internal" network in libvirt
by Pritesh Kothari
Hi All,
As discussed on the list resending the networking patch's. the patch's are as
below:
[PATCH 1/3]: contains support for "Internal" network in libvirt
[PATCH 2/3]: contains support for "Host only" and "Internal" networks in
VirtualBox driver
[PATCH 3/3]: contains networking API for hostonly networks in VirtualBox
driver in libvirt (it contains all the fix's proposed on list along with two
extra *DefinedNetworks functions)
The patches work as per cvs checkin today. (git SHA1 ID:
9136ae2056b45ea83854d3fe31d860f645b8c883)
Regards,
Pritesh
15 years, 6 months
[libvirt] Status and plans for next release
by Daniel Veillard
Seems I didn't send any reminder about the next release plans on
Friday, so here is a recap:
- feature freeze on the 22nd so we have 2 more week to work on
reviewing and adding OpenNebula/Power drivers and try to get the
NPIV, netcf and secure migration patches in. It's likely not
everything will make the release cut but we can try !
- target for next release is Friday 29th
So far we have mostly a lot of bug fixes and VirtualBox driver updates
commited since 0.6.3,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
15 years, 6 months
[libvirt] Java binding blockStats bug (libvirt-java-0.2.1)
by Zvi Dubitzky
running blcokStats() with Java binding (libvirt-java-0.2.1 ) I get an
exception
Inspecting the src/jni/org_libvirt_Domain.c is see the following lines of
code :
JNIEXPORT jobject JNICALL Java_org_libvirt_Domain__1blockStats
(JNIEnv *env, jobject obj, jlong VDP, jstring j_path){
struct _virDomainBlockStats stats;
jobject j_stats;
jclass stats_cls=(*env)->FindClass(env,
"org/libvirt/DomainInterfaceStats");
const char *path = (*env)->GetStringUTFChars(env, j_path, NULL);
if(virDomainBlockStats((virDomainPtr)VDP, path, &stats,
sizeof(struct _virDomainBlockStats))<0){
(*env)->ReleaseStringUTFChars(env, j_path, path);
return NULL;
}
.
.
.
The bold line should be replaced by :
jclass stats_cls=(*env)->FindClass(env, "org/libvirt/DomainBlockStats")
as we deal here with blockStats and not network interface Stats !
thanks
Zvi Dubitzky
Virtualization and System Architecture Email:dubi@il.ibm.com
IBM Haifa Research Laboratory Phone: +972-4-8296182
Haifa, 31905, ISRAEL
15 years, 6 months
[libvirt] Fw: Java api for domain migration
by Zvi Dubitzky
Sorry , clarification:
Bottom line is that the Java binding of libvirt should accept 'dname'
parameter = null as the C libvirt case does without crashing
The below stament that
" If I try to specify a meaningful 'dname' then if it is the same name
as the original host domain 'name' I will get a message saying : invalid
domain pointer in no domain with matching id -1."
is not correct. The migrate works under Java in this case as in the C
case i.e the domain is migrated to the destination
host but remains paused there for a long time until resumed there.
If the 'dname' is null then the migration is faster but that works ok only
with the libvirt C library. It crashes with the Java binding .
Zvi Dubitzky
Virtualization and System Architecture Email:dubi@il.ibm.com
IBM Haifa Research Laboratory Phone: +972-4-8296182
Haifa, 31905, ISRAEL
----- Forwarded by Zvi Dubitzky/Haifa/IBM on 10/05/2009 13:29 -----
Zvi Dubitzky/Haifa/IBM
10/05/2009 13:14
To
libvir-list(a)redhat.com
cc
Subject
Fw: Java api for domain migration
Hi
I think I detected the origin of the libvirt Java binding crash in the
case of domain migration though I do not know how to fix it yet .
The fix should be in the src/jni/org_libvirt_Domain.c / migrate function.
First: It turns out the that the C libvirt interface for migrate (
libvirt 0.6.1. + kvm-84) has a limitation with specifying the 'dname'
parameter . It should be NULL to work ok , meaning the domain is migrated
from the old host to the new host under the same domain name . If I try to
specify a meaningful 'dname' then if it is the same name as the original
host domain 'name' I will get a message saying : invalid domain pointer
in no domain with matching id -1.
If I am using 'dname' different than the original host domain 'name' it
will complain that no such domain is found on the target host.
So using NULL for 'dname' is the only one that makes the migrate work
Using 'dname' = NULL with the Java binding causes it though to crash as
below (see .log file). Fixing the jni code as below (see added 'if') does
not
help:
src/jni/org_libvirt_Domain.c
--------------------------------
JNIEXPORT jlong JNICALL Java_org_libvirt_Domain__1migrate
(JNIEnv *env, jobject obj, jlong VDP, jobject dconn, jlong flags,
jstring j_dname, jstring j_uri, jlong bandwidth){
virConnectPtr destVCP;
const char *dname=NULL;
const char *uri=NULL;
//if String="", we pass NULL to the library
if((*env)->GetStringLength(env, j_dname)>0)
dname=(*env)->GetStringUTFChars(env, j_dname, NULL);
//if String="", we pass NULL to the library
if((*env)->GetStringLength(env, j_uri)>0)
uri=(*env)->GetStringUTFChars(env, j_uri, NULL);
//Extract the destination Conn Ptr
destVCP=(virConnectPtr)(*env)->GetLongField(env, dconn,
(*env)->GetFieldID(env,
(*env)->GetObjectClass(env, dconn), "VCP", "J"));
jlong retval = (jlong)virDomainMigrate((virDomainPtr)VDP, destVCP,
flags, dname, uri, bandwidth)
;
if (dname)
(*env)->ReleaseStringUTFChars(env, j_dname, dname);
if (uri)
(*env)->ReleaseStringUTFChars(env, j_uri, uri);
return retval;
}
Please your advice on how to solve the migrate for the Java binding
thanks
Zvi Dubitzky
Virtualization and System Architecture Email:dubi@il.ibm.com
IBM Haifa Research Laboratory Phone: +972-4-8296182
Haifa, 31905, ISRAEL
----- Forwarded by Zvi Dubitzky/Haifa/IBM on 10/05/2009 12:59 -----
Zvi Dubitzky/Haifa/IBM
07/05/2009 13:49
To
libvir-list(a)redhat.com
cc
Subject
Java api for libvirt migration
I am trying to do a migrate of VM with libvirt 0.6.1 and kvm-84 . I am
successful in doing it many times via the C interface .
I can do most of the basic libvirt activity via the libvirt JAVA library
(libvirt-java-0.2.1). When it comes to a migrate the JVM fails wit a log
file
attached below . Can someone help. My memory consumption in my JAVA test
code is small.
The migrate parameters I am sending with the Java are identical to
those I use in the C case and is:
destDomain = localDomain.migrate (dcon, // destination
host Connect object
VIR_MIGRATE_LIVE,
null, //const char *dname
destination domain name
target_uri,
//"tcp:9.148.28.13:4444"
0 //
unsigned long bandwidth) - do not specify
);
thanks
Zvi Dubitzky
Virtualization and System Architecture Email:dubi@il.ibm.com
IBM Haifa Research Laboratory Phone: +972-4-8296182
Haifa, 31905, ISRAEL
15 years, 6 months
[libvirt] Fw: Java api for domain migration
by Zvi Dubitzky
Hi
I think I detected the origin of the libvirt Java binding crash in the
case of domain migration though I do not know how to fix it yet .
The fix should be in the src/jni/org_libvirt_Domain.c / migrate function.
First: It turns out the that the C libvirt interface for migrate (
libvirt 0.6.1. + kvm-84) has a limitation with specifying the 'dname'
parameter . It should be NULL to work ok , meaning the domain is migrated
from the old host to the new host under the same domain name . If I try to
specify a meaningful 'dname' then if it is the same name as the original
host domain 'name' I will get a message saying : invalid domain pointer
in no domain with matching id -1.
If I am using 'dname' different than the original host domain 'name' it
will complain that no such domain is found on the target host.
So using NULL for 'dname' is the only one that makes the migrate work
Using 'dname' = NULL with the Java binding causes it though to crash as
below (see .log file). Fixing the jni code as below (see added 'if') does
not
help:
src/jni/org_libvirt_Domain.c
--------------------------------
JNIEXPORT jlong JNICALL Java_org_libvirt_Domain__1migrate
(JNIEnv *env, jobject obj, jlong VDP, jobject dconn, jlong flags,
jstring j_dname, jstring j_uri, jlong bandwidth){
virConnectPtr destVCP;
const char *dname=NULL;
const char *uri=NULL;
//if String="", we pass NULL to the library
if((*env)->GetStringLength(env, j_dname)>0)
dname=(*env)->GetStringUTFChars(env, j_dname, NULL);
//if String="", we pass NULL to the library
if((*env)->GetStringLength(env, j_uri)>0)
uri=(*env)->GetStringUTFChars(env, j_uri, NULL);
//Extract the destination Conn Ptr
destVCP=(virConnectPtr)(*env)->GetLongField(env, dconn,
(*env)->GetFieldID(env,
(*env)->GetObjectClass(env, dconn), "VCP", "J"));
jlong retval = (jlong)virDomainMigrate((virDomainPtr)VDP, destVCP,
flags, dname, uri, bandwidth)
;
if (dname)
(*env)->ReleaseStringUTFChars(env, j_dname, dname);
if (uri)
(*env)->ReleaseStringUTFChars(env, j_uri, uri);
return retval;
}
Please your advice on how to solve the migrate for the Java binding
thanks
Zvi Dubitzky
Virtualization and System Architecture Email:dubi@il.ibm.com
IBM Haifa Research Laboratory Phone: +972-4-8296182
Haifa, 31905, ISRAEL
----- Forwarded by Zvi Dubitzky/Haifa/IBM on 10/05/2009 12:59 -----
Zvi Dubitzky/Haifa/IBM
07/05/2009 13:49
To
libvir-list(a)redhat.com
cc
Subject
Java api for libvirt migration
I am trying to do a migrate of VM with libvirt 0.6.1 and kvm-84 . I am
successful in doing it many times via the C interface .
I can do most of the basic libvirt activity via the libvirt JAVA library
(libvirt-java-0.2.1). When it comes to a migrate the JVM fails wit a log
file
attached below . Can someone help. My memory consumption in my JAVA test
code is small.
The migrate parameters I am sending with the Java are identical to
those I use in the C case and is:
destDomain = localDomain.migrate (dcon, // destination
host Connect object
VIR_MIGRATE_LIVE,
null, //const char *dname
destination domain name
target_uri,
//"tcp:9.148.28.13:4444"
0 //
unsigned long bandwidth) - do not specify
);
thanks
Zvi Dubitzky
Virtualization and System Architecture Email:dubi@il.ibm.com
IBM Haifa Research Laboratory Phone: +972-4-8296182
Haifa, 31905, ISRAEL
15 years, 6 months
[libvirt] migration fails
by jens
Hello,
I tried to migrate a kvm domain to a second identical machine with the
command:
virsh migrate --live dom1 qemu+ssh://second.machine.org/system which
leads me to an unresponsive virsh on the second machine - 'virsh list'
just takes forever and qemu wasn't started (the domain was not
migrated), finally I have to kill libvirtd on the second machine.
Because I'm new to libvirt I searched the web to find a solution for
this behavior but without success.
Please can someone on the list point me to the right direction how I can
use libvirt to migrate kvm domains?
I use kernel 2.6.29.1 and kvm-85 with libvirt 0.6.2 on an debian
unstable system.
Attached are debug logs generated by the source- and destination-machine.
Thank you very much
Jens
15 years, 6 months
[libvirt] [PATCH] change permissions of directories in cgroups
by Ryota Ozaki
Hi,
This patch creates a directory in cgroups with an ordinary
permission 0755 (rwxr-xr-x) instead of 0655 (rw-r-xr-x).
I guess 0655 is not expected and just a mistake, or is
there a special reason?
Thanks,
ozaki-r
Signed-off-by: Ryota Ozaki <ozaki.ryota(a)gmail.com>
>From 4829855bc0baa3c75806f106bc0e54eb1da75eea Mon Sep 17 00:00:00 2001
From: Ryota Ozaki <ozaki.ryota(a)gmail.com>
Date: Fri, 8 May 2009 03:23:50 +0900
Subject: [PATCH] change permissions of directories in cgroups
This patch creates a directory in cgroups with an ordinary
permission 0755 (rwxr-xr-x) instead of 0655 (rw-r-xr-x).
---
src/cgroup.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/cgroup.c b/src/cgroup.c
index d1d44a2..50517e2 100644
--- a/src/cgroup.c
+++ b/src/cgroup.c
@@ -436,7 +436,7 @@ static int virCgroupMakeGroup(const char *name)
virCgroupFree(&root);
if (access(path, F_OK) != 0) {
- if (mkdir(path, 0655) < 0) {
+ if (mkdir(path, 0755) < 0) {
rc = -errno;
VIR_FREE(path);
break;
--
1.6.0.6
15 years, 6 months
[libvirt] [PATCH] lxc: fix mknod file type
by Ryota Ozaki
Hi,
This patch fixes the 2nd argument of mknod syscall. The argument
should include a file type, i.e., S_IFCHR in this case, otherwise
created files will be regular files.
Thanks,
ozaki-r
Signed-off-by: Ryota Ozaki <ozaki.ryota(a)gmail.com>
>From 60009b725da855f131e8272f0397455ae27bafc3 Mon Sep 17 00:00:00 2001
From: Ryota Ozaki <ozaki.ryota(a)gmail.com>
Date: Wed, 6 May 2009 03:47:04 +0900
Subject: [PATCH] lxc: fix mknod file type
This patch fixes the 2nd argument of mknod syscall. The argument
should include a file type, i.e., S_IFCHR in this case, otherwise
created files will be regular files.
---
src/lxc_container.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lxc_container.c b/src/lxc_container.c
index 3946b84..c30daec 100644
--- a/src/lxc_container.c
+++ b/src/lxc_container.c
@@ -440,7 +440,7 @@ static int lxcContainerPopulateDevices(void)
/* Populate /dev/ with a few important bits */
for (i = 0 ; i < ARRAY_CARDINALITY(devs) ; i++) {
dev_t dev = makedev(devs[i].maj, devs[i].min);
- if (mknod(devs[i].path, 0, dev) < 0 ||
+ if (mknod(devs[i].path, S_IFCHR, dev) < 0 ||
chmod(devs[i].path, devs[i].mode)) {
virReportSystemError(NULL, errno,
_("failed to make device %s"),
@@ -457,7 +457,7 @@ static int lxcContainerPopulateDevices(void)
}
} else {
dev_t dev = makedev(LXC_DEV_MAJ_TTY, LXC_DEV_MIN_PTMX);
- if (mknod("/dev/ptmx", 0, dev) < 0 ||
+ if (mknod("/dev/ptmx", S_IFCHR, dev) < 0 ||
chmod("/dev/ptmx", 0666)) {
virReportSystemError(NULL, errno, "%s",
_("failed to make device /dev/ptmx"));
--
1.6.0.6
15 years, 6 months
[libvirt] [PATCH] vbox: don't fail on missing vbox
by Guido Günther
Hi,
virsh fails with:
10:47:37.104: debug : do_open:922 : no name, allowing driver auto-select
10:47:37.104: debug : do_open:930 : trying driver 0 (Test) ...
10:47:37.104: debug : do_open:936 : driver 0 Test returned DECLINED
10:47:37.104: debug : do_open:930 : trying driver 1 (OPENVZ) ...
10:47:37.105: debug : do_open:936 : driver 1 OPENVZ returned DECLINED
10:47:37.105: debug : do_open:930 : trying driver 2 (VBOX) ...
10:47:37.106: debug : do_open:936 : driver 2 VBOX returned ERROR
10:47:37.106: debug : virUnrefConnect:210 : unref connection 0x10032b10 1
10:47:37.106: debug : virReleaseConnect:171 : release connection 0x10032b10
error: failed to connect to the hypervisor
if one has built with vbox support but vbox is not installed. Attached
patch calls VBoxCGlueInit() early so we can return 'declined' instead of
'error'. O.k. to apply?
-- Guido
15 years, 6 months