[libvirt] [PATCH] Fix a typo in virDiskHasValidPciAddr()
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/conf/domain_conf.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 09368d9..d494e54 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -125,7 +125,7 @@ struct _virDomainDiskDef {
static inline int
virDiskHasValidPciAddr(virDomainDiskDefPtr def)
{
- return def->pci_addr.domain || def->pci_addr.domain || def->pci_addr.slot;
+ return def->pci_addr.domain || def->pci_addr.bus || def->pci_addr.slot;
}
--
1.6.5.rc1
15 years, 2 months
[libvirt] "Unable to read QEMU help output: Interrupted system call" doing virDomainRestore() on current master
by Charles Duffy
Howdy. I've had this issue since yesterday, but avoided reporting it
until determining today that it occurs on an unmodified upstream tree as
well as my own local branch:
$ virsh restore ramsave
error: Failed to restore domain from ramsave
error: Unable to read QEMU help output: Interrupted system call
This happens immediately (no delay) and only on restore; "virsh start"
behaves as usual.
When running libvirtd under gdb, the failure mode is different:
$ virsh restore ramsave
error: Failed to restore domain from ramsave
error: internal error Timed out while reading monitor startup output
When running libvirtd under strace, this shows the binary being run
(["/usr/bin/qemu-kvm", "-help"]) failing with a SIGPIPE while attempting
to write to stdout. strace also shows a SIGSEGV being delivered to a
libvirtd thread (a few clone()s removed from the parent) after that
thread attempts to close all its open file descriptors above 0-2, but
without being able to run gdb I'm at a bit of a loss as to what that
thread is doing.
Any suggestions?
15 years, 2 months
[libvirt] [PATCH 0/5] Python fixes
by Cole Robinson
The following series fixes some functional (and cosmetic) issues with
the python bindings.
Thanks,
Cole
Cole Robinson (5):
python: Don't generate conflicting conn.createXML functions.
python: Add a newline between virConnect and virNode for readability.
python: Don't generate bindings for vir*Ref
python: Use a pure python implementation of 'vir*GetConnect'
python: Fix generated virInterface method names
python/generator.py | 40 +++++++++++++++++++++++++++++++++++++---
python/virConnect.py | 1 +
2 files changed, 38 insertions(+), 3 deletions(-)
15 years, 2 months
[libvirt] building libvirtd fails on libxml-2
by Dan Bar Dov
I'm running on Centos5.3
Building using:
./autogen.sh --prefix=/usr
configure fails with
checking libxml2 xml2-config >= 2.6.0 ... configure: error: Could not find
libxml2 anywhere (see config.log for details).
but rpm -qa | grep libxml2
libxml2-python-2.6.26-2.1.2.7
libxml2-2.6.26-2.1.2.7
libxml2-2.6.26-2.1.2.7
So what's the problem, or better yet, how to fix it?
Thanks,
Dan
15 years, 2 months
[libvirt] RFC: Rename / move / delete files in GIT
by Daniel P. Berrange
With the 0.7.1 relesae out of the way I'd like to suggest that we take
this time to move around some files in GIT to correct some long standing
wierd/bad naming decisions :-)
The qemud/ directory is better named 'daemon', and some of the things
in there should really have been in the src/ directory. So...
* qemud/ -> daemon/
* qemud/qemud.{h,c} daemon/main.{h,c}
* qemud/default-network.xml -> src/network/default.xml
* qemud/libvirtd_qemu.aug src/qemu/qemu.aug
* qemud/test_libvirtd_qemu.aug src/qemu/test_qemu.aug
* qemud/remote_protocol.x -> src/remote/remote_protocol.x
In the src/ directory we should move the rest of the drivers into their
own sub-directories. Basically want one sub directory for each of the
'mod_LTLIBRARIES' declared in the src/Makefile.am. This will ensure we
keep separate build dependancies, not accidentally including files that
we shouldn't.
* src/qemu_*.{c,h} -> src/qemu/
* src/xen_unified.{c,h} -> src/xen/xen_driver.{c,h}
* src/xend_*, src/xm_* src/xen_* -> src/xen/
* src/test.{c,h} -> src/test/test_driver.{c,h}
* src/storage*.{c,h} -> src/storage/
* src/security*.{c,h} -> src/security/
* src/remote_internal.{c,h} -> src/remote/remote_driver.{c,h}
* src/interface_driver.c -> src/interface/netcf_driver.c
* src/network_driver.c -> src/network/network_driver.c
* src/lxc_* -> src/lxc/
* src/openvz_* -> src/openvz/
* src/node_device* -> src/nodedev/
That would just leave all the shared source files in src/. We could
leave them there, or create a src/util/ directory for that stuff.
Move virsh into the tools directory
* src/virsh.c -> tools/virsh.c
* docs/virsh.pod -> tools/virsh.pod
* virsh.1: delete from GIT
Sanitise naming in python/ directory, to make it clear which are the
manually overriden methods.
* python/libvir.c -> python/override-api.c
* python/libvir.py -> python/override-api.py
* python/libvirt-python-api.xml python/override-api.xml
* python/libvirt_wrap.h -> python/types.h
* python/virConnect.py -> python/override-virConnect.py
Cleanup the docs/ directory
* docs/*.html.in -> docs/website/
* docs/*.html: delete from GIT
* docs/devhelp: delete from GIT
* docs/html: delete from GIT
* docs/libvirt-{api,refs}.xml: delete from GIT
* docs/examples/ -> examples/
* docs/test*xml -> examples/xml/test/
* docs/storage -> examples/xml/storage/
Remove include/libvirt/libvirt.h from GIT
For there places where I list 'delete from GIT', we would ensure that
when you run 'make dist' the files are still included in the tar.gz
NB, we would also update the cron job that deploys the website on
libvirt.org soo that it runs 'make' in the docs/website directory
to generate the .html files.
Regards,
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 :|
15 years, 2 months
[libvirt] [PATCH] Allow control over QEMU audio backend
by Daniel P. Berrange
When using VNC for graphics + keyboard + mouse, we shouldn't
then use the host OS for audio. Audio should go back over
VNC.
When using SDL for graphics, we should use the host OS for
audio since that's where the display is. We need to allow
certain QEMU env variables to be passed through to guest
too to allow choice of QEMU audio backend.
* qemud/libvirtd.sysconf: Mention QEMU/SDL audio env vars
* src/qemu_conf.c: Passthrough QEMU/SDL audio env for SDL display,
disable host audio for VNC display
---
daemon/libvirtd.sysconf | 8 ++++++++
src/qemu/qemu_conf.c | 14 ++++++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/daemon/libvirtd.sysconf b/daemon/libvirtd.sysconf
index fe4596a..28080a0 100644
--- a/daemon/libvirtd.sysconf
+++ b/daemon/libvirtd.sysconf
@@ -7,3 +7,11 @@
# Override Kerberos service keytab for SASL/GSSAPI
#KRB5_KTNAME=/etc/libvirt/krb5.tab
+
+# Override the QEMU/SDL default audio driver probing when
+# starting virtual machines using SDL graphics
+#
+# NB these have no effect for VMs using VNC
+#QEMU_AUDIO_DRV=sdl
+#
+#SDL_AUDIODRIVER=pulse
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 273aeca..74ca52b 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -2109,6 +2109,13 @@ int qemudBuildCommandLine(virConnectPtr conn,
ADD_ARG_LIT("-k");
ADD_ARG_LIT(def->graphics[0]->data.vnc.keymap);
}
+
+ /* QEMU implements a VNC extension for providing audio, so we
+ * set the audio backend to none, to prevent it opening the
+ * host OS audio devices since that causes security issues
+ * and is non-sensical when using VNC.
+ */
+ ADD_ENV_LIT("QEMU_AUDIO_DRV=none");
} else if ((def->ngraphics == 1) &&
def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_SDL) {
char *xauth = NULL;
@@ -2131,6 +2138,13 @@ int qemudBuildCommandLine(virConnectPtr conn,
ADD_ENV(display);
if (def->graphics[0]->data.sdl.fullscreen)
ADD_ARG_LIT("-full-screen");
+
+ /* If using SDL for video, then we should just let it
+ * use QEMU's host audio drivers, possibly SDL too
+ * User can set these two before starting libvirtd
+ */
+ ADD_ENV_COPY("QEMU_AUDIO_DRV");
+ ADD_ENV_COPY("SDL_AUDIODRIVER");
}
if (def->nvideos) {
--
1.6.2.5
15 years, 2 months
[libvirt] ESX [01/12]: Add esxNodeGetFreeMemory()
by Matthias Bolte
* src/esx/esx_driver.c: add esxNodeGetFreeMemory(), cache IP address
* src/esx/esx_vi.[ch]: refactor resource pool query into esxVI_GetResourcePool()
* src/esx/esx_vi_types.[ch]: bind VI type ResourcePoolResourceUsage
15 years, 2 months
[libvirt] [PATCH] Fix up "make check"
by Chris Lalancette
While running make check, I noticed that it was actually using
the virsh binary from my system, in /usr/bin/virsh, and not the
one that was just compiled. This doesn't seem to be the intent,
so I changed all of the test scripts to point to the one built
in-tree, not the system one.
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
---
tests/cpuset | 6 +++---
tests/define-dev-segfault | 4 ++--
tests/libvirtd-pool | 4 ++--
tests/read-bufsiz | 6 +++---
tests/read-non-seekable | 6 +++---
tests/start | 4 ++--
tests/test_conf.sh | 2 +-
tests/undefine | 8 ++++----
tests/vcpupin | 6 +++---
tests/virsh-all | 6 +++---
tests/virsh-synopsis | 6 +++---
11 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/tests/cpuset b/tests/cpuset
index eeb0ee2..a3abe14 100755
--- a/tests/cpuset
+++ b/tests/cpuset
@@ -18,7 +18,7 @@
if test "$VERBOSE" = yes; then
set -x
- virsh --version
+ $abs_top_builddir/tools/virsh --version
fi
. $srcdir/test-lib.sh
@@ -26,7 +26,7 @@ fi
fail=0
# generate input
-virsh --connect test:///default dumpxml 1 > xml || fail=1
+$abs_top_builddir/tools/virsh --connect test:///default dumpxml 1 > xml || fail=1
# require the presence of the string we'll transform
grep '<vcpu>' xml > /dev/null || fail=1
@@ -34,7 +34,7 @@ grep '<vcpu>' xml > /dev/null || fail=1
sed "s/vcpu>/vcpu cpuset='aaa'>/" xml > xml-invalid || fail=1
# Require failure and a diagnostic.
-virsh --connect test:///default define xml-invalid > out 2>&1 && fail=1
+$abs_top_builddir/tools/virsh --connect test:///default define xml-invalid > out 2>&1 && fail=1
cat <<\EOF > exp || fail=1
error: Failed to define domain from xml-invalid
error: failed Xen syscall topology cpuset syntax error
diff --git a/tests/define-dev-segfault b/tests/define-dev-segfault
index 4ae286f..cce1c07 100755
--- a/tests/define-dev-segfault
+++ b/tests/define-dev-segfault
@@ -4,7 +4,7 @@
if test "$VERBOSE" = yes; then
set -x
- virsh --version
+ $abs_top_builddir/tools/virsh --version
fi
test -z "$srcdir" && srcdir=$(pwd)
@@ -62,7 +62,7 @@ cat <<\EOF > D.xml || fail=1
EOF
url=test:///default
-virsh --connect "$url" 'define D.xml; dumpxml D' > out 2>&1 || fail=1
+$abs_top_builddir/tools/virsh --connect "$url" 'define D.xml; dumpxml D' > out 2>&1 || fail=1
cat > exp <<EOF || fail=1
Domain D defined from D.xml
diff --git a/tests/libvirtd-pool b/tests/libvirtd-pool
index 59da5a6..96da111 100755
--- a/tests/libvirtd-pool
+++ b/tests/libvirtd-pool
@@ -3,7 +3,7 @@
if test "$VERBOSE" = yes; then
set -x
- virsh --version
+ $abs_top_builddir/tools/virsh --version
fi
test -z "$srcdir" && srcdir=$(pwd)
@@ -14,7 +14,7 @@ fail=0
pwd=$(pwd) || fail=1
-virsh --connect test:///default \
+$abs_top_builddir/tools/virsh --connect test:///default \
pool-define-as --print-xml \
P dir src-host /src/path /src/dev S /target-path \
1>out 2>&1
diff --git a/tests/read-bufsiz b/tests/read-bufsiz
index 7d53735..9652817 100755
--- a/tests/read-bufsiz
+++ b/tests/read-bufsiz
@@ -18,7 +18,7 @@
if test "$VERBOSE" = yes; then
set -x
- virsh --version
+ $abs_top_builddir/tools/virsh --version
fi
test -z "$srcdir" && srcdir=`pwd`
@@ -29,7 +29,7 @@ test -z "$abs_top_srcdir" && abs_top_srcdir=`pwd`/..
fail=0
# Output a valid definition, to be used as input.
-virsh -c test:///default dumpxml 1 > xml || fail=1
+$abs_top_builddir/tools/virsh -c test:///default dumpxml 1 > xml || fail=1
for i in before after; do
# The largest BUFSIZ I've seen is 128K. This is slightly larger.
@@ -38,7 +38,7 @@ for i in before after; do
# Append or prepend enough spaces to push the size over the limit:
( test $i = before && cat sp xml || cat xml sp ) > $in || fail=1
- virsh --connect test:///default define $in > out || fail=1
+ $abs_top_builddir/tools/virsh --connect test:///default define $in > out || fail=1
printf "Domain test defined from $in\n\n" > exp || fail=1
compare exp out || fail=1
done
diff --git a/tests/read-non-seekable b/tests/read-non-seekable
index 8a7bdcd..648def6 100755
--- a/tests/read-non-seekable
+++ b/tests/read-non-seekable
@@ -18,7 +18,7 @@
if test "$VERBOSE" = yes; then
set -x
- virsh --version
+ $abs_top_builddir/tools/virsh --version
fi
. $srcdir/test-lib.sh
@@ -40,11 +40,11 @@ cat <<\EOF > dom
</domain>
EOF
-virsh -c test:///default define dom > /dev/null || fail=1
+$abs_top_builddir/tools/virsh -c test:///default define dom > /dev/null || fail=1
mkfifo_or_skip_ fifo
cat dom > fifo &
-virsh -c test:///default define fifo > /dev/null || fail=1
+$abs_top_builddir/tools/virsh -c test:///default define fifo > /dev/null || fail=1
(exit $fail); exit $fail
diff --git a/tests/start b/tests/start
index f457d59..6f7815a 100755
--- a/tests/start
+++ b/tests/start
@@ -18,7 +18,7 @@
if test "$VERBOSE" = yes; then
set -x
- virsh --version
+ $abs_top_builddir/tools/virsh --version
fi
test -z "$srcdir" && srcdir=$(pwd)
@@ -30,7 +30,7 @@ fail=0
test_url=test:///default
# expect this to fail
-virsh -c $test_url start test > out 2> err && fail=1
+$abs_top_builddir/tools/virsh -c $test_url start test > out 2> err && fail=1
# stdout gets a newline
echo > exp || fail=1
diff --git a/tests/test_conf.sh b/tests/test_conf.sh
index 62c2324..2754765 100755
--- a/tests/test_conf.sh
+++ b/tests/test_conf.sh
@@ -2,7 +2,7 @@
if test "$VERBOSE" = yes; then
set -x
- virsh --version
+ $abs_top_builddir/tools/virsh --version
fi
. $srcdir/test-lib.sh
diff --git a/tests/undefine b/tests/undefine
index fafdae7..048a98b 100755
--- a/tests/undefine
+++ b/tests/undefine
@@ -18,7 +18,7 @@
if test "$VERBOSE" = yes; then
set -x
- virsh --version
+ $abs_top_builddir/tools/virsh --version
fi
. $srcdir/test-lib.sh
@@ -26,7 +26,7 @@ fi
fail=0
# Attempt to undefine a running domain, by domain name.
-virsh -q -c test:///default undefine test > out 2>&1
+$abs_top_builddir/tools/virsh -q -c test:///default undefine test > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
error: Failed to undefine domain test
@@ -35,7 +35,7 @@ EOF
compare exp out || fail=1
# A different diagnostic when specifying a domain ID
-virsh -q -c test:///default undefine 1 > out 2>&1
+$abs_top_builddir/tools/virsh -q -c test:///default undefine 1 > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
error: a running domain like 1 cannot be undefined;
@@ -44,7 +44,7 @@ EOF
compare exp out || fail=1
# Succeed, now: first shut down, then undefine, both via name.
-virsh -q -c test:///default 'shutdown test; undefine test' > out 2>&1
+$abs_top_builddir/tools/virsh -q -c test:///default 'shutdown test; undefine test' > out 2>&1
test $? = 0 || fail=1
cat <<\EOF > exp || fail=1
Domain test is being shutdown
diff --git a/tests/vcpupin b/tests/vcpupin
index 79b02dc..c243d80 100755
--- a/tests/vcpupin
+++ b/tests/vcpupin
@@ -18,7 +18,7 @@
if test "$VERBOSE" = yes; then
set -x
- virsh --version
+ $abs_top_builddir/tools/virsh --version
fi
. $srcdir/test-lib.sh
@@ -26,7 +26,7 @@ fi
fail=0
# Invalid syntax.
-virsh --connect test:///default vcpupin test a 0,1 > out 2>&1
+$abs_top_builddir/tools/virsh --connect test:///default vcpupin test a 0,1 > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
error: vcpupin: Invalid or missing vCPU number.
@@ -35,7 +35,7 @@ EOF
compare exp out || fail=1
# An out-of-range vCPU number deserves a diagnostic, too.
-virsh --connect test:///default vcpupin test 100 0,1 > out 2>&1
+$abs_top_builddir/tools/virsh --connect test:///default vcpupin test 100 0,1 > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
error: vcpupin: Invalid vCPU number.
diff --git a/tests/virsh-all b/tests/virsh-all
index 03ea466..6accf44 100755
--- a/tests/virsh-all
+++ b/tests/virsh-all
@@ -18,7 +18,7 @@
if test "$VERBOSE" = yes; then
set -x
- virsh --version
+ $abs_top_builddir/tools/virsh --version
fi
test -z "$srcdir" && srcdir=$(pwd)
@@ -29,14 +29,14 @@ fail=0
test_url=test:///default
-virsh -c $test_url help > cmds || framework_failure
+$abs_top_builddir/tools/virsh -c $test_url help > cmds || framework_failure
cmds=$(sed -n 's/^ \([^ ][^ ]*\) .*/\1/p' cmds) || framework_failure
test -n "$cmds" || framework_failure
for i in $cmds; do
echo testing $i... 1>&2
# For now, just run the command and ignore output and exit status.
- virsh -c $test_url $i < /dev/null > /dev/null 2>&1
+ $abs_top_builddir/tools/virsh -c $test_url $i < /dev/null > /dev/null 2>&1
done
(exit $fail); exit $fail
diff --git a/tests/virsh-synopsis b/tests/virsh-synopsis
index 24038dd..e700993 100755
--- a/tests/virsh-synopsis
+++ b/tests/virsh-synopsis
@@ -18,7 +18,7 @@
if test "$VERBOSE" = yes; then
set -x
- virsh --version
+ $abs_top_builddir/tools/virsh --version
fi
test -z "$srcdir" && srcdir=$(pwd)
@@ -28,12 +28,12 @@ fail=0
test_url=test:///default
-virsh -c $test_url help > cmds || framework_failure
+$abs_top_builddir/tools/virsh -c $test_url help > cmds || framework_failure
cmds=$(sed -n 's/^ \([^ ][^ ]*\) .*/\1/p' cmds) || framework_failure
test -n "$cmds" || framework_failure
for i in $cmds; do
- virsh -c $test_url help $i > help || fail=1
+ $abs_top_builddir/tools/virsh -c $test_url help $i > help || fail=1
grep -A1 '^ SYNOPSIS$' help > synopsis \
|| { echo 1>&2 missing or invalid help SYNOPSIS for $i; fail=1; }
sed -n 2p synopsis > s2 || framework_failure
--
1.6.0.6
15 years, 2 months
[libvirt] virsh capabilities, kvm with apic and toggle
by Garry Dolley
When I run 'virsh capabilities' on a libvirt 0.6.4 system with qemu
0.10 and kvm-84, one of the results I get is:
<guest>
<os_type>hvm</os_type>
<arch name='x86_64'>
<wordsize>64</wordsize>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<machine>pc</machine>
<machine>isapc</machine>
<domain type='qemu'>
</domain>
<domain type='kvm'>
<emulator>/usr/bin/kvm</emulator>
</domain>
</arch>
<features>
<acpi default='on' toggle='yes'/>
<apic default='on' toggle='no'/>
</features>
</guest>
I'm wondering why the "apic" feature can't be toggled. Passing
-no-kvm-irqchip to kvm would turn off "PIC/IOAPIC/LAPIC"
--
Garry Dolley
ARP Networks, Inc. | http://www.arpnetworks.com | (818) 206-0181
Data center, VPS, and IP Transit solutions
Member Los Angeles County REACT, Unit 336 | WQGK336
Blog http://scie.nti.st
15 years, 2 months