[libvirt] How to connect to the running VM
by bala suru
Hi,
I have deployed some VM on to the KVM-qemu and installed libvirtd ..
I could see the VM running by command virsh list .
but how to login to the VMs other than SSH ..? i tried virsh vncdisplay ,
but no output ..
regards
bala
13 years, 5 months
Re: [libvirt] How to connect to the running VM
by Zdenek Styblik
On 07/29/11 17:32, bala suru wrote:
> Hi,
> Thanks for the information i'll try this ..
>
> How to create a kvm image from machine which already has the kvm setup
> and virt-manager ..?
>
> So far I was using the images created for KVM for the VM .. now I want to
> create a kvm image my self from iso image ...
>
>
> regards
> Bala
You're welcome.
As for images, use % virsh; and 'vol-create-as', or % qemu-img; command.
% virsh -c qemu:///system ; and ' virsh # help vol-create-as ;' for
details about this command.
There is also % qemu-img;, however do not do things behind libvirt's
back or it will backfire on you.
I highly recommend to use either some cli tool/scripts eg. for VM
definition or virt-manager or some other GUI tool. It makes your life
easier and things go faster(and sometimes smoother).
http://www.linux-kvm.org/page/Management_Tools
Regards,
Z.
> On Fri, Jul 29, 2011 at 7:06 AM, Zdenek Styblik <stybla(a)turnovfree.net>wrote:
>
>> On 07/29/11 13:36, bala suru wrote:
>>> Hi,
>>> I have deployed some VM on to the KVM-qemu and installed libvirtd ..
>>>
>>> I could see the VM running by command virsh list .
>>>
>>> but how to login to the VMs other than SSH ..? i tried virsh vncdisplay ,
>>> but no output ..
>>>
>>> regards
>>> bala
>>>
>>>
>>>
>>>
>>> --
>>> libvir-list mailing list
>>> libvir-list(a)redhat.com
>>> https://www.redhat.com/mailman/listinfo/libvir-list
>>
>> Hello,
>>
>> if VM is running at localhost eg. your workstation, I do:
>>
>> % netstat -nlp;
>>
>> look for '127.0.0.1:590x' as libvirt assigns VNC ports automatically and
>> in incremental order. (Note: this, however, is not a rule. And you can
>> assign whatever port you want by hand.)
>>
>> ~~~ SNIP ~~~
>> tcp 0 0 localhost:5901 *:*
>> LISTEN -
>> ~~~ SNIP ~~~
>>
>> Then I just use VNC client like % vncviewer localhost:5901; to connect
>> to VM.
>>
>> Have you tried to hit a key or move the mouse? Console/screen might be
>> in suspend mode in order to "save" power.
>>
>> Also, there might be few catches which depend on your setup.
>> 1] are you sure VM has VNC console assigned? Use % virsh; and 'dumpxml
>> <domain>' command to check out.
>>
>> ~~~ SNIP ~~~
>> <graphics type='vnc' port='5901' autoport='yes'/>
>> ~~~ SNIP ~~~
>>
>> 2] it might be password protected, TLS might be required etc. etc.
>>
>> If it's at remote host, I recommend to use SSH to tunnel VNC port. You
>> can find how-to at internet.
>> You can also use 'virt-manager' which is included as package in many
>> distributions. Well, at least in Fedora, Debian and, I believe, Ubuntu.
>>
>> I hope lines above help you a bit.
>>
>> Regards,
>> Zdenek
>>
>> --
>> Zdenek Styblik
>> email: stybla(a)turnovfree.net
>> jabber: stybla(a)jabber.turnovfree.net
>>
>
--
Zdenek Styblik
email: stybla(a)turnovfree.net
jabber: stybla(a)jabber.turnovfree.net
13 years, 5 months
[libvirt] [PATCH] tests: Don't use bash if we don't have to
by Matthias Bolte
This tested failed on FreeBSD because it was using bash, that might
not be installed.
---
tests/int-overflow | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/int-overflow b/tests/int-overflow
index baf2eef..36e5536 100755
--- a/tests/int-overflow
+++ b/tests/int-overflow
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Ensure that an invalid domain ID isn't interpreted as a valid one.
# Before, an ID of 2^32+2 would be treated just like an ID of 2.
--
1.7.4.1
13 years, 5 months
[libvirt] [PATCH] utils: More useful error message for hook script failure
by Osier Yang
Commit 3709a386 ported hooks codes to new command execution API,
together with the useful error message removed. Though we can't
get "errbuf" from the new command execution API anymore, still
we can give a more useful error.
https://bugzilla.redhat.com/show_bug.cgi?id=726398
---
src/util/hooks.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/util/hooks.c b/src/util/hooks.c
index 64adfcb..00f3a01 100644
--- a/src/util/hooks.c
+++ b/src/util/hooks.c
@@ -193,6 +193,7 @@ int
virHookCall(int driver, const char *id, int op, int sub_op, const char *extra,
const char *input) {
int ret;
+ int exitstatus;
char *path;
virCommandPtr cmd;
const char *drvstr;
@@ -257,7 +258,13 @@ virHookCall(int driver, const char *id, int op, int sub_op, const char *extra,
if (input)
virCommandSetInputBuffer(cmd, input);
- ret = virCommandRun(cmd, NULL);
+ ret = virCommandRun(cmd, &exitstatus);
+ if (exitstatus != 0) {
+ virHookReportError(VIR_ERR_HOOK_SCRIPT_FAILED,
+ _("Hook script %s %s failed with error code %d"),
+ path, drvstr, exitstatus);
+ ret = -1;
+ }
virCommandFree(cmd);
--
1.7.6
13 years, 5 months
[libvirt] [PATCHv2 1/2] maint: add missing copyright notices
by Eric Blake
I went with the shorter license notice used by src/libvirt.c,
rather than spelling out the full LGPLv2+ clause into each of
these files.
* configure.ac: Declare copyright.
* all Makefile.am: Likewise.
---
Noticed while reviewing Matthias' patch. Almost trivial enough
to push in isolation, but I'll wait for the review.
Makefile.am | 3 +++
configure.ac | 3 +++
daemon/Makefile.am | 3 +++
docs/Makefile.am | 4 ++++
docs/schemas/Makefile.am | 3 ++-
examples/apparmor/Makefile.am | 3 +++
examples/domain-events/events-c/Makefile.am | 3 +++
examples/dominfo/Makefile.am | 2 ++
examples/domsuspend/Makefile.am | 2 ++
examples/hellolibvirt/Makefile.am | 3 +++
examples/openauth/Makefile.am | 3 +++
examples/python/Makefile.am | 3 +++
examples/systemtap/Makefile.am | 2 ++
examples/xml/nwfilter/Makefile.am | 2 ++
include/Makefile.am | 4 ++++
include/libvirt/Makefile.am | 3 +++
python/Makefile.am | 3 +++
python/tests/Makefile.am | 3 +++
src/Makefile.am | 3 +++
tests/Makefile.am | 3 +++
tools/Makefile.am | 2 ++
21 files changed, 59 insertions(+), 1 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 49e42bf..75cff8d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,8 @@
## Process this file with automake to produce Makefile.in
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
LCOV = lcov
GENHTML = genhtml
diff --git a/configure.ac b/configure.ac
index ac34efc..36037e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,8 @@
dnl Process this file with autoconf to produce a configure script.
+dnl Copyright (C) 2005-2011 Red Hat, Inc.
+dnl See COPYING.LIB for the License of this software
+
AC_INIT([libvirt], [0.9.3], [libvir-list(a)redhat.com], [], [http://libvirt.org])
AC_CONFIG_SRCDIR([src/libvirt.c])
AC_CONFIG_AUX_DIR([build-aux])
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 63c731e..65ac8e9 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -1,5 +1,8 @@
## Process this file with automake to produce Makefile.in
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
CLEANFILES =
DAEMON_GENERATED = \
diff --git a/docs/Makefile.am b/docs/Makefile.am
index de649fe..50a199f 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,4 +1,8 @@
## Process this file with automake to produce Makefile.in
+
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
SUBDIRS= schemas
PERL = perl
diff --git a/docs/schemas/Makefile.am b/docs/schemas/Makefile.am
index 75a0e73..596c207 100644
--- a/docs/schemas/Makefile.am
+++ b/docs/schemas/Makefile.am
@@ -1,4 +1,5 @@
-
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
schemadir = $(pkgdatadir)/schemas
schema_DATA = \
diff --git a/examples/apparmor/Makefile.am b/examples/apparmor/Makefile.am
index b72bbe1..0bc66ac 100644
--- a/examples/apparmor/Makefile.am
+++ b/examples/apparmor/Makefile.am
@@ -1,3 +1,6 @@
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
EXTRA_DIST= \
TEMPLATE \
libvirt-qemu \
diff --git a/examples/domain-events/events-c/Makefile.am b/examples/domain-events/events-c/Makefile.am
index 176892b..2bcbca0 100644
--- a/examples/domain-events/events-c/Makefile.am
+++ b/examples/domain-events/events-c/Makefile.am
@@ -1,3 +1,6 @@
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib
noinst_PROGRAMS = event-test
diff --git a/examples/dominfo/Makefile.am b/examples/dominfo/Makefile.am
index 678de68..07982b0 100644
--- a/examples/dominfo/Makefile.am
+++ b/examples/dominfo/Makefile.am
@@ -1,3 +1,5 @@
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include
LDADDS = $(STATIC_BINARIES) $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la \
diff --git a/examples/domsuspend/Makefile.am b/examples/domsuspend/Makefile.am
index 2c277a4..fc5e931 100644
--- a/examples/domsuspend/Makefile.am
+++ b/examples/domsuspend/Makefile.am
@@ -1,3 +1,5 @@
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include
LDADDS = $(STATIC_BINARIES) $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la \
diff --git a/examples/hellolibvirt/Makefile.am b/examples/hellolibvirt/Makefile.am
index 8d108a7..a55fe19 100644
--- a/examples/hellolibvirt/Makefile.am
+++ b/examples/hellolibvirt/Makefile.am
@@ -1,3 +1,6 @@
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
noinst_PROGRAMS = hellolibvirt
hellolibvirt_CFLAGS = $(WARN_CFLAGS)
diff --git a/examples/openauth/Makefile.am b/examples/openauth/Makefile.am
index 279a032..844b572 100644
--- a/examples/openauth/Makefile.am
+++ b/examples/openauth/Makefile.am
@@ -1,3 +1,6 @@
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
noinst_PROGRAMS = openauth
openauth_CFLAGS = $(WARN_CFLAGS)
diff --git a/examples/python/Makefile.am b/examples/python/Makefile.am
index dcd2c24..d782a28 100644
--- a/examples/python/Makefile.am
+++ b/examples/python/Makefile.am
@@ -1,3 +1,6 @@
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
EXTRA_DIST= \
README \
dominfo.py domrestore.py domsave.py domstart.py esxlist.py
diff --git a/examples/systemtap/Makefile.am b/examples/systemtap/Makefile.am
index 084081e..6eb0546 100644
--- a/examples/systemtap/Makefile.am
+++ b/examples/systemtap/Makefile.am
@@ -1,2 +1,4 @@
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
EXTRA_DIST = client.stp
diff --git a/examples/xml/nwfilter/Makefile.am b/examples/xml/nwfilter/Makefile.am
index 439e7b8..23fd753 100644
--- a/examples/xml/nwfilter/Makefile.am
+++ b/examples/xml/nwfilter/Makefile.am
@@ -1,3 +1,5 @@
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
FILTERS = \
allow-arp.xml \
diff --git a/include/Makefile.am b/include/Makefile.am
index d075971..426762c 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,2 +1,6 @@
## Process this file with automake to produce Makefile.in
+
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
SUBDIRS=libvirt
diff --git a/include/libvirt/Makefile.am b/include/libvirt/Makefile.am
index b2c2b76..8f36ae8 100644
--- a/include/libvirt/Makefile.am
+++ b/include/libvirt/Makefile.am
@@ -1,5 +1,8 @@
## Process this file with automake to produce Makefile.in
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
virincdir = $(includedir)/libvirt
virinc_HEADERS = libvirt.h \
diff --git a/python/Makefile.am b/python/Makefile.am
index 51f005d..0e14d23 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -1,5 +1,8 @@
# Makefile for libvirt python library
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
SUBDIRS= . tests
INCLUDES = \
diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
index 28e24ba..2a5bc62 100644
--- a/python/tests/Makefile.am
+++ b/python/tests/Makefile.am
@@ -1,3 +1,6 @@
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
EXAMPLE_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION)/examples
PYTESTS= \
diff --git a/src/Makefile.am b/src/Makefile.am
index 46b92a8..00307fa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,8 @@
## Process this file with automake to produce Makefile.in
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
# No libraries with the exception of LIBXML should be listed
# here. List them against the individual XXX_la_CFLAGS targets
# that actually use them
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 872aa22..1560ac1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,8 @@
## Process this file with automake to produce Makefile.in
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
+
SHELL = $(PREFERABLY_POSIX_SHELL)
INCLUDES = \
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 62c275e..66d4ed2 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,3 +1,5 @@
+## Copyright (C) 2005-2011 Red Hat, Inc.
+## See COPYING.LIB for the License of this software
POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)"
--
1.7.4.4
13 years, 5 months
[libvirt] ANNOUNCE: ruby-libvirt 0.4.0
by Chris Lalancette
All,
I'm pleased to announce the release of ruby-libvirt 0.4.0. ruby-libvirt
is a ruby wrapper around the libvirt API. Version 0.4.0 brings new APIs, more
documentation, and bugfixes:
* Updated Domain class, implementing dom.memory_parameters=,
dom.memory_parameters, dom.updated?, dom.migrate2, dom.migrate_to_uri2,
dom.migrate_set_max_speed, dom.qemu_monitor_command, dom.blkio_parameters,
dom.blkio_parameters=, dom.state, dom.open_console, dom.screenshot, and
dom.inject_nmi
* Implementation of the Stream class, which covers the libvirt virStream APIs
* Add the ability to build against non-system libvirt libraries
* Updated Error object, which now includes the libvirt code, component and
level of the error, as well as all of the error constants from libvirt.h
* Updated Connect class, implementing conn.sys_info, conn.stream,
conn.interface_change_begin, conn.interface_change_commit, and
conn.interface_change_rollback
* Updated StorageVol class, implementing vol.download and vol.upload
* Various bugfixes
Version 0.4.0 is available from http://libvirt.org/ruby:
Tarball: http://libvirt.org/ruby/download/ruby-libvirt-0.4.0.tgz
Gem: http://libvirt.org/ruby/download/ruby-libvirt-0.4.0.gem
It is also available from rubygems.org; to get the latest version, run:
$ gem install ruby-libvirt
As usual, if you run into questions, problems, or bugs, please feel free to
mail me (clalance(a)redhat.com) and/or the libvirt mailing list.
--
Chris Lalancette
13 years, 5 months
[libvirt] [PATCH] freebsd: Avoid /bin/true in commandtest
by Matthias Bolte
Rely on PATH and use just true, because on FreeBSD it's /usr/bin/true.
---
tests/commanddata/test16.log | 2 +-
tests/commandtest.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/commanddata/test16.log b/tests/commanddata/test16.log
index 2433a4d..7088165 100644
--- a/tests/commanddata/test16.log
+++ b/tests/commanddata/test16.log
@@ -1 +1 @@
-A=B /bin/true C
+A=B true C
diff --git a/tests/commandtest.c b/tests/commandtest.c
index 2e800ae..9ba53b8 100644
--- a/tests/commandtest.c
+++ b/tests/commandtest.c
@@ -566,9 +566,9 @@ cleanup:
*/
static int test16(const void *unused ATTRIBUTE_UNUSED)
{
- virCommandPtr cmd = virCommandNew("/bin/true");
+ virCommandPtr cmd = virCommandNew("true");
char *outactual = NULL;
- const char *outexpect = "A=B /bin/true C";
+ const char *outexpect = "A=B true C";
int ret = -1;
int fd = -1;
@@ -610,7 +610,7 @@ cleanup:
*/
static int test17(const void *unused ATTRIBUTE_UNUSED)
{
- virCommandPtr cmd = virCommandNew("/bin/true");
+ virCommandPtr cmd = virCommandNew("true");
int ret = -1;
char *outbuf;
char *errbuf;
--
1.7.4.1
13 years, 5 months
[libvirt] [PATCH] tests: Unify style of test skipping code
by Matthias Bolte
Prefer 'return EXIT_AM_SKIP' over 'exit(EXIT_AM_SKIP)'.
Prefer 'int main(void)' over 'int main(int argc, char **argv)'.
Fix mymain signature in commandtest and nodeinfotest.
---
tests/commandtest.c | 10 +++++-----
tests/nodeinfotest.c | 10 +++++-----
tests/qemuargv2xmltest.c | 6 +++++-
tests/qemuxml2xmltest.c | 6 +++++-
tests/virnettlscontexttest.c | 6 ++++--
tests/virshtest.c | 26 +++++++++++++++++---------
6 files changed, 41 insertions(+), 23 deletions(-)
diff --git a/tests/commandtest.c b/tests/commandtest.c
index ef2850d..2e800ae 100644
--- a/tests/commandtest.c
+++ b/tests/commandtest.c
@@ -38,10 +38,10 @@
#ifdef WIN32
-static int
-mymain(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+int
+main(void)
{
- exit (EXIT_AM_SKIP);
+ return EXIT_AM_SKIP;
}
#else
@@ -814,6 +814,6 @@ mymain(void)
return(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
-#endif /* !WIN32 */
-
VIRT_TEST_MAIN(mymain)
+
+#endif /* !WIN32 */
diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c
index 5abee92..448e072 100644
--- a/tests/nodeinfotest.c
+++ b/tests/nodeinfotest.c
@@ -15,10 +15,10 @@
defined(__amd64__) || \
defined(__i386__)))
-static int
-mymain(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+int
+main(void)
{
- exit (EXIT_AM_SKIP);
+ return EXIT_AM_SKIP;
}
#else
@@ -130,6 +130,6 @@ mymain(void)
return(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
-#endif /* __linux__ */
-
VIRT_TEST_MAIN(mymain)
+
+#endif /* __linux__ */
diff --git a/tests/qemuargv2xmltest.c b/tests/qemuargv2xmltest.c
index bade95d..c2b6cf2 100644
--- a/tests/qemuargv2xmltest.c
+++ b/tests/qemuargv2xmltest.c
@@ -239,6 +239,10 @@ VIRT_TEST_MAIN(mymain)
#else
-int main (void) { return (EXIT_AM_SKIP); }
+int
+main(void)
+{
+ return EXIT_AM_SKIP;
+}
#endif /* WITH_QEMU */
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index f1900c5..461fd0d 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -204,6 +204,10 @@ VIRT_TEST_MAIN(mymain)
#else
-int main (void) { exit (EXIT_AM_SKIP); }
+int
+main(void)
+{
+ return EXIT_AM_SKIP;
+}
#endif /* WITH_QEMU */
diff --git a/tests/virnettlscontexttest.c b/tests/virnettlscontexttest.c
index 12ecf1e..520b006 100644
--- a/tests/virnettlscontexttest.c
+++ b/tests/virnettlscontexttest.c
@@ -1249,9 +1249,11 @@ mymain(void)
VIRT_TEST_MAIN(mymain)
#else
+
int
-main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
+main(void)
{
- exit (EXIT_AM_SKIP);
+ return EXIT_AM_SKIP;
}
+
#endif
diff --git a/tests/virshtest.c b/tests/virshtest.c
index e22e582..de5138c 100644
--- a/tests/virshtest.c
+++ b/tests/virshtest.c
@@ -9,7 +9,17 @@
#include "util.h"
#include "testutils.h"
-#define DOM_UUID "ef861801-45b9-11cb-88e3-afbfe5370493"
+#ifdef WIN32
+
+int
+main(void)
+{
+ return EXIT_AM_SKIP;
+}
+
+#else
+
+# define DOM_UUID "ef861801-45b9-11cb-88e3-afbfe5370493"
static const char *dominfo_fc4 = "\
Id: 2\n\
@@ -71,13 +81,13 @@ cleanup:
return result;
}
-#define VIRSH_DEFAULT "../tools/virsh", \
+# define VIRSH_DEFAULT "../tools/virsh", \
"--connect", \
"test:///default"
static char *custom_uri;
-#define VIRSH_CUSTOM "../tools/virsh", \
+# define VIRSH_CUSTOM "../tools/virsh", \
"--connect", \
custom_uri
@@ -224,10 +234,6 @@ mymain(void)
{
int ret = 0;
-#ifdef WIN32
- exit (EXIT_AM_SKIP);
-#endif
-
if (virAsprintf(&custom_uri, "test://%s/../examples/xml/test/testnode.xml",
abs_srcdir) < 0)
return EXIT_FAILURE;
@@ -298,7 +304,7 @@ mymain(void)
/* It's a bit awkward listing result before argument, but that's a
* limitation of C99 vararg macros. */
-#define DO_TEST(i, result, ...) \
+# define DO_TEST(i, result, ...) \
do { \
const char *myargv[] = { VIRSH_DEFAULT, __VA_ARGS__, NULL }; \
const struct testInfo info = { myargv, result }; \
@@ -380,10 +386,12 @@ mymain(void)
DO_TEST(30, "--shell a\n",
"echo \t '-'\"-\" \t --shell \t a");
-#undef DO_TEST
+# undef DO_TEST
free(custom_uri);
return(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
VIRT_TEST_MAIN(mymain)
+
+#endif /* WIN32 */
--
1.7.4.1
13 years, 5 months
[libvirt] [PATCH 0/4] xen callback cleanups
by Eric Blake
Noticed because of the recent xen break in commit 1edf5cc5
(fixed in 934fdcb3), which broke because it touched too many
files, rather than focusing on just xen_driver.c.
Renaming all xen callback structs makes it easier to grep
for use of the callback structs, which in turn makes it easier
to see what still remains in the goal of getting rid of the
callback struct. And using C99 initialization syntax makes
it less likely that future patches will needlessly try to
patch too many files.
Eric Blake (4):
xen: cleanup callback struct
xen: reduce callback special cases
xen: make direct call when there is only one subdriver
xen: drop unused callbacks
src/xen/xen_driver.c | 186 ++++++++++++++++++----------------------------
src/xen/xen_driver.h | 63 ++++++----------
src/xen/xen_hypervisor.c | 52 ++++----------
src/xen/xen_inotify.c | 39 +----------
src/xen/xend_internal.c | 68 +++++++----------
src/xen/xend_internal.h | 6 ++
src/xen/xm_internal.c | 51 +++----------
src/xen/xs_internal.c | 45 ++----------
8 files changed, 167 insertions(+), 343 deletions(-)
--
1.7.4.4
13 years, 5 months
[libvirt] libvirt-0.9.3 and qemu-0.14.1
by Zdenek Styblik
Hello,
I'm not sure if this has been reported or fixed, but ...
~~~ SNIP ~~~
21:02:59.981: 13171: info : libvirt version: 0.9.3
21:02:59.981: 13171: error : virCommandWait:1957 : internal error Child
process (LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
HOME=/root USER=root LOGNAME=root /usr/bin/qemu-kvm -help) status
unexpected: exit status 1
21:02:59.986: 13171: error : virCommandWait:1957 : internal error Child
process (LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
HOME=/root USER=root LOGNAME=root /usr/bin/qemu-kvm -help) status
unexpected: exit status 1
21:02:59.988: 13171: error : virDomainDefParseXML:6069 : unknown OS type hvm
~~~ SNIP ~~~
qemu-0.14.1 and libvirt-0.9.3
What am I missing here?
Thanks,
Z.
--
Zdenek Styblik
email: stybla(a)turnovfree.net
jabber: stybla(a)jabber.turnovfree.net
13 years, 5 months