Re: [libvirt] [PATCH] fix MinGW compilation(200808)
Atsushi SAKAI [EMAIL PROTECTED] wrote: I have a question about inet_pton(). I try to compile libvirt on MinGW after some modification. The error message says follows. C:/msys/1.0/home/sakaia/work/libvirt/src/network_conf.c:290: undefined reference to `inet_pton' C:/msys/1.0/home/sakaia/work/libvirt/src/network_conf.c:296: undefined reference to `inet_pton' Thanks for the report. When the system does not declare inet_pton, gnulib arranges for it to be in gnulib/lib/arpa/inet.h. Since network_conf.c does include arpa/inet.h, and -I directives point to the containing directory, it should use that file. Please run make distclean (or start from a fresh checkout), then run the usual ./autogen.sh command, to ensure that you don't have any stale, generated files. If the problem persists, please post the contents of the generated gnulib/lib/arpa/inet.h. -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [patch][doc] fix typos 20080807
Hi, Typo fixes on document. formatdomain.html| 22 +++--- formatdomain.html.in | 22 +++--- java.html|2 +- java.html.in |2 +- 4 files changed, 24 insertions(+), 24 deletions(-) Thanks Atsushi SAKAI fix_typo.patch Description: Binary data -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] fix MinGW compilation(200808)
Hi, Jim Thsnk you for your reply. src/network_conf.c defines #include arpa/inet.h. The error message says the link does not exist. So I think it should add inet_pton.c to Makefile Is my understanding incorrect? By the way, I added sys/stat.h to domain_conf.c. It solves the missing definition of S_IRUSR, S_IWUSR. Thanks Atsushi SAKAI Jim Meyering [EMAIL PROTECTED] wrote: Atsushi SAKAI [EMAIL PROTECTED] wrote: I have a question about inet_pton(). I try to compile libvirt on MinGW after some modification. The error message says follows. C:/msys/1.0/home/sakaia/work/libvirt/src/network_conf.c:290: undefined reference to `inet_pton' C:/msys/1.0/home/sakaia/work/libvirt/src/network_conf.c:296: undefined reference to `inet_pton' Thanks for the report. When the system does not declare inet_pton, gnulib arranges for it to be in gnulib/lib/arpa/inet.h. Since network_conf.c does include arpa/inet.h, and -I directives point to the containing directory, it should use that file. Please run make distclean (or start from a fresh checkout), then run the usual ./autogen.sh command, to ensure that you don't have any stale, generated files. If the problem persists, please post the contents of the generated gnulib/lib/arpa/inet.h. -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] How does virt-manager send shutdown?
On Mon, Aug 04, 2008 at 09:05:07AM -0400, Bryan Kearney wrote: I added the following to my xml features feature acpi/ /feature /features and had acpi=force on my kernel line.. still no luck. I looked for bugs in bugzilla.redhat... saw none for kvm with acpi. Is there another to bug tool to look at? You can check if the acpi interrupt got dilivered in /proc/interrupts. If so your OS doesn't handle it (e.g. missing acpi tools), if it didn't get delivered there's probably something broken with kvm. -- Guido -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] fix MinGW compilation(200808)
Atsushi SAKAI [EMAIL PROTECTED] wrote: Hi, Jim Thsnk you for your reply. src/network_conf.c defines #include arpa/inet.h. The error message says the link does not exist. So I think it should add inet_pton.c to Makefile ... I try to compile libvirt on MinGW after some modification. The error message says follows. C:/msys/1.0/home/sakaia/work/libvirt/src/network_conf.c:290: undefined reference to `inet_pton' C:/msys/1.0/home/sakaia/work/libvirt/src/network_conf.c:296: undefined reference to `inet_pton' Ahh.. those are _link_ errors. That's due to a missing file: gnulib/m4/inet_pton.m4, and one that I didn't update: gnulib/m4/gnulib-comp.m4 My smoke test configure/build worked fine because I ran it on a Linux system, which doesn't need inet_pton. Please try this patch: (this gnulib-comp.m4 changes also reflects some unrelated changes in gnulib -- FYI, I'm preparing another gnulib-related patch that updates several files with bug- and portability- fixes) From 335ac36a1e22da0922eb4abb7501c79bf418b8b0 Mon Sep 17 00:00:00 2001 From: Jim Meyering [EMAIL PROTECTED] Date: Thu, 7 Aug 2008 09:56:38 +0200 Subject: [PATCH] complete the MinGW inet_pton portability fix * gnulib/m4/inet_pton.m4: New file. Required for MinGW. * gnulib/m4/gnulib-comp.m4: Update. --- gnulib/m4/gnulib-comp.m4 | 62 + gnulib/m4/inet_pton.m4 | 27 2 files changed, 67 insertions(+), 22 deletions(-) create mode 100644 gnulib/m4/inet_pton.m4 diff --git a/gnulib/m4/gnulib-comp.m4 b/gnulib/m4/gnulib-comp.m4 index 6341bc2..239eb7a 100644 --- a/gnulib/m4/gnulib-comp.m4 +++ b/gnulib/m4/gnulib-comp.m4 @@ -39,6 +39,8 @@ AC_DEFUN([gl_INIT], m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) + m4_pushdef([gl_LIBSOURCES_LIST], []) + m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='gnulib/lib' gl_EOVERFLOW @@ -60,6 +62,8 @@ AC_DEFUN([gl_INIT], AC_SUBST([LTLIBINTL]) gl_INET_NTOP gl_ARPA_INET_MODULE_INDICATOR([inet_ntop]) + gl_INET_PTON + gl_ARPA_INET_MODULE_INDICATOR([inet_pton]) gl_FUNC_LSEEK gl_UNISTD_MODULE_INDICATOR([lseek]) gl_FUNC_MALLOC_POSIX @@ -107,6 +111,19 @@ AC_DEFUN([gl_INIT], AM_XGETTEXT_OPTION([--flag=vasprintf:2:c-format])]) gl_WCHAR_H gl_XSIZE + m4_ifval(gl_LIBSOURCES_LIST, [ +m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || + for gl_file in ]gl_LIBSOURCES_LIST[ ; do +if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then + echo missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file 2 + exit 1 +fi + done])dnl + m4_if(m4_sysval, [0], [], +[AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) + m4_popdef([gl_LIBSOURCES_DIR]) + m4_popdef([gl_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) @@ -129,6 +146,8 @@ AC_DEFUN([gl_INIT], m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) + m4_pushdef([gltests_LIBSOURCES_LIST], []) + m4_pushdef([gltests_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='gnulib/tests' gt_TYPE_WCHAR_T @@ -136,6 +155,19 @@ AC_DEFUN([gl_INIT], AC_CHECK_FUNCS([shutdown]) abs_aux_dir=`cd $ac_aux_dir; pwd` AC_SUBST([abs_aux_dir]) + m4_ifval(gltests_LIBSOURCES_LIST, [ +m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || + for gl_file in ]gltests_LIBSOURCES_LIST[ ; do +if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then + echo missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file 2 + exit 1 +fi + done])dnl + m4_if(m4_sysval, [0], [], +[AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) + m4_popdef([gltests_LIBSOURCES_DIR]) + m4_popdef([gltests_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) @@ -164,13 +196,6 @@ AC_DEFUN([gl_LIBOBJ], [ gl_LIBOBJS=$gl_LIBOBJS $1.$ac_objext ]) -# m4_foreach_w is provided by autoconf-2.59c and later. -# This definition is to accommodate developers using versions -# of autoconf older than that. -m4_ifndef([m4_foreach_w], - [m4_define([m4_foreach_w], -[m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) - # Like AC_REPLACE_FUNCS, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_REPLACE_FUNCS], [ @@ -179,15 +204,14 @@ AC_DEFUN([gl_REPLACE_FUNCS], [ ]) # Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parametrization, +# expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the
Re: [libvirt] [PATCH] The logic in veth.c that searches for free interface names takes into account
On Wed, Aug 06, 2008 at 08:20:38AM -0700, Dan Smith wrote: only current devices, but not device names already planned for the other half of a container's device pair. Thus, the search can result in attempting to create a pair of devices such as veth1 and veth1, which obviously does not work. This patch augments the logic to be a little smarter in this regard, and should fix one case where attempting to start a container results in an error message of unable to create device pair. [...] -if (1 strlen(veth2)) { +while ((1 strlen(veth2)) || STREQ(veth1, veth2)) { vethDev = getFreeVethName(veth2, veth2MaxLen, vethDev); DEBUG(assigned veth2: %s, veth2); } Seems a side effect statement is needed in this loop to exit it if we happen to enter it, no ? Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] The logic in veth.c that searches for free interface names takes into account
On Wed, Aug 06, 2008 at 08:20:38AM -0700, Dan Smith wrote: only current devices, but not device names already planned for the other half of a container's device pair. Thus, the search can result in attempting to create a pair of devices such as veth1 and veth1, which obviously does not work. This patch augments the logic to be a little smarter in this regard, and should fix one case where attempting to start a container results in an error message of unable to create device pair. ACK, this explains the failures I've hit with duplicate veth names ! Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] Is CVS server working?
On Thu, Aug 07, 2008 at 09:53:28AM +0900, Atsushi SAKAI wrote: Hi, CVS server [EMAIL PROTECTED]:2401/data/cvs is working? I can see git repository but CVS repository are not. I just checked based on instructions at http://libvirt.org/downloads.html and yes i was able to login and checkout, Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [patch][doc] fix typos 20080807
On Thu, Aug 07, 2008 at 04:05:40PM +0900, Atsushi SAKAI wrote: Hi, Typo fixes on document. All looks fine to me, please commit :-) thanks ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] Is CVS server working?
Hi, Daniel Sorry for late. After an hour trying to repeating cvs command, I get the libvirt code tree.??? Thanks Atsushi SAKAI Daniel Veillard [EMAIL PROTECTED] wrote: On Thu, Aug 07, 2008 at 09:53:28AM +0900, Atsushi SAKAI wrote: Hi, CVS server [EMAIL PROTECTED]:2401/data/cvs is working? I can see git repository but CVS repository are not. I just checked based on instructions at http://libvirt.org/downloads.html and yes i was able to login and checkout, Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Install default storage pool
On Wed, Aug 06, 2008 at 05:10:23PM -0400, Cole Robinson wrote: The attached patch adds a default pool definition to install with libvirt. The pool is a directory pool, hardcoded to use /var/lib/libvirt/images, though this is replaced with %{_localstatedir}/lib/libvirt/images if installing via rpm. Since /var/lib/libvirt/images may not exist if installing from tar.gz, the pool is set not to autostart by default via that method. We should have the 'make install' rule create that directory This patch isn't ready to apply though, since there is one issue I don't know how to solve. We don't want every rpm upgrade to install the default pool, since we don't want the default to continually resurrect itself if a user explicitly deletes it. The default network handles this by checking if libvirtd has been installed. Since libvirtd and virtual network support were introduced around the same time, this makes sense. However for storage, I can't think of any simple check we can make. If we used the same as the default network, all f8 or f9 upgrades wouldn't install the default pool. I think we should just handle this a little differently. Basically don't do any setup in the RPM of the storage pool config, merely have /var/lib/libvirt/images created - this is already done in fact. Then if virt-install, or virt-manager run and find no configured storage pools at all on a host at time of VM creation, they should simply create the default one pointing at /var/lib/libvirt/images/. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] Is CVS server working?
On Thu, Aug 07, 2008 at 05:38:49PM +0900, Atsushi SAKAI wrote: Hi, Daniel Sorry for late. After an hour trying to repeating cvs command, I get the libvirt code tree.??? Looking at the server security logs i saw denied ssh root access from china which i usually block automatically after a few failed login attempts, a working cvs access from Taiwan and a bunch of access earlier from within Fujitsu (approximately 2 hours ago). They were not denied, but i guess something blocked the traffic, I would tent to think it was a temporary network problem between both sites. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] fix MinGW compilation(200808)
Hi, Jim Your patch works fine. It passes inet_pton problem. Please apply it. By the way, virsh compilation error. Is threre any good suggestion? = virsh-virsh.o: In function `editWriteToTempFile': C:/msys/1.0/home/Administrator/work/libvirt/src/virsh.c:5080: undefined reference to `mkstemp' virsh-virsh.o: In function `editFile': C:/msys/1.0/home/Administrator/work/libvirt/src/virsh.c:5155: undefined reference to `WEXITSTATUS' = Thanks Atsushi SAKAI Jim Meyering [EMAIL PROTECTED] wrote: Atsushi SAKAI [EMAIL PROTECTED] wrote: Hi, Jim Thsnk you for your reply. src/network_conf.c defines #include arpa/inet.h. The error message says the link does not exist. So I think it should add inet_pton.c to Makefile ... I try to compile libvirt on MinGW after some modification. The error message says follows. C:/msys/1.0/home/sakaia/work/libvirt/src/network_conf.c:290: undefined reference to `inet_pton' C:/msys/1.0/home/sakaia/work/libvirt/src/network_conf.c:296: undefined reference to `inet_pton' Ahh.. those are _link_ errors. That's due to a missing file: gnulib/m4/inet_pton.m4, and one that I didn't update: gnulib/m4/gnulib-comp.m4 My smoke test configure/build worked fine because I ran it on a Linux system, which doesn't need inet_pton. Please try this patch: (this gnulib-comp.m4 changes also reflects some unrelated changes in gnulib -- FYI, I'm preparing another gnulib-related patch that updates several files with bug- and portability- fixes) From 335ac36a1e22da0922eb4abb7501c79bf418b8b0 Mon Sep 17 00:00:00 2001 From: Jim Meyering [EMAIL PROTECTED] Date: Thu, 7 Aug 2008 09:56:38 +0200 Subject: [PATCH] complete the MinGW inet_pton portability fix * gnulib/m4/inet_pton.m4: New file. Required for MinGW. * gnulib/m4/gnulib-comp.m4: Update. --- gnulib/m4/gnulib-comp.m4 | 62 + gnulib/m4/inet_pton.m4 | 27 2 files changed, 67 insertions(+), 22 deletions(-) create mode 100644 gnulib/m4/inet_pton.m4 diff --git a/gnulib/m4/gnulib-comp.m4 b/gnulib/m4/gnulib-comp.m4 index 6341bc2..239eb7a 100644 --- a/gnulib/m4/gnulib-comp.m4 +++ b/gnulib/m4/gnulib-comp.m4 @@ -39,6 +39,8 @@ AC_DEFUN([gl_INIT], m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) + m4_pushdef([gl_LIBSOURCES_LIST], []) + m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='gnulib/lib' gl_EOVERFLOW @@ -60,6 +62,8 @@ AC_DEFUN([gl_INIT], AC_SUBST([LTLIBINTL]) gl_INET_NTOP gl_ARPA_INET_MODULE_INDICATOR([inet_ntop]) + gl_INET_PTON + gl_ARPA_INET_MODULE_INDICATOR([inet_pton]) gl_FUNC_LSEEK gl_UNISTD_MODULE_INDICATOR([lseek]) gl_FUNC_MALLOC_POSIX @@ -107,6 +111,19 @@ AC_DEFUN([gl_INIT], AM_XGETTEXT_OPTION([--flag=vasprintf:2:c-format])]) gl_WCHAR_H gl_XSIZE + m4_ifval(gl_LIBSOURCES_LIST, [ +m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || + for gl_file in ]gl_LIBSOURCES_LIST[ ; do +if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then + echo missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file 2 + exit 1 +fi + done])dnl + m4_if(m4_sysval, [0], [], +[AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) + m4_popdef([gl_LIBSOURCES_DIR]) + m4_popdef([gl_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) @@ -129,6 +146,8 @@ AC_DEFUN([gl_INIT], m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) + m4_pushdef([gltests_LIBSOURCES_LIST], []) + m4_pushdef([gltests_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='gnulib/tests' gt_TYPE_WCHAR_T @@ -136,6 +155,19 @@ AC_DEFUN([gl_INIT], AC_CHECK_FUNCS([shutdown]) abs_aux_dir=`cd $ac_aux_dir; pwd` AC_SUBST([abs_aux_dir]) + m4_ifval(gltests_LIBSOURCES_LIST, [ +m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || + for gl_file in ]gltests_LIBSOURCES_LIST[ ; do +if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then + echo missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file 2 + exit 1 +fi + done])dnl + m4_if(m4_sysval, [0], [], +[AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) + m4_popdef([gltests_LIBSOURCES_DIR]) + m4_popdef([gltests_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) @@ -164,13 +196,6 @@ AC_DEFUN([gl_LIBOBJ], [ gl_LIBOBJS=$gl_LIBOBJS $1.$ac_objext ]) -# m4_foreach_w is provided by autoconf-2.59c and later. -# This
Re: [libvirt] [PATCH] fix MinGW compilation(200808)
On Thu, Aug 07, 2008 at 05:56:48PM +0900, Atsushi SAKAI wrote: Hi, Jim Your patch works fine. It passes inet_pton problem. Please apply it. By the way, virsh compilation error. Is threre any good suggestion? = virsh-virsh.o: In function `editWriteToTempFile': C:/msys/1.0/home/Administrator/work/libvirt/src/virsh.c:5080: undefined reference to `mkstemp' Look like there is a gnulib module for that - Jim could say if its license compatible virsh-virsh.o: In function `editFile': C:/msys/1.0/home/Administrator/work/libvirt/src/virsh.c:5155: undefined reference to `WEXITSTATUS' virsh.c seems to be missing '#include sys/wait.h' Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] fix MinGW compilation(200808)
Atsushi SAKAI [EMAIL PROTECTED] wrote: Your patch works fine. It passes inet_pton problem. Please apply it. By the way, virsh compilation error. Is threre any good suggestion? = virsh-virsh.o: In function `editWriteToTempFile': C:/msys/1.0/home/Administrator/work/libvirt/src/virsh.c:5080: undefined reference to `mkstemp' virsh-virsh.o: In function `editFile': C:/msys/1.0/home/Administrator/work/libvirt/src/virsh.c:5155: undefined reference to `WEXITSTATUS' = There's a gnulib module for that (of course ;-). I'll have to relax licenses of mkstemp and the dependent module, tempname. Should be no problem. -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] update from gnulib
I've just checked in a big batch of changes from gnulib. Each of those changes has been reviewed by at least two people (see [EMAIL PROTECTED]), and most of them address problems also reported on that list, or e.g., on bug-coreutils, bug-m4, etc. However, I suspect some of them have not yet been exercised on RHEL4/5 systems, so test builds there may be interesting. From e6440820773161436812ccad7eba6d555a8186dd Mon Sep 17 00:00:00 2001 From: Jim Meyering [EMAIL PROTECTED] Date: Thu, 7 Aug 2008 10:28:22 +0200 Subject: [PATCH] update from gnulib * build-aux/mktempd (rand_bytes, mktempd): * build-aux/useless-if-before-free (FILE): * build-aux/vc-list-files: * gnulib/lib/.cvsignore: * gnulib/lib/Makefile.am: * gnulib/lib/poll.c (poll): * gnulib/lib/stdbool.in.h (_GL_STDBOOL_H, true): * gnulib/lib/stdio-impl.h (fp_, fp_ub): * gnulib/lib/stdio.in.h (vasprintf, obstack_printf) (obstack_vprintf): * gnulib/lib/vasnprintf.c (_GNU_SOURCE, sprintf, IF_LINT, exp) (remainder, scale10_round_decimal_long_double) (scale10_round_decimal_double, pad_ourselves): * gnulib/m4/gnulib-cache.m4: * gnulib/m4/gnulib-common.m4 (gl_MODULE_INDICATOR): * gnulib/m4/gnulib-tool.m4 (gl_LOCAL_DIR, gl_M4_BASE, gl_PO_BASE) (gl_DOC_BASE, gl_TESTS_BASE, gl_WITH_TESTS, gl_LIB, gl_LGPL) (gl_MAKEFILE_NAME, gl_MACRO_PREFIX, gl_PO_DOMAIN, gl_VC_FILES): * gnulib/m4/lock.m4 (gl_LOCK_EARLY_BODY, gl_PREREQ_LOCK) (gl_DISABLE_THREADS): * gnulib/m4/onceonly.m4: * gnulib/m4/posix-shell.m4 (gl_POSIX_SHELL): * gnulib/m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): * gnulib/tests/test-getaddrinfo.c (ENABLE_DEBUGGING, dbgprintf) (simple): * gnulib/tests/test-stdint.c (UINTMAX_MAX, or): * gnulib/tests/test-vc-list-files-cvs.sh (compare): * gnulib/tests/test-vc-list-files-git.sh (compare): --- build-aux/mktempd |6 +++- build-aux/useless-if-before-free | 32 +++- build-aux/vc-list-files|5 ++- gnulib/lib/.cvsignore | 12 gnulib/lib/Makefile.am | 15 +++- gnulib/lib/poll.c | 34 ++--- gnulib/lib/stdbool.in.h|6 ++-- gnulib/lib/stdio-impl.h|4 +- gnulib/lib/stdio.in.h | 20 +++ gnulib/lib/vasnprintf.c| 25 +++ gnulib/m4/gnulib-cache.m4 | 21 ++- gnulib/m4/gnulib-common.m4 |9 ++- gnulib/m4/gnulib-tool.m4 | 28 - gnulib/m4/lock.m4 | 37 +--- gnulib/m4/onceonly.m4 | 15 +++ gnulib/m4/posix-shell.m4 |7 +++-- gnulib/m4/stdio_h.m4 |6 - gnulib/tests/test-getaddrinfo.c| 41 +++ gnulib/tests/test-stdint.c |6 - gnulib/tests/test-vc-list-files-cvs.sh |3 +- gnulib/tests/test-vc-list-files-git.sh |3 +- 21 files changed, 249 insertions(+), 86 deletions(-) -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] update from gnulib
On Thu, Aug 07, 2008 at 11:46:29AM +0200, Jim Meyering wrote: I've just checked in a big batch of changes from gnulib. Each of those changes has been reviewed by at least two people (see [EMAIL PROTECTED]), and most of them address problems also reported on that list, or e.g., on bug-coreutils, bug-m4, etc. However, I suspect some of them have not yet been exercised on RHEL4/5 systems, so test builds there may be interesting. Hum, on RHEL5 configure/make passes, make tests fails one of the 18 tests: /u/veillard/libvirt/tests/conftest: No such file or directory FAIL: test_conf.sh test:~/libvirt - file /u/veillard/libvirt/tests/conftest /u/veillard/libvirt/tests/conftest: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped test:~/libvirt - ldd /u/veillard/libvirt/tests/conftest doesn't show any unresolved lib I didn't found yet what's going on for RHEL4 i need the followig patch for it to compile (the function changed but the signature of the dummy didn't get fixed) Index: src/bridge.c === RCS file: /data/cvs/libvir/src/bridge.c,v retrieving revision 1.16 diff -u -p -r1.16 bridge.c --- src/bridge.c11 Jul 2008 19:34:11 - 1.16 +++ src/bridge.c7 Aug 2008 09:54:05 - @@ -156,9 +156,7 @@ brAddBridge(brControl *ctl, } #else int brAddBridge (brControl *ctl ATTRIBUTE_UNUSED, - const char *nameOrFmt ATTRIBUTE_UNUSED, - char *name ATTRIBUTE_UNUSED, - int maxlen ATTRIBUTE_UNUSED) + char **name ATTRIBUTE_UNUSED) { return EINVAL; } I then get 7 of 17 tests failed and 1 not run 1) virsh list (default) ... FAILED 2) virsh list (custom) ... OK 3) virsh nodeinfo (default) ... FAILED 4) virsh nodeinfo (custom) ... OK in virshtest the same ./test_conf.sh: line 21: /u/veillard/libvirt/tests /u/veillard/libvirt/tests/conftest: No such file or directory FAIL: test_conf.sh as on RHEL5 and then a bunch of errors on the individual tests, but I guess it's because there is no hypervisor running or available on that box :-) basically gnulib update seems to not be a problem ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] update from gnulib
Daniel Veillard [EMAIL PROTECTED] wrote: ... However, I suspect some of them have not yet been exercised on RHEL4/5 systems, so test builds there may be interesting. on RHEL5 configure/make passes, make tests fails one of the 18 tests: ... for RHEL4 i need the followig patch for it to compile (the function changed but the signature of the dummy didn't get fixed) Looks fine. ACK. Index: src/bridge.c === RCS file: /data/cvs/libvir/src/bridge.c,v retrieving revision 1.16 diff -u -p -r1.16 bridge.c --- src/bridge.c 11 Jul 2008 19:34:11 - 1.16 +++ src/bridge.c 7 Aug 2008 09:54:05 - @@ -156,9 +156,7 @@ brAddBridge(brControl *ctl, } #else int brAddBridge (brControl *ctl ATTRIBUTE_UNUSED, - const char *nameOrFmt ATTRIBUTE_UNUSED, - char *name ATTRIBUTE_UNUSED, - int maxlen ATTRIBUTE_UNUSED) + char **name ATTRIBUTE_UNUSED) ... basically gnulib update seems to not be a problem ! Good to hear. Thanks for the quick checks! -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] RE: [Qemu-devel] [ANNOUNCE] virt-mem tools version 0.2.8 released
This seems to be great ! I think it is similar to OpenVZ concept of controlling VMs from Host, right ? How it works, if it is not installed in guest ? Using PV, in connects into guests virtio-tty device ? In may become more universal, if more command are added, such as: (like OpenVZ does) vm 101 enter (this will enter into guest VM TTY, right from host terminal). -or- vm 101 exec [guest-command] (this will execute command on guest, using bash, right from host terminal). For more commands from OpenVZ, that can be applied to Qemu/KVM, see: (7.8.2008) http://www.howtoforge.com/installing-and-using-openvz-on-fedora9-p2 -Alexey -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] RE: [Qemu-devel] [ANNOUNCE] virt-mem tools version 0.2.8 released
On Thu, Aug 7, 2008 at 7:20 PM, Alexey Eremenko [EMAIL PROTECTED] wrote: This seems to be great ! I think it is similar to OpenVZ concept of controlling VMs from Host, right ? How it works, if it is not installed in guest ? Basically he does that by inspecting the VM's memory. Something like the instrospection mechanism. One of the problem is that these tools work via libvirt, so on a VM is not managed by libvirt, these tools no longer work. Jun -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] RE: [Qemu-devel] [ANNOUNCE] virt-mem tools version 0.2.8 released
On Thu, Aug 07, 2008 at 07:40:58PM +0900, Jun Koi wrote: On Thu, Aug 7, 2008 at 7:20 PM, Alexey Eremenko [EMAIL PROTECTED] wrote: This seems to be great ! I think it is similar to OpenVZ concept of controlling VMs from Host, right ? How it works, if it is not installed in guest ? Basically he does that by inspecting the VM's memory. Something like the instrospection mechanism. Yes they peek at the live guest kernel memory image to extract the data. One of the problem is that these tools work via libvirt, so on a VM is not managed by libvirt, these tools no longer work. That's not a problem - that's a reason to use libvirt :-) It allows the same tools to work whether using Xen, QEMU, KVM or any other full machine virtualization suported by libvirt, rather than being tied to one particular hypervisor. Not to mention ability to run them remotely, with authentication and encryption, etc Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] The logic in veth.c that searches for free interface names takes into account
On Thu, Aug 07, 2008 at 04:30:30AM -0400, Daniel Veillard wrote: On Wed, Aug 06, 2008 at 08:20:38AM -0700, Dan Smith wrote: only current devices, but not device names already planned for the other half of a container's device pair. Thus, the search can result in attempting to create a pair of devices such as veth1 and veth1, which obviously does not work. This patch augments the logic to be a little smarter in this regard, and should fix one case where attempting to start a container results in an error message of unable to create device pair. [...] -if (1 strlen(veth2)) { +while ((1 strlen(veth2)) || STREQ(veth1, veth2)) { vethDev = getFreeVethName(veth2, veth2MaxLen, vethDev); DEBUG(assigned veth2: %s, veth2); } Seems a side effect statement is needed in this loop to exit it if we happen to enter it, no ? okay, i re-read and understand now, +1 Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] ISCSI Live Migration with LUN backed VMs
I am using iscsi backed VMs which use a separate LUN for each VM. This is all good until I try to live migrate because the LUN is not logged into on the new machine. Does anyone have a way of handling logging into and out of iscsi luns during the migration ? Tim Hughes mailto:[EMAIL PROTECTED] -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] ISCSI Live Migration with LUN backed VMs
On Thu, 7 Aug 2008, Tim Hughes wrote: I am using iscsi backed VMs which use a separate LUN for each VM. This is all good until I try to live migrate because the LUN is not logged into on the new machine. Does anyone have a way of handling logging into and out of iscsi luns during the migration ? There are patches floating on this list to make that possible. My own Xen based solution involves a block script for Xen, but the current libvirt solution should work too. Stefan -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] default networking issues
On Mon, 2008-08-04 at 14:28 -0700, David Lutterkort wrote: On Thu, 2008-07-31 at 09:55 +0100, Daniel P. Berrange wrote: The libvirt default networking capability will automatically setup the correct iptables rules to allow outbound NAT based connectivity for guest VMs. If this wasn't working there are two likely causes: - You run 'service iptables stop' which blew away the rules libvirt added This is a terrible situation; it will be a big surprise to many sysadmins and lead to lots of confusion Agreed. - is this only temporary until iptables/lokkit has facilities for cleaner addition of persistent firewall rules ? There's no huge technical issue here AFAICS. We just need a hook for libvirt to persistently register its rules with iptables. The main objection seems to be the old how do you prevent different sets of rules from conflicting chestnut. I don't see that being a serious issue in practice - there are all sorts of other global namespaces that apps manage to share effectively. Feel free to take a look at this; I lose motivation for fixing this every time I go back and discuss it with the maintainer: https://bugzilla.redhat.com/227011 The truly depressing aspect of all this is that any fix we come up with would be Fedora specific anyway - e.g. /etc/sysconfig/iptables.d Cheers, Mark. -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] ISCSI Live Migration with LUN backed VMs
On Thu, 7 Aug 2008, Daniel P. Berrange wrote: On Thu, Aug 07, 2008 at 12:19:01PM +0100, Tim Hughes wrote: I am using iscsi backed VMs which use a separate LUN for each VM. This is all good until I try to live migrate because the LUN is not logged into on the new machine. Does anyone have a way of handling logging into and out of iscsi luns during the migration ? In general its the responsibility of the application/admin triggering the migration to ensure that the destination host has the same storage and network configuration. There's nothing special about iSCSI in this regard really - FibreChannel/NFS/Cluster-LVM/etc all have the same core requirements. If you have a bunch of hosts you wish to migrate between, then you need to configure them all to have matching resources The fact that libvirt still doesn't automatically uses the result of send targets won't make it more easy for its users :) ...but we also had this discussion before. Stefan -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] RE: [Qemu-devel] [ANNOUNCE] virt-mem tools version 0.2.8 released
On Thu, Aug 07, 2008 at 03:55:49PM +0300, Alexey Eremenko wrote: The only problem: virt-mem doesn't compiles. It has a huge chain of dependencies actually. Maybe better off starting with our RPMs, either source or binary, from here: https://bugzilla.redhat.com/show_bug.cgi?id=450713 Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [et-mgmt-tools] Re: [libvirt] RE: [Qemu-devel] [ANNOUNCE] virt-mem tools version 0.2.8 released
On Thu, Aug 07, 2008 at 11:47:39AM +0100, Daniel P. Berrange wrote: On Thu, Aug 07, 2008 at 07:40:58PM +0900, Jun Koi wrote: One of the problem is that these tools work via libvirt, so on a VM is not managed by libvirt, these tools no longer work. That's not a problem - that's a reason to use libvirt :-) It allows the same tools to work whether using Xen, QEMU, KVM or any other full machine virtualization suported by libvirt, rather than being tied to one particular hypervisor. Not to mention ability to run them remotely, with authentication and encryption, etc We also support running the tools from memory images which you can capture using the QEMU memsave command (see the '-t' option). No libvirt required for that, _but_ to see any interesting stuff you'd need to capture the entire guest memory which could obviously be quite large. You could do 'virt-mem capture' which captures just the bits of memory that contain interesting data, and that reduces the amount of data you need to capture substantially. Unfortunately I broke 'virt-mem capture' in the latest release by accident, and in any case it requires libvirt to do the capturing. I think the message here is, install libvirt be happy :-) Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] RE: [Qemu-devel] [ANNOUNCE] virt-mem tools version 0.2.8 released
The only problem: virt-mem doesn't compiles. checking for ocamldoc... ocamldoc checking for ocamlfind... ./configure: line 5121: WARNING:: command not found no configure: error: OCaml findlib is required And I have installed Ocam. linux-3wx2:~/Linstall/virt-mem-0.2.9 # rpm -qa | grep -i ocam ocaml-3.10.2-22.1 ocaml-facile-1.1-121.1 ocaml-ocamldoc-3.10.2-22.1 openSUSE 11.0, 64-bit -- -Alexey Eromenko Technologov -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] RE: [Qemu-devel] [ANNOUNCE] virt-mem tools version 0.2.8 released
Alexey Eremenko, le Thu 07 Aug 2008 15:55:49 +0300, a écrit : The only problem: virt-mem doesn't compiles. checking for ocamldoc... ocamldoc checking for ocamlfind... ./configure: line 5121: WARNING:: command not found no configure: error: OCaml findlib is required And I have installed Ocam. ocaml findlib is not part of the main caml distribution, look for something like ocaml-findlib. Samuel -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH]: hostdev passthrough support take #3
Hi, attached is version three of the hostdev passthrough patch. It adds: * code to format the XML for output * RelaxNG schema update * testcases Cheers, -- Guido From cfcfc85accdcc7be7a5fbfd2c8dde435646d5ab2 Mon Sep 17 00:00:00 2001 From: Guido Guenther [EMAIL PROTECTED] Date: Fri, 25 Jul 2008 15:18:16 -0400 Subject: [PATCH] hostdev: pass host devices to the guest current implementation allows to pass on usb devices to qemu/kvm --- src/domain_conf.c | 268 - src/domain_conf.h | 51 ++ src/qemu_conf.c | 29 ++ src/qemu_driver.c | 110 -- 4 files changed, 430 insertions(+), 28 deletions(-) diff --git a/src/domain_conf.c b/src/domain_conf.c index 4998a7d..922cf76 100644 --- a/src/domain_conf.c +++ b/src/domain_conf.c @@ -131,6 +131,13 @@ VIR_ENUM_IMPL(virDomainGraphics, VIR_DOMAIN_GRAPHICS_TYPE_LAST, sdl, vnc) +VIR_ENUM_IMPL(virDomainHostdevMode, VIR_DOMAIN_HOSTDEV_MODE_LAST, + subsystem, + capabilities) + +VIR_ENUM_IMPL(virDomainHostdevSubsys, VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_LAST, + usb, + pci) static void virDomainReportError(virConnectPtr conn, int code, const char *fmt, ...) @@ -332,6 +339,16 @@ void virDomainSoundDefFree(virDomainSoundDefPtr def) VIR_FREE(def); } +void virDomainHostdevDefFree(virDomainHostdevDefPtr def) +{ +if (!def) +return; + +VIR_FREE(def-target); +virDomainHostdevDefFree(def-next); +VIR_FREE(def); +} + void virDomainDeviceDefFree(virDomainDeviceDefPtr def) { if (!def) @@ -350,6 +367,9 @@ void virDomainDeviceDefFree(virDomainDeviceDefPtr def) case VIR_DOMAIN_DEVICE_SOUND: virDomainSoundDefFree(def-data.sound); break; +case VIR_DOMAIN_DEVICE_HOSTDEV: +virDomainHostdevDefFree(def-data.hostdev); +break; } VIR_FREE(def); @@ -369,7 +389,7 @@ void virDomainDefFree(virDomainDefPtr def) virDomainChrDefFree(def-parallels); virDomainChrDefFree(def-console); virDomainSoundDefFree(def-sounds); - +virDomainHostdevDefFree(def-hostdevs); VIR_FREE(def-os.type); VIR_FREE(def-os.arch); @@ -1400,6 +1420,180 @@ error: goto cleanup; } +static int +virDomainHostdevSubsysUsbDefParseXML(virConnectPtr conn, + const xmlNodePtr node, + virDomainHostdevDefPtr def) { + +int ret = -1; +xmlNodePtr cur; + +cur = node-children; +while (cur != NULL) { +if (cur-type == XML_ELEMENT_NODE) { +if (xmlStrEqual(cur-name, BAD_CAST vendor)) { +char *vendor = virXMLPropString(cur, id); + +if (vendor) { +if (virStrToLong_ui(vendor, NULL, 0, +def-source.subsys.usb.vendor) 0) { +virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR, + _(cannot parse vendor id %s), vendor); +VIR_FREE(vendor); +goto out; +} +VIR_FREE(vendor); +} else { +virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR, + %s, _(usb vendor needs id)); +goto out; +} +} else if (xmlStrEqual(cur-name, BAD_CAST product)) { +char* product = virXMLPropString(cur, id); + +if (product) { +if (virStrToLong_ui(product, NULL, 0, +def-source.subsys.usb.product) 0) { +virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR, +_(cannot parse product %s), product); +VIR_FREE(product); +goto out; +} +VIR_FREE(product); +} else { +virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR, + %s, _(usb product needs id)); +goto out; +} +} else if (xmlStrEqual(cur-name, BAD_CAST address)) { +char *bus, *device; + +bus = virXMLPropString(cur, bus); +if (bus) { +if (virStrToLong_ui(bus, NULL, 0, +def-source.subsys.usb.bus) 0) { +virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR, + _(cannot parse bus %s), bus); +VIR_FREE(bus); +goto out; +} +VIR_FREE(bus); +} else { +virDomainReportError(conn, VIR_ERR_INTERNAL_ERROR, +
[libvirt] [PATCH] fix xmlint in separate build dir
Hi, attached patch lets the domainschema check work when building in $build instead of $src. Otherwise it won't find the xml files to validate. -- Guido From e2a19f1e14ef6712626a1b1b06b62cedf032495e Mon Sep 17 00:00:00 2001 From: Guido Guenther [EMAIL PROTECTED] Date: Thu, 7 Aug 2008 16:12:43 +0200 Subject: [PATCH] fix path to xml files --- tests/domainschematest |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tests/domainschematest b/tests/domainschematest index e410cdc..7ebcefc 100755 --- a/tests/domainschematest +++ b/tests/domainschematest @@ -8,7 +8,7 @@ n=0 f=0 for dir in $DOMAINDIRS do - XML=`find $dir -name '*.xml'` + XML=`find $abs_srcdir/$dir -name '*.xml'` for xml in $XML do -- 1.5.6.3 -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH]: file backed usb massstorage #3
Hi, attached is version three of the file backed usb massstorage patch. * handle type != DISK case * on OOM use VIR_ERR_NO_MEMORY instead of VIR_ERR_OPERAION_FAILED * RelaxNG schema update * testcase The patches are ment to be applied on top of the hostdev patches. Cheers, -- Guido From 123763836d1fe71e6180c36a75690ceec0174f8c Mon Sep 17 00:00:00 2001 From: Guido Guenther [EMAIL PROTECTED] Date: Sun, 3 Aug 2008 01:07:00 +0200 Subject: [PATCH] usbmass: use files as USB disks works in Qemu/KVM --- src/domain_conf.c |3 ++- src/domain_conf.h |1 + src/qemu_conf.c | 35 ++- src/qemu_driver.c | 41 + 4 files changed, 78 insertions(+), 2 deletions(-) diff --git a/src/domain_conf.c b/src/domain_conf.c index 922cf76..237579f 100644 --- a/src/domain_conf.c +++ b/src/domain_conf.c @@ -84,7 +84,8 @@ VIR_ENUM_IMPL(virDomainDiskBus, VIR_DOMAIN_DISK_BUS_LAST, fdc, scsi, virtio, - xen) + xen, + usb) VIR_ENUM_IMPL(virDomainFS, VIR_DOMAIN_FS_TYPE_LAST, mount, diff --git a/src/domain_conf.h b/src/domain_conf.h index 8a9d1db..9e7c524 100644 --- a/src/domain_conf.h +++ b/src/domain_conf.h @@ -72,6 +72,7 @@ enum virDomainDiskBus { VIR_DOMAIN_DISK_BUS_SCSI, VIR_DOMAIN_DISK_BUS_VIRTIO, VIR_DOMAIN_DISK_BUS_XEN, +VIR_DOMAIN_DISK_BUS_USB, VIR_DOMAIN_DISK_BUS_LAST }; diff --git a/src/qemu_conf.c b/src/qemu_conf.c index 46bb9f4..f810b28 100644 --- a/src/qemu_conf.c +++ b/src/qemu_conf.c @@ -55,7 +55,8 @@ VIR_ENUM_IMPL(virDomainDiskQEMUBus, VIR_DOMAIN_DISK_BUS_LAST, floppy, scsi, virtio, - xen) + xen, + usb) #define qemudLog(level, msg...) fprintf(stderr, msg) @@ -772,6 +773,14 @@ int qemudBuildCommandLine(virConnectPtr conn, goto no_memory; \ } while (0) +#define ADD_USBDISK(thisarg)\ +do {\ +ADD_ARG_LIT(-usbdevice); \ +ADD_ARG_SPACE; \ +if ((asprintf(qargv[qargc++], disk:%s, thisarg)) == -1) \ +goto no_memory; \ +} while (0) + snprintf(memory, sizeof(memory), %lu, vm-def-memory/1024); snprintf(vcpus, sizeof(vcpus), %lu, vm-def-vcpus); @@ -883,6 +892,18 @@ int qemudBuildCommandLine(virConnectPtr conn, int idx = virDiskNameToIndex(disk-dst); const char *bus = virDomainDiskQEMUBusTypeToString(disk-bus); +if (disk-bus == VIR_DOMAIN_DISK_BUS_USB) { +if (disk-device == VIR_DOMAIN_DISK_DEVICE_DISK) { +ADD_USBDISK(disk-src); +} else { +qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, + _(unsupported usb disk type for '%s'), disk-src); +goto error; +} +disk = disk-next; +continue; +} + if (idx 0) { qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, _(unsupported disk type '%s'), disk-dst); @@ -922,6 +943,18 @@ int qemudBuildCommandLine(virConnectPtr conn, char dev[NAME_MAX]; char file[PATH_MAX]; +if (disk-bus == VIR_DOMAIN_DISK_BUS_USB) { +if (disk-device == VIR_DOMAIN_DISK_DEVICE_DISK) { +ADD_USBDISK(disk-src); +} else { +qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, + _(unsupported usb disk type for '%s'), disk-src); +goto error; +} +disk = disk-next; +continue; +} + if (STREQ(disk-dst, hdc) disk-device == VIR_DOMAIN_DISK_DEVICE_CDROM) { if (disk-src) { diff --git a/src/qemu_driver.c b/src/qemu_driver.c index ef4e158..118d423 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -2978,6 +2978,43 @@ static int qemudDomainAttachCdromDevice(virDomainPtr dom, return 0; } +static int qemudDomainAttachUsbMassstorageDevice(virDomainPtr dom, virDomainDeviceDefPtr dev) +{ +struct qemud_driver *driver = (struct qemud_driver *)dom-conn-privateData; +virDomainObjPtr vm = virDomainFindByUUID(driver-domains, dom-uuid); +int ret; +char *cmd, *reply; + +ret = asprintf(cmd, usb_add disk:%s, dev-data.disk-src); + +if (ret == -1) { +qemudReportError(dom-conn, NULL, NULL, VIR_ERR_NO_MEMORY, NULL); +return ret; +} + +if (qemudMonitorCommand(driver,
Re: [libvirt] [PATCH] fix xmlint in separate build dir
On Thu, Aug 07, 2008 at 06:30:56PM +0200, Guido Günther wrote: Hi, attached patch lets the domainschema check work when building in $build instead of $src. Otherwise it won't find the xml files to validate. Sounds fine, applied and commited, thanks ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] fix MinGW compilation(200808)
Hi, Dan mkstemp is solved by Jim. But WEXITSTATUS problem is not solved yet. Since sys/wait.h does not exist on MinGW. http://www.mingw.org/MinGWiki/index.php/PortingChildren Thanks Atsushi SAKAI Daniel P. Berrange [EMAIL PROTECTED] wrote: On Thu, Aug 07, 2008 at 05:56:48PM +0900, Atsushi SAKAI wrote: Hi, Jim Your patch works fine. It passes inet_pton problem. Please apply it. By the way, virsh compilation error. Is threre any good suggestion? = virsh-virsh.o: In function `editWriteToTempFile': C:/msys/1.0/home/Administrator/work/libvirt/src/virsh.c:5080: undefined reference to `mkstemp' Look like there is a gnulib module for that - Jim could say if its license compatible virsh-virsh.o: In function `editFile': C:/msys/1.0/home/Administrator/work/libvirt/src/virsh.c:5155: undefined reference to `WEXITSTATUS' virsh.c seems to be missing '#include sys/wait.h' Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] Question SSH support and libirt on Windows
Hi, Rich I have a question about SSH support of libvirt on Windows. Is there any reason for not supporting SSH. It is just because it lacks manpower? Thanks Atsushi SAKAI -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list