[libvirt] could no query memory balloon allocation
by Marc Haber
Hi,
I am playing around with libvirt and KVM on a Debian sid system (with
a self-built kernel 2.6.36, 64bit kernel and 32bit userland). I have
pulled libvirt 0.8.4 from experimental.
When I try staring a VM using virtu-manager, I get the error message
"Error starting domain: operation failed: could not query memory
balloon allocation". This is probably some weird timing issue - when I
have an strace attached to the libvirtd, everything is fine.
In the #kvm IRC channel, people have told me that there may be an
issue between some kernel versions and some libvirt versions, but
neither the list archives nor the git changelog of 0.8.5 indicate such
an issue (and #virt on oftc is quiet as usual).
Can anybody explain what is going on on my system and what I could do
to work around the issue?
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature | How to make an American Quilt | Fax: *49 3221 2323190
13 years, 11 months
[libvirt] [PATCH] Fix build with polkit 0
by Jim Fehlig
Commit e8066d53 broke the build with polkit0:
remote.c: In function 'remoteDispatchAuthPolkit':
remote.c:4177: error: 'rv' undeclared (first use in this function)
Add missing identifier.
---
daemon/remote.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/daemon/remote.c b/daemon/remote.c
index 886d53d..3cf3886 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -4152,6 +4152,7 @@ remoteDispatchAuthPolkit (struct qemud_server *server,
DBusError err;
const char *action;
char ident[100];
+ int rv;
memset(ident, 0, sizeof ident);
--
1.6.0.2
13 years, 11 months
[libvirt] how to attach PCI/USB device
by Zdenek Styblik
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello list and its users,
as subject suggests, I'm trying to attach PCI/USB devices to Guest(VM).
A-and, it doesn't work. But I swear I had it before(somewhat in the
beginnings).
I'm using virt-managers to add/attach devices. I've failed to attach PCI
device, but it "does not" matter right now. I can attach USB devices,
but they are not in VM. I've tried to attach USB HUB as well and what
not - nothing.
So, could somebody please tell me, how to debug it?
Could it be somehow connected with qemu-kvm running 'root-less'?
libvirt-0.8.4 and 0.8.5.
Thank you all and nice whatever-timezone-you-are-in,
Zdenek
- --
Zdenek Styblik
Net/Linux admin
OS TurnovFree.net
email: stybla(a)turnovfree.net
jabber: stybla(a)jabber.turnovfree.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkzPCuQACgkQ8MreUbSH7imBMACcCW+DQ4lwNmcPiM9kXNjbHIWD
o68An3RwjHN98zlQumJsCGbnG5Xie0WB
=4ZBd
-----END PGP SIGNATURE-----
13 years, 11 months
[libvirt] libvirtd: how to react on qemu watchdog events
by Hu Tao
Hi,
I'm currently seeking a way to monitor qemu watchdog events and do
somthing based on these events. Although there is a good example at
libvirt-source/examples/domain-events/events-c/event-test.c to start
with, and I did achieve my goal by little modification of the example,
but it ran as a libvirt client. How can I make libvirtd monitor the
events and react on them? Thanks a lot!
13 years, 11 months
[libvirt] [PATCH] Fix several warnings about a non-literal format string
by Jiri Denemark
They only popped up during --disable-nls build. Without this configure
option, gcc wasn't able to detect them.
---
I already pushed this since it's both trivial and build-breaking.
src/esx/esx_vmx.c | 2 +-
src/util/iptables.c | 2 +-
src/util/network.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c
index 0a26614..36818df 100644
--- a/src/esx/esx_vmx.c
+++ b/src/esx/esx_vmx.c
@@ -2611,7 +2611,7 @@ esxVMX_FormatConfig(esxVMX_Context *ctx, virCapsPtr caps, virDomainDefPtr def,
/* def:maxvcpus -> vmx:numvcpus */
if (def->vcpus != def->maxvcpus) {
- ESX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
+ ESX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("No support for domain XML entry 'vcpu' attribute "
"'current'"));
goto cleanup;
diff --git a/src/util/iptables.c b/src/util/iptables.c
index fc656b9..fe78d1c 100644
--- a/src/util/iptables.c
+++ b/src/util/iptables.c
@@ -334,7 +334,7 @@ static char *iptablesFormatNetwork(virSocketAddr *netaddr,
if (!VIR_SOCKET_IS_FAMILY(netaddr, AF_INET) ||
!VIR_SOCKET_IS_FAMILY(netmask, AF_INET)) {
- iptablesError(VIR_ERR_CONFIG_UNSUPPORTED,
+ iptablesError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Only IPv4 addresses can be used with iptables"));
return NULL;
}
diff --git a/src/util/network.c b/src/util/network.c
index 81ac228..1abe78b 100644
--- a/src/util/network.c
+++ b/src/util/network.c
@@ -80,7 +80,7 @@ virSocketParseAddr(const char *val, virSocketAddrPtr addr, int family) {
int err;
if (val == NULL) {
- virSocketError(VIR_ERR_INVALID_ARG, _("Missing address"));
+ virSocketError(VIR_ERR_INVALID_ARG, "%s", _("Missing address"));
return -1;
}
@@ -173,7 +173,7 @@ virSocketFormatAddrFull(virSocketAddrPtr addr,
int err;
if (addr == NULL) {
- virSocketError(VIR_ERR_INVALID_ARG, _("Missing address"));
+ virSocketError(VIR_ERR_INVALID_ARG, "%s", _("Missing address"));
return NULL;
}
--
1.7.3.2
13 years, 11 months
Re: [libvirt] SPAM-LOW: Re: Re: Node.GetInfo error
by arnaud.champion@devatom.fr
?:S I'm far away from a git expert :S
Maybe anyone on the list can help us ?
Arnaud
From: 黄亮
Sent: Monday, November 01, 2010 2:42 PM
To: arnaud.champion(a)devatom.fr
Subject: Re: Re: Re: SPAM-LOW: Re: Re: Node.GetInfo error
Hi Arnaud,
I tried GitExtension, but while applying patch, it returns "Patch format detection failed. "
Should I change some settings or is there something not right in the patch file?
Regards
2010-11-01
--------------------------------------------------------------------------------
Lancer
--------------------------------------------------------------------------------
发件人: arnaud.champion(a)devatom.fr
发送时间: 2010-11-01 16:55:51
收件人: 黄亮
抄送: libvir-list(a)redhat.com
主题: Re: Re: SPAM-LOW: Re: Re: Node.GetInfo error
Ok,
if you are under windows (like me), use GitExtension (http://sourceforge.net/projects/gitextensions/)
It works, not perfect, but it works.
Arnaud
From: 黄亮
Sent: Monday, November 01, 2010 9:52 AM
To: arnaud.champion(a)devatom.fr
Subject: Re: Re: SPAM-LOW: Re: Re: Node.GetInfo error
Hi Arnaud,
The NodeInfoStructure you sent to me yesterday works, thank you.
I saw your patch file, should I manually apply it to the source code or is there some tools I can use to automatically apply the changes?
Regards
2010-11-01
--------------------------------------------------------------------------------
Lancer
--------------------------------------------------------------------------------
发件人: arnaud.champion(a)devatom.fr
发送时间: 2010-11-01 16:37:17
收件人: 黄亮
抄送: libvir-list
主题: Re: SPAM-LOW: Re: Re: Node.GetInfo error
Hi,
I think the solution is in the last patches I have send (which are not yet in the git). Have you tried the NodeInfoStructure I have sended yesterday ?
Arnaud
From: 黄亮
Sent: Monday, November 01, 2010 3:01 AM
To: arnaud.champion(a)devatom.fr
Cc: libvir-list
Subject: SPAM-LOW: Re: Re: Node.GetInfo error
HI,
I tried
Errors.Error err = Errors.GetLastError();
MessageBox.Show(err.Message);
But IDE shows compilation errors that there is no "Error" defination in "Errors", and "Errors.GetLastError()" returns int.
I made a guess that maybe it was like this:
Error err = Errors.SaveLastError();
MessageBox.Show("Get Info error: " + err.Message);
It can be compiled but "err.Message" has nothing in it.
Did I make a wrong assumption?
Regards
2010-11-01
--------------------------------------------------------------------------------
Lancer
--------------------------------------------------------------------------------
发件人: arnaud.champion(a)devatom.fr
发送时间: 2010-10-31 16:48:15
收件人: 黄亮
抄送: libvir-list(a)redhat.com
主题: Re: Node.GetInfo error
Ok,
at first GetLastError return an Error object. So you should anything like :
Errors.Error err = Errors.GetLastError();
MessageBox.Show(err.Message);
For the NodeInfo structure, I think the problem is the same that was for DomainInfo, I'll check marshaling. Then respond you with the correct infos.
Arnaud
PS : can you also put libvirt-list(a)redhat.com in copy of your mails, to keep everyone in the loop ?
From: 黄亮
Sent: Sunday, October 31, 2010 8:20 AM
To: arnaud.champion
Subject: Node.GetInfo error
Hi,
Sorry for disturbing again. But I get error while using Node.GetInfo.
Code:
NodeInfo aNodeInfo = new NodeInfo();
if (Node.GetInfo(con, aNodeInfo) < 0)
{
//MessageBox.Show("Node Info Error");
MessageBox.Show(Errors.GetLastError().ToString());
return 0f;
}
I'm sure con != IntPtr.Zero. I tried to use Errors.GetLastError(), it returns int. But I don't know what to do with it.
So, any suggestions ? Thanks
Regards
2010-10-31
--------------------------------------------------------------------------------
Lancer
__________ Information from ESET Smart Security, version of virus signature database 5577 (20101030) __________
The message was checked by ESET Smart Security.
http://www.eset.com
__________ Information from ESET Smart Security, version of virus signature database 5580 (20101031) __________
The message was checked by ESET Smart Security.
http://www.eset.com
13 years, 11 months
[libvirt] [PATCH] [TCK] network: create networks and check for exected results
by Stefan Berger
Derived from the nwfilter test program, this one works with libvirt's
networks. It creates networks from provided xml files and checks for
expected configuration in iptables, running processes and virsh output
using provided data files with commands to execute and the expected
results for after creating the network and after tearing it down
(*.post.dat). 3 tests are currently not passing due to a bug in
libvirt...
Signed-off-by: Stefan Berger <stefanb(a)us.ibm.com>
---
Build.PL | 2
scripts/networks/100-apply-verify-host.t | 10
scripts/networks/networkApplyTest.sh | 343 +++++++++++++
scripts/networks/networkxml2hostout/tck-testnet-1.dat | 11
scripts/networks/networkxml2hostout/tck-testnet-1.post.dat | 4
scripts/networks/networkxml2hostout/tck-testnet-2.dat | 8
scripts/networks/networkxml2hostout/tck-testnet-2.post.dat | 4
scripts/networks/networkxml2xmlin/tck-testnet-1.xml | 12
scripts/networks/networkxml2xmlin/tck-testnet-2.xml | 12
9 files changed, 405 insertions(+), 1 deletion(-)
Index: libvirt-tck/scripts/networks/networkApplyTest.sh
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/networkApplyTest.sh
@@ -0,0 +1,343 @@
+#!/bin/bash
+
+VIRSH=virsh
+
+uri=
+if [ "x${LIBVIRT_TCK_CONFIG}x" != "xx" ]; then
+ uri_exp=`cat ${LIBVIRT_TCK_CONFIG} | grep "^uri\s*=" | sed -e 's/uri\s*=\s*//' | tail -n 1`
+ if [ "x${uri_exp}x" != "xx" ]; then
+ eval "uri=${uri_exp}"
+ fi
+ if [ "x${uri}x" == "xx" ]; then
+ uri="qemu:///system"
+ fi
+else
+ uri="qemu:///system"
+fi
+LIBVIRT_URI=${uri}
+
+
+FLAG_WAIT="$((1<<0))"
+FLAG_VERBOSE="$((1<<2))"
+FLAG_LIBVIRT_TEST="$((1<<3))"
+FLAG_TAP_TEST="$((1<<4))"
+FLAG_FORCE_CLEAN="$((1<<5))"
+
+failctr=0
+passctr=0
+attachfailctr=0
+attachctr=0
+
+TAP_FAIL_LIST=""
+TAP_FAIL_CTR=0
+TAP_TOT_CTR=0
+
+function usage() {
+ local cmd="$0"
+cat <<EOF
+Usage: ${cmd} [--help|-h|-?] [--noattach] [--wait] [--verbose]
+ [--libvirt-test] [--tap-test]
+
+Options:
+ --help,-h,-? : Display this help screen.
+ --wait : Wait for the user to press the enter key once an error
+ was detected
+ --verbose : Verbose output
+ --libvirt-test : Use the libvirt test output format
+ --tap-test : TAP format output
+ --force : Allow the automatic cleaning of VMs and networks
+ previously created by the TCK test suite
+
+This test creates libvirt 'networks' and checks for expected results
+(iptables, running processes (dnsmasq)) using provided xml and data
+file respectively.
+EOF
+}
+
+
+function tap_fail() {
+ echo "not ok $1 - ${2:0:66}"
+ TAP_FAIL_LIST+="$1 "
+ ((TAP_FAIL_CTR++))
+ ((TAP_TOT_CTR++))
+}
+
+function tap_pass() {
+ echo "ok $1 - ${2:0:70}"
+ ((TAP_TOT_CTR++))
+}
+
+function tap_final() {
+ local okay
+
+ [ -n "${TAP_FAIL_LIST}" ] && echo "FAILED tests ${TAP_FAIL_LIST}"
+
+ okay=`echo "($TAP_TOT_CTR-$TAP_FAIL_CTR)*100/$TAP_TOT_CTR" | bc -l`
+ echo "Failed ${TAP_FAIL_CTR}/${TAP_TOT_CTR} tests, ${okay:0:5}% okay"
+}
+
+# A wrapper for mktemp in case it does not exist
+# Echos the name of a temporary file.
+function mktmpfile() {
+ local tmp
+ type -P mktemp > /dev/null
+ if [ $? -eq 0 ]; then
+ tmp=$(mktemp -t nwfvmtest.XXXXXX)
+ echo ${tmp}
+ else
+ while :; do
+ tmp="/tmp/nwfvmtest.${RANDOM}"
+ if [ ! -f ${tmp} ]; then
+ touch ${tmp}
+ chmod 666 ${tmp}
+ echo ${tmp}
+ break
+ fi
+ done
+ fi
+ return 0
+}
+
+
+function checkExpectedOutput() {
+ local xmlfile="$1"
+ local datafile="$2"
+ local flags="$3"
+ local skipregex="$4"
+ local cmd line tmpfile tmpfile2 skip
+
+ tmpfile=`mktmpfile`
+ tmpfile2=`mktmpfile`
+
+ exec 4<${datafile}
+
+ read <&4
+ line="${REPLY}"
+
+ while [ "x${line}x" != "xx" ]; do
+ cmd=`echo ${line##\#}`
+
+ skip=0
+ if [ "x${skipregex}x" != "xx" ]; then
+ skip=`echo ${cmd} | grep -c -E ${skipregex}`
+ fi
+
+ eval ${cmd} 2>&1 | tee ${tmpfile} 1>/dev/null
+
+ rm ${tmpfile2} 2>/dev/null
+ touch ${tmpfile2}
+
+ while [ 1 ]; do
+ read <&4
+ line="${REPLY}"
+
+ if [ "${line:0:1}" == "#" ] || [ "x${line}x" == "xx" ]; then
+
+ if [ ${skip} -ne 0 ]; then
+ break
+ fi
+
+ diff ${tmpfile} ${tmpfile2} >/dev/null
+
+ if [ $? -ne 0 ]; then
+ if [ $((flags & FLAG_VERBOSE)) -ne 0 ]; then
+ echo "FAIL ${xmlfile} : ${cmd}"
+ diff ${tmpfile} ${tmpfile2}
+ fi
+ ((failctr++))
+ if [ $((flags & FLAG_WAIT)) -ne 0 ]; then
+ echo "tmp files: $tmpfile, $tmpfile2"
+ echo "Press enter"
+ read
+ fi
+ [ $((flags & FLAG_LIBVIRT_TEST)) -ne 0 ] && \
+ test_result $((passctr+failctr)) "" 1
+ [ $((flags & FLAG_TAP_TEST)) -ne 0 ] && \
+ tap_fail $((passctr+failctr)) "${xmlfile} : ${cmd}"
+ else
+ ((passctr++))
+ [ $((flags & FLAG_VERBOSE)) -ne 0 ] && \
+ echo "PASS ${xmlfile} : ${cmd}"
+ [ $((flags & FLAG_LIBVIRT_TEST)) -ne 0 ] && \
+ test_result $((passctr+failctr)) "" 0
+ [ $((flags & FLAG_TAP_TEST)) -ne 0 ] && \
+ tap_pass $((passctr+failctr)) "${xmlfile} : ${cmd}"
+ fi
+
+ break
+
+ fi
+ echo "${line}" >> ${tmpfile2}
+ done
+ done
+
+ exec 4>&-
+
+ rm -rf "${tmpfile}" "${tmpfile2}" 2>/dev/null
+}
+
+
+function doTest() {
+ local xmlfile="$1"
+ local datafile="$2"
+ local postdatafile="$3"
+ local flags="$4"
+ local netname
+
+ if [ ! -r "${xmlfile}" ]; then
+ echo "FAIL : Cannot access filter XML file ${xmlfile}."
+ return 1
+ fi
+
+ netname=`cat "${xmlfile}" | sed -n 's/.*<name>\([[:print:]]*\)<.*/\1/p'`
+
+ ${VIRSH} net-create "${xmlfile}" > /dev/null
+
+ checkExpectedOutput "${xmlfile}" "${datafile}" "${flags}" ""
+
+ ${VIRSH} net-destroy "${netname}" > /dev/null
+
+ if [ -r ${postdatafile} ]; then
+ checkExpectedOutput "${xmlfile}" "${postdatafile}" "${flags}" ""
+ fi
+
+ return 0
+}
+
+
+function runTests() {
+ local xmldir="$1"
+ local hostoutdir="$2"
+ local flags="$3"
+ local datafiles f c
+ local tap_total=0 ctr=0
+
+ pushd ${PWD} > /dev/null
+ cd ${hostoutdir}
+ datafiles=`ls *.dat`
+ popd > /dev/null
+
+ if [ $((flags & FLAG_TAP_TEST)) -ne 0 ]; then
+ # Need to count the number of total tests
+ for fil in ${datafiles}; do
+ c=$(grep -c "^#" ${hostoutdir}/${fil})
+ ((tap_total+=c))
+ ((ctr++))
+ done
+ echo "1..${tap_total}"
+ fi
+
+ for fil in `echo "${datafiles}" | grep -v "\.post\.dat$"`; do
+ f=${fil%%.dat}
+ doTest "${xmldir}/${f}.xml" "${hostoutdir}/${fil}" \
+ "${hostoutdir}/${f}.post.dat" "${flags}"
+ done
+
+ if [ $((flags & FLAG_LIBVIRT_TEST)) -ne 0 ]; then
+ test_final $((passctr+failctr)) $failctr
+ elif [ $((flags & FLAG_TAP_TEST)) -ne 0 ]; then
+ tap_final
+ else
+ echo ""
+ echo "Summary: ${failctr} failures, ${passctr} passes,"
+ if [ ${attachctr} -ne 0 ]; then
+ echo " ${attachfailctr} interface attachment failures with ${attachctr} attempts"
+ fi
+ fi
+}
+
+
+function main() {
+ local prgname="$0"
+ local vm1 vm2
+ local xmldir="networkxml2xmlin"
+ local hostoutdir="networkxml2hostout"
+ local res rc
+ local flags
+
+ while [ $# -ne 0 ]; do
+ case "$1" in
+ --help|-h|-\?) usage ${prgname}; exit 0;;
+ --wait) ((flags |= FLAG_WAIT ));;
+ --verbose) ((flags |= FLAG_VERBOSE ));;
+ --libvirt-test) ((flags |= FLAG_LIBVIRT_TEST ));;
+ --tap-test) ((flags |= FLAG_TAP_TEST ));;
+ --force) ((flags |= FLAG_FORCE_CLEAN ));;
+ *) usage ${prgname}; exit 1;;
+ esac
+ shift 1
+ done
+
+ if [ `uname` != "Linux" ]; then
+ if [ $((flags & FLAG_TAP_TEST)) -ne 0 ]; then
+ echo "1..0 # Skipped: Only valid on Linux hosts"
+ else
+ echo "This script will only run on Linux."
+ fi
+ exit 1;
+ fi
+
+ if [ $((flags & FLAG_TAP_TEST)) -ne 0 ]; then
+ if [ "${LIBVIRT_URI}" != "qemu:///system" ]; then
+ echo "1..0 # Skipped: Only valid for Qemu system driver"
+ exit 0
+ fi
+
+ for name in `virsh list | awk '{print $2}'`
+ do
+ case ${name} in
+ tck*)
+ if [ "x${LIBVIRT_TCK_AUTOCLEAN}" == "x1" -o \
+ $((flags & FLAG_FORCE_CLEAN)) -ne 0 ]; then
+ res=$(virsh destroy ${name} 2>&1)
+ res=$(virsh undefine ${name} 2>&1)
+ if [ $? -ne 0 ]; then
+ echo "Bail out! Could not undefine VM ${name}: ${res}"
+ exit 0
+ fi
+ else
+ echo "Bail out! TCK VMs from previous tests still exist, use --force to clean"
+ exit 1
+ fi
+ esac
+ done
+
+ for name in `virsh net-list | sed -n '3,$p'`
+ do
+ case ${name} in
+ tck*)
+ if [ "x${LIBVIRT_TCK_AUTOCLEAN}" == "x1" -o \
+ $((flags & FLAG_FORCE_CLEAN)) -ne 0 ]; then
+ res=$(virsh net-destroy ${name} 2>&1)
+ rc=$?
+ res=$(virsh net-undefine ${name} 2>&1)
+ if [ $rc -ne 0 -a $? -ne 0 ]; then
+ echo "Bail out! Could not destroy/undefine network ${name}: ${res}"
+ exit 1
+ fi
+ else
+ echo "Bail out! Network ${name} already exists, use --force to clean"
+ exit 1
+ fi
+ esac
+ done
+ fi
+
+ if [ $((flags & FLAG_LIBVIRT_TEST)) -ne 0 ]; then
+ pushd ${PWD} > /dev/null
+ . test-lib.sh
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ test_intro $this_test
+ popd > /dev/null
+ fi
+
+ res=$(${VIRSH} capabilities 2>&1)
+
+ runTests "${xmldir}" "${hostoutdir}" "${flags}"
+
+ return 0
+}
+
+main "$@"
Index: libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-1.dat
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-1.dat
@@ -0,0 +1,11 @@
+#iptables -t nat -L -n | grep 10.1.2
+MASQUERADE tcp -- 10.1.2.0/24 !10.1.2.0/24 masq ports: 1024-65535
+MASQUERADE udp -- 10.1.2.0/24 !10.1.2.0/24 masq ports: 1024-65535
+MASQUERADE all -- 10.1.2.0/24 !10.1.2.0/24
+#iptables -n -L FORWARD | grep 10.1.2
+ACCEPT all -- anywhere 10.1.2.0/24 state RELATED,ESTABLISHED
+ACCEPT all -- 10.1.2.0/24 anywhere
+#ps aux | grep dnsmasq | grep 10.1.2 | sed -n 's/.*\\(dnsmasq[[:print:]*]\\)/\\1/p'
+dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/tck-testnet.pid --conf-file= --listen-address 10.1.2.1 --except-interface lo --dhcp-range 10.1.2.2,10.1.2.254 --dhcp-lease-max=253 --dhcp-no-override
+#virsh net-list | grep tck-testnet
+tck-testnet active no
Index: libvirt-tck/scripts/networks/networkxml2xmlin/tck-testnet-1.xml
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/networkxml2xmlin/tck-testnet-1.xml
@@ -0,0 +1,12 @@
+<network>
+ <name>tck-testnet</name>
+ <uuid>aadc8920-502a-4774-ac2b-cd382a204d06</uuid>
+ <forward mode='nat'/>
+ <bridge name='testbr' stp='on' delay='0' />
+ <ip address='10.1.2.1' netmask='255.255.255.0'>
+ <dhcp>
+ <range start='10.1.2.2' end='10.1.2.254' />
+ </dhcp>
+ </ip>
+</network>
+
Index: libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-2.dat
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-2.dat
@@ -0,0 +1,8 @@
+#iptables -L FORWARD | grep 10.1.2
+ACCEPT all -- anywhere 10.1.2.0/24
+ACCEPT all -- 10.1.2.0/24 anywhere
+#iptables -t nat -L | grep 10.1.2
+#ps aux | grep dnsmasq | grep 10.1.2 | sed -n 's/.*\\(dnsmasq[[:print:]*]\\)/\\1/p'
+dnsmasq --strict-order --bind-interfaces --pid-file=/var/run/libvirt/network/tck-testnet.pid --conf-file= --listen-address 10.1.2.1 --except-interface lo --dhcp-range 10.1.2.2,10.1.2.254 --dhcp-lease-max=253 --dhcp-no-override
+#virsh net-list | grep tck-testnet
+tck-testnet active no
Index: libvirt-tck/scripts/networks/networkxml2xmlin/tck-testnet-2.xml
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/networkxml2xmlin/tck-testnet-2.xml
@@ -0,0 +1,12 @@
+<network>
+ <name>tck-testnet</name>
+ <uuid>aadc8920-502a-4774-ac2b-cd382a204d06</uuid>
+ <forward mode='route'/>
+ <bridge name='testbr' stp='on' delay='0' />
+ <ip address='10.1.2.1' netmask='255.255.255.0'>
+ <dhcp>
+ <range start='10.1.2.2' end='10.1.2.254' />
+ </dhcp>
+ </ip>
+</network>
+
Index: libvirt-tck/scripts/networks/100-apply-verify-host.t
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/100-apply-verify-host.t
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+pwd=$(dirname $0)
+
+pushd ${PWD} > /dev/null
+
+cd ${pwd}
+bash ./networkApplyTest.sh --tap-test
+
+popd > /dev/null
Index: libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-1.post.dat
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-1.post.dat
@@ -0,0 +1,4 @@
+#iptables -t nat -L -n | grep 10.1.2
+#iptables -n -L FORWARD | grep 10.1.2
+#ps aux | grep dnsmasq | grep 10.1.2 | sed -n 's/.*\\(dnsmasq[[:print:]*]\\)/\\1/p'
+#virsh net-list | grep tck-testnet
Index: libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-2.post.dat
===================================================================
--- /dev/null
+++ libvirt-tck/scripts/networks/networkxml2hostout/tck-testnet-2.post.dat
@@ -0,0 +1,4 @@
+#iptables -t nat -L -n | grep 10.1.2
+#iptables -n -L FORWARD | grep 10.1.2
+#ps aux | grep dnsmasq | grep 10.1.2 | sed -n 's/.*\\(dnsmasq[[:print:]*]\\)/\\1/p'
+#virsh net-list | grep tck-testnet
Index: libvirt-tck/Build.PL
===================================================================
--- libvirt-tck.orig/Build.PL
+++ libvirt-tck/Build.PL
@@ -29,7 +29,7 @@ sub process_pkgdata_files {
my $name = $File::Find::name;
if (-d) {
$tck_dirs{$name} = [];
- } elsif (-f && (/\.t$/ || /\.sh$/ || /\.fwall$/ || /\.xml$/)) {
+ } elsif (-f && /\.(t|sh|fwall|xml|dat)$/) {
push @{$tck_dirs{$dir}}, $name;
}
};
13 years, 11 months
[libvirt] [PATCH 0/4] Fix handling of errors with disk labelling on NFS
by Daniel P. Berrange
The previous commit 06f81c63ebc19cb0e51f9b397991f6d6ae56d090 masked
a flaw with handling of errors for NFS disk labels. If you had multiple
devices that required labelling, and an disk on root squashing NFS, then
when the failure occurred for the NFS file, all further devices would
be skipped. The caller would then ignore the error and try to launch
the guest anyway, unless there was a stdin_path on NFS. Since NFS
error handling was not dealt with in the correct place, this in turn
meant that disk hotplug failed with root squashing NFS. All in all a
bit of a mess. This tries to clean up the code handling errors
closer to the point of occurrance
libvirt_private.syms | 1 +
qemu/qemu_driver.c | 3 +--
qemu/qemu_monitor_text.c | 28 +++++++++++++++++++---------
security/security_selinux.c | 11 +++++++----
util/storage_file.c | 32 +++++++++++++++++++++++++-------
util/storage_file.h | 9 +++++++++
6 files changed, 62 insertions(+), 22 deletions(-)
Daniel
13 years, 11 months
[libvirt] [PATCH] docs: fix typo
by Eric Blake
* docs/drvqemu.html.in (qemu): Fix typo.
---
Noticed this while browsing the web; pushing it as obvious.
docs/drvqemu.html.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/docs/drvqemu.html.in b/docs/drvqemu.html.in
index ab54133..7230cae 100644
--- a/docs/drvqemu.html.in
+++ b/docs/drvqemu.html.in
@@ -70,7 +70,7 @@ qemu+ssh://root@example.com/system (remote access, SSH tunnelled)
application. Thus the QEMU instances spawned from this driver will
share the same privileges as the client application. The intended
use case for this driver is desktop virtualization, with virtual
- machines storing their disk imags in the user's home directory and
+ machines storing their disk images in the user's home directory and
being managed from the local desktop login session.
</p>
--
1.7.2.3
13 years, 11 months