[libvirt] [PATCH] Fix crash in virNetDevGetVirtualFunctions
by Laine Stump
Commit 9a3ff01d7f16cc280ce3176620c0714f55511a65 (which was ACKed at
the end of January, but for some reason didn't get pushed until during
the 1.0.4 freeze) fixed the logic in virPCIGetVirtualFunctions().
Unfortunately, a typo in the fix (replacing VIR_REALLOC_N with
VIR_ALLOC_N during code movement) caused not only a memory leak, but
also resulted in most of the elements of the result array being
replaced with NULL. virNetDevGetVirtualFunctions() assumed (and I think
rightly so) that virPCIGetVirtualFunctions() wouldn't return any NULL
elements in the array, so it ended up segfaulting.
This was found when attempting to use a virtual network with an
auto-created pool of SRIOV VFs, e.g.:
<forward mode='hostdev' managed='yes'>
<pf dev='eth4'/>
</forward>
(the pool of PCI addresses is discovered by calling
virNetDevGetVirtualFunctions() on the PF dev).
---
src/util/virpci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/virpci.c b/src/util/virpci.c
index a0da1cd..85cd694 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -2026,8 +2026,8 @@ virPCIGetVirtualFunctions(const char *sysfs_path,
continue;
}
- if (VIR_ALLOC_N(*virtual_functions,
- *num_virtual_functions + 1) < 0) {
+ if (VIR_REALLOC_N(*virtual_functions,
+ *num_virtual_functions + 1) < 0) {
virReportOOMError();
VIR_FREE(config_addr);
goto error;
--
1.7.11.7
11 years, 7 months
[libvirt] [PATCHv3 0/6] Fix memory corruption/crash in the connection close callback
by Peter Krempa
This series fixes the crash resulting from a race condition in the connection
close callback. To observe the crash apply the first patch only. To verify that
the patchset fixes the crash please apply all but 2/6 and verify using virsh.
2/6 fixes the crash in a redundant way in case the close callback is used. In
the case it isn't 2/6 itself can't fix the issue.
For a better explanation of this problem please see the description in 6/6.
Peter Krempa (4):
DO NOT APPLY UPSTREAM: Close callback race corruption crash
reproducer.
virsh: Move cmdConnect from virsh-host.c to virsh.c
virsh: Register and unregister the close callback also in cmdConnect
rpc: Fix connection close callback race condition and memory
corruption/crash
Viktor Mihajlovski (2):
libvirt: Increase connection reference count for callbacks
virsh: Unregister the connection close notifier upon termination
src/datatypes.c | 55 ++++++++++++++++++++----
src/datatypes.h | 22 +++++++---
src/libvirt.c | 30 ++++++++-----
src/remote/remote_driver.c | 62 ++++++++++++++++-----------
src/rpc/virnetclient.c | 9 +++-
tools/virsh-host.c | 67 -----------------------------
tools/virsh.c | 102 ++++++++++++++++++++++++++++++++++++++++++---
7 files changed, 225 insertions(+), 122 deletions(-)
--
1.8.1.5
11 years, 7 months
[libvirt] [PATCH] docs: use MiB/s instead of Mbps for migration speed
by Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=948821
---
src/libvirt.c | 24 ++++++++++++------------
tools/virsh.pod | 4 ++--
2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/libvirt.c b/src/libvirt.c
index cef9f1f..c5221f5 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -5116,7 +5116,7 @@ virDomainMigrateDirect(virDomainPtr domain,
* @flags: bitwise-OR of virDomainMigrateFlags
* @dname: (optional) rename domain to this at destination
* @uri: (optional) dest hostname/URI as seen from the source host
- * @bandwidth: (optional) specify migration bandwidth limit in Mbps
+ * @bandwidth: (optional) specify migration bandwidth limit in MiB/s
*
* Migrate the domain object from its current host to the destination
* host given by dconn (a connection to the destination host).
@@ -5169,7 +5169,7 @@ virDomainMigrateDirect(virDomainPtr domain,
* URI if the destination host has multiple interfaces and a
* specific interface is required to transmit migration data.
*
- * The maximum bandwidth (in Mbps) that will be used to do migration
+ * The maximum bandwidth (in MiB/s) that will be used to do migration
* can be specified with the bandwidth parameter. If set to 0,
* libvirt will choose a suitable default. Some hypervisors do
* not support this feature and will return an error if bandwidth
@@ -5343,7 +5343,7 @@ error:
* @dxml: (optional) XML config for launching guest on target
* @dname: (optional) rename domain to this at destination
* @uri: (optional) dest hostname/URI as seen from the source host
- * @bandwidth: (optional) specify migration bandwidth limit in Mbps
+ * @bandwidth: (optional) specify migration bandwidth limit in MiB/s
*
* Migrate the domain object from its current host to the destination
* host given by dconn (a connection to the destination host).
@@ -5396,7 +5396,7 @@ error:
* URI if the destination host has multiple interfaces and a
* specific interface is required to transmit migration data.
*
- * The maximum bandwidth (in Mbps) that will be used to do migration
+ * The maximum bandwidth (in MiB/s) that will be used to do migration
* can be specified with the bandwidth parameter. If set to 0,
* libvirt will choose a suitable default. Some hypervisors do
* not support this feature and will return an error if bandwidth
@@ -5588,7 +5588,7 @@ error:
* @duri: mandatory URI for the destination host
* @flags: bitwise-OR of virDomainMigrateFlags
* @dname: (optional) rename domain to this at destination
- * @bandwidth: (optional) specify migration bandwidth limit in Mbps
+ * @bandwidth: (optional) specify migration bandwidth limit in MiB/s
*
* Migrate the domain object from its current host to the destination
* host given by duri.
@@ -5637,7 +5637,7 @@ error:
* renaming is not supported by the hypervisor, dname must be NULL or
* else an error will be returned.
*
- * The maximum bandwidth (in Mbps) that will be used to do migration
+ * The maximum bandwidth (in MiB/s) that will be used to do migration
* can be specified with the bandwidth parameter. If set to 0,
* libvirt will choose a suitable default. Some hypervisors do
* not support this feature and will return an error if bandwidth
@@ -5740,7 +5740,7 @@ error:
* @dxml: (optional) XML config for launching guest on target
* @flags: bitwise-OR of virDomainMigrateFlags
* @dname: (optional) rename domain to this at destination
- * @bandwidth: (optional) specify migration bandwidth limit in Mbps
+ * @bandwidth: (optional) specify migration bandwidth limit in MiB/s
*
* Migrate the domain object from its current host to the destination
* host given by duri.
@@ -5799,7 +5799,7 @@ error:
* renaming is not supported by the hypervisor, dname must be NULL or
* else an error will be returned.
*
- * The maximum bandwidth (in Mbps) that will be used to do migration
+ * The maximum bandwidth (in MiB/s) that will be used to do migration
* can be specified with the bandwidth parameter. If set to 0,
* libvirt will choose a suitable default. Some hypervisors do
* not support this feature and will return an error if bandwidth
@@ -17702,10 +17702,10 @@ error:
/**
* virDomainMigrateSetMaxSpeed:
* @domain: a domain object
- * @bandwidth: migration bandwidth limit in Mbps
+ * @bandwidth: migration bandwidth limit in MiB/s
* @flags: extra flags; not used yet, so callers should always pass 0
*
- * The maximum bandwidth (in Mbps) that will be used to do migration
+ * The maximum bandwidth (in MiB/s) that will be used to do migration
* can be specified with the bandwidth parameter. Not all hypervisors
* will support a bandwidth cap
*
@@ -17749,10 +17749,10 @@ error:
/**
* virDomainMigrateGetMaxSpeed:
* @domain: a domain object
- * @bandwidth: return value of current migration bandwidth limit in Mbps
+ * @bandwidth: return value of current migration bandwidth limit in MiB/s
* @flags: extra flags; not used yet, so callers should always pass 0
*
- * Get the current maximum bandwidth (in Mbps) that will be used if the
+ * Get the current maximum bandwidth (in MiB/s) that will be used if the
* domain is migrated. Not all hypervisors will support a bandwidth limit.
*
* Returns 0 in case of success, -1 otherwise.
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 89467f6..1510d0d 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -1154,12 +1154,12 @@ obtained from domjobinfo.
=item B<migrate-setspeed> I<domain> I<bandwidth>
-Set the maximum migration bandwidth (in Mbps) for a domain which is being
+Set the maximum migration bandwidth (in MiB/s) for a domain which is being
migrated to another host.
=item B<migrate-getspeed> I<domain>
-Get the maximum migration bandwidth (in Mbps) for a domain.
+Get the maximum migration bandwidth (in MiB/s) for a domain.
=item B<numatune> I<domain> [I<--mode> B<mode>] [I<--nodeset> B<nodeset>]
[[I<--config>] [I<--live>] | [I<--current>]]
--
1.8.1.5
11 years, 7 months
[libvirt] [PATCH 0/3] Un-break s390 default network model and clean up obsolete
by Peter Krempa
This series fixes the default network model for s390 that was broken by the
recent addition of post parse close callbacks and cleans up code obsoleted by
that addition.
Peter Krempa (2):
qemu: Clean up network device CLI generator
qemu: Remove now obsolete assignment of default netwokr card model for
s390 hosts
Viktor Mihajlovski (1):
qemu: Use correct default model on s390
src/qemu/qemu_command.c | 24 +++++++-----------------
src/qemu/qemu_domain.c | 12 +++++++++---
2 files changed, 16 insertions(+), 20 deletions(-)
--
1.8.1.5
11 years, 7 months
[libvirt] [PATCH] Tweak EOF handling of streams
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
Typically when you get EOF on a stream, poll will return
POLLIN|POLLHUP at the same time. Thus when we deal with
stream reads, if we see EOF during the read, we can then
clear the VIR_STREAM_EVENT_HANGUP & VIR_STREAM_EVENT_ERROR
event bits.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
daemon/stream.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/daemon/stream.c b/daemon/stream.c
index 4df1145..0fb5c85 100644
--- a/daemon/stream.c
+++ b/daemon/stream.c
@@ -148,6 +148,14 @@ daemonStreamEvent(virStreamPtr st, int events, void *opaque)
virNetServerClientClose(client);
goto cleanup;
}
+ /* If we detected EOF during read processing,
+ * then clear hangup/error conditions, since
+ * we want the client to see the EOF message
+ * we just sent them
+ */
+ if (stream->recvEOF)
+ events = events & ~(VIR_STREAM_EVENT_HANGUP |
+ VIR_STREAM_EVENT_ERROR);
}
/* If we have a completion/abort message, always process it */
--
1.8.1.4
11 years, 7 months
[libvirt] virsh list hangs
by wangxiaojun
please help me, i just installed libvirt-git and qemu-git to my gentoo os.
when i start libvirtd, then type virsh list , it has no response. hangs
forever.
following is my typed cmd:
$>LIBVIRT_DEBUG=1 libvirtd
..................
2013-04-09 08:39:03.649+0000: 17021: debug : virFileClose:72 : Closed fd 19
2013-04-09 08:39:03.649+0000: 17021: debug : virFileClose:72 : Closed fd 21
2013-04-09 08:39:03.649+0000: 17021: debug : virArchFromHost:174 :
Mapped x86_64 to 28 (x86_64)
2013-04-09 08:39:03.649+0000: 17021: debug : virArchFromHost:174 :
Mapped x86_64 to 28 (x86_64)
2013-04-09 08:39:03.649+0000: 17021: debug : virArchFromHost:174 :
Mapped x86_64 to 28 (x86_64)
2013-04-09 08:39:03.649+0000: 17021: debug : virArchFromHost:174 :
Mapped x86_64 to 28 (x86_64)
2013-04-09 08:39:03.649+0000: 17021: debug : virArchFromHost:174 :
Mapped x86_64 to 28 (x86_64)
2013-04-09 08:39:03.649+0000: 17021: debug : virArchFromHost:174 :
Mapped x86_64 to 28 (x86_64)
2013-04-09 08:39:03.649+0000: 17021: debug : virQEMUCapsCacheLookup:2620
: Creating capabilities for /usr/bin/qemu-system-x86_64
2013-04-09 08:39:03.649+0000: 17021: debug : virObjectNew:201 :
OBJECT_NEW: obj=0x7fa398095cd0 classname=virQEMUCaps
2013-04-09 08:39:03.649+0000: 17021: debug : virQEMUCapsInitQMP:2357 :
Try to get caps via QMP qemuCaps=0x7fa398095cd0
2013-04-09 08:39:03.649+0000: 17021: debug : virCommandRunAsync:2205 :
About to run LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.2:/opt/nvidia-cg-toolkit/bin:/opt/cuda/bin
HOME=/root USER=root LOGNAME=root /usr/bin/qemu-system-x86_64 -S
-no-user-config -nodefaults -nographic -M none -qmp
unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait
-pidfile /var/lib/libvirt/qemu/capabilities.pidfile -daemonize
2013-04-09 08:39:03.650+0000: 17021: debug : virFileClose:72 : Closed fd 18
2013-04-09 08:39:03.650+0000: 17021: debug : virFileClose:72 : Closed fd 20
2013-04-09 08:39:03.650+0000: 17021: debug : virFileClose:72 : Closed fd 22
2013-04-09 08:39:03.650+0000: 17021: debug : virCommandRunAsync:2210 :
Command result 0, with PID 17095
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 3
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 4
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 5
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 6
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 7
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 8
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 9
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 10
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 11
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 12
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 13
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 14
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 15
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 16
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 17
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 19
2013-04-09 08:39:03.650+0000: 17095: debug : virFileClose:72 : Closed fd 21
In another terminal i type :
$>gdb virsh
GNU gdb (Gentoo 7.5.1 vanilla) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/bin/virsh...done.
(gdb) run -c qemu:///system
Starting program: /usr/bin/virsh -c qemu:///system
warning: no loadable sections found in added symbol-file system-supplied
DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffeffcf700 (LWP 17555)]
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # list
^C
(hangs there..... )
Program received signal SIGINT, Interrupt.
0x00007ffff428691d in poll () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff428691d in poll () from /lib64/libc.so.6
#1 0x00007ffff7a32918 in virNetClientIOEventLoop
(client=0x55555587a1c0, thiscall=0x55555587a150) at rpc/virnetclient.c:1527
#2 0x00007ffff7a33203 in virNetClientIO (client=0x55555587a1c0,
thiscall=0x55555587a150) at rpc/virnetclient.c:1799
#3 0x00007ffff7a33af7 in virNetClientSendInternal
(client=0x55555587a1c0, msg=0x55555587a9d0, expectReply=true,
nonBlock=false)
at rpc/virnetclient.c:1975
#4 0x00007ffff7a33b8b in virNetClientSendWithReply
(client=0x55555587a1c0, msg=0x55555587a9d0) at rpc/virnetclient.c:2003
#5 0x00007ffff7a34a86 in virNetClientProgramCall (prog=0x55555587a440,
client=0x55555587a1c0, serial=0, proc=66, noutfds=0, outfds=0x0,
ninfds=0x0, infds=0x0, args_filter=0x7ffff42be510 <xdr_void>,
args=0x0, ret_filter=0x7ffff7a277ba <xdr_remote_auth_list_ret>,
ret=0x7fffffffd580) at rpc/virnetclientprogram.c:331
#6 0x00007ffff7a1da27 in callFull (conn=0x555555858610,
priv=0x555555879cb0, flags=0, fdin=0x0, fdinlen=0, fdout=0x0, fdoutlen=0x0,
proc_nr=66, args_filter=0x7ffff42be510 <xdr_void>, args=0x0,
ret_filter=0x7ffff7a277ba <xdr_remote_auth_list_ret>, ret=0x7fffffffd580 "")
at remote/remote_driver.c:5604
#7 0x00007ffff7a1daf4 in call (conn=0x555555858610,
priv=0x555555879cb0, flags=0, proc_nr=66, args_filter=0x7ffff42be510
<xdr_void>,
args=0x0, ret_filter=0x7ffff7a277ba <xdr_remote_auth_list_ret>,
ret=0x7fffffffd580 "") at remote/remote_driver.c:5626
#8 0x00007ffff7a09618 in remoteAuthenticate (conn=0x555555858610,
priv=0x555555879cb0, auth=0x7ffff7dd4640 <virConnectAuthDefault>,
authtype=0x0) at remote/remote_driver.c:3483
#9 0x00007ffff7a029c2 in doRemoteOpen (conn=0x555555858610,
priv=0x555555879cb0, auth=0x7ffff7dd4640 <virConnectAuthDefault>, flags=0)
at remote/remote_driver.c:799
#10 0x00007ffff7a03302 in remoteOpen (conn=0x555555858610,
auth=0x7ffff7dd4640 <virConnectAuthDefault>, flags=0)
at remote/remote_driver.c:997
#11 0x00007ffff79b5a0a in do_open (name=0x555555850780 "qemu:///system",
auth=0x7ffff7dd4640 <virConnectAuthDefault>, flags=0)
at libvirt.c:1201
#12 0x00007ffff79b648e in virConnectOpenAuth (name=0x555555850780
"qemu:///system", auth=0x7ffff7dd4640 <virConnectAuthDefault>, flags=0)
at libvirt.c:1441
#13 0x0000555555574975 in vshReconnect (ctl=0x7fffffffd9b0) at virsh.c:338
#14 0x0000555555577d48 in vshCommandRun (ctl=0x7fffffffd9b0,
cmd=0x55555586a400) at virsh.c:1748
#15 0x000055555557b4c6 in main (argc=3, argv=0x7fffffffdb48) at virsh.c:3222
(gdb)
11 years, 7 months
[libvirt] fail to convert qemu xml to args with libvirt-1.0.4: An error occurred, but the cause is unknown
by Yin Olivia-R63875
Hi,
I used to convert qemu XML to args with libvirt-1.0.3.
But it failed to convert with libvirt-1.0.4.
# virsh domxml-to-native qemu-argv test.xml >test.sh
error: An error occurred, but the cause is unknown
Comparing the debug file as below:
1) lbvirt-1.0.3
<cut>
2013-04-09 03:23:47.296+0000: 2669: debug : virEventPollInterruptLocked:716 : Interrupting
2013-04-09 03:23:47.296+0000: 2669: debug : virNetClientIO:1807 : All done with our call head=(nil) call=0x100871c0 rv=0
2013-04-09 03:23:47.297+0000: 2670: debug : virEventPollRunOnce:640 : Poll got 1 event(s)
2013-04-09 03:23:47.297+0000: 2670: debug : virEventPollDispatchTimeouts:425 : Dispatch 0
2013-04-09 03:23:47.297+0000: 2669: debug : virNetMessageFree:73 : msg=0x10087500 nfds=0 cb=(nil)
2013-04-09 03:23:47.297+0000: 2670: debug : virEventPollDispatchHandles:470 : Dispatch 1
2013-04-09 03:23:47.297+0000: 2670: debug : virEventPollDispatchHandles:484 : i=0 w=1
2013-04-09 03:23:47.297+0000: 2669: debug : virConnectClose:1483 : conn=0x100878b8
<cut>
2) libvirt-1.0.4
<cut>
2013-04-09 03:07:58.012+0000: 2834: debug : virEventPollInterruptLocked:716 : Interrupting
2013-04-09 03:07:58.012+0000: 2834: debug : virNetClientIO:1810 : All done with our call head=(nil) call=0x10089db8 rv=0
2013-04-09 03:07:58.012+0000: 2835: debug : virEventPollRunOnce:640 : Poll got 1 event(s)
2013-04-09 03:07:58.012+0000: 2835: debug : virEventPollDispatchTimeouts:425 : Dispatch 0
2013-04-09 03:07:58.012+0000: 2834: error : virNetClientProgramDispatchError:175 : An error occurred, but the cause is unknown
2013-04-09 03:07:58.012+0000: 2835: debug : virEventPollDispatchHandles:470 : Dispatch 1
2013-04-09 03:07:58.012+0000: 2834: debug : virNetMessageFree:73 : msg=0x1008a0f8 nfds=0 cb=(nil)
2013-04-09 03:07:58.012+0000: 2835: debug : virEventPollDispatchHandles:484 : i=0 w=1
2013-04-09 03:07:58.012+0000: 2835: debug : virEventPollDispatchHandles:498 : EVENT_POLL_DISPATCH_HANDLE: watch=1 events=1
2013-04-09 03:07:58.012+0000: 2835: debug : virEventPollCleanupTimeouts:516 : Cleanup 0
2013-04-09 03:07:58.013+0000: 2835: debug : virEventPollCleanupTimeouts:552 : Found 0 out of 0 timeout slots used, releasing 0
2013-04-09 03:07:58.013+0000: 2835: debug : virEventPollCleanupHandles:564 : Cleanup 2
2013-04-09 03:07:58.013+0000: 2834: debug : virConnectClose:1483 : conn=0x1008a4b0
<cut>
How can I debug this cause unknown error?
Best Regards,
Olivia
11 years, 7 months
[libvirt] [PATCH] sanlock: add missing test command in virt-sanlock-cleanup.in
by Alex Jia
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=949483
Signed-off-by: Alex Jia <ajia(a)redhat.com>
---
In fact, the virt-sanlock-cleanup works well on RHEL6.4, but doesn't work
on RHEL7.0, and got a error "line 14: x: command not found", It may be
different bash version issue.
tools/virt-sanlock-cleanup.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/virt-sanlock-cleanup.in b/tools/virt-sanlock-cleanup.in
index a9b7c2e..5389fc7 100644
--- a/tools/virt-sanlock-cleanup.in
+++ b/tools/virt-sanlock-cleanup.in
@@ -11,7 +11,7 @@ fi
LOCKSPACE="__LIBVIRT__DISKS__"
LOCKDIR=`augtool print '/files@sysconfdir(a)/libvirt/qemu-sanlock.conf/disk_lease_dir'`
-if test $? != 0 || "x$LOCKDIR" = "x" ; then
+if test $? != 0 || test "x$LOCKDIR" = "x" ; then
LOCKDIR="@localstatedir@/lib/libvirt/sanlock"
fi
--
1.7.1
11 years, 7 months
[libvirt] remote connection issue 'virsh -c qemu+ssh:///root@localhost/system list'
by Yin Olivia-R63875
Hi,
I'm trying remote connection with qemu hypervisor on FSL PPC board.
The libvirt server is the PPC board.
root@ppc:~# ifconfig eth0 10.193.20.109
root@ppc:~# libvirtd -d
root@ppc:~# virsh -c qemu:///system define test.xml
root@ppc:~# virsh -c qemu:///system start test
root@ppc:~# virsh -c qemu:///system list --all
Id Name State
----------------------------------------------------
2 test running
Connect from an X86 PC (Ubuntu 10.04) to the PPC board.
user@x86:~$ virsh -c qemu+ssh://root@10.193.20.109/system list --all
The authenticity of host '10.193.20.109 (10.193.20.109)' can't be established.
RSA key fingerprint is 2f:56:07:08:da:7d:ac:41:45:57:d2:12:15:19:67:e0.
Are you sure you want to continue connecting (yes/no)? yes
root(a)10.193.20.109's password:
error: failed to connect to the hypervisor
error: End of file while reading data: Warning: Permanently added '10.193.20.109' (RSA) to the list of known hosts.
nc: invalid option -- 'U'
BusyBox v1.19.4 (2013-03-08 13:08:18 CST) multi-call binary.
Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]: Input/output error
I tried to verify the remote connection on localhost. But it also failed as below:
root@mpc8572ds:~# virsh -c qemu+ssh:///root@localhost/system list --all
root@localhost's password:
error: failed to connect to the hypervisor
error: End of file while reading data: nc: invalid option -- 'U'
BusyBox v1.19.4 (2013-03-08 13:08:18 CST) multi-call binary.
Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG]: Input/output error
Could anyone give suggestion on this issue?
Best Regards,
Olivia
11 years, 7 months
[libvirt] images on NFS do not have MCS when selinux is on
by yue
hi,all
i now test selinux(enforcing). i assign a nfs-image to a VM, then start it.
at the beginning i set virt_use_nfs on, its image does not has a MCS corresponding to qemu-kvm process's MCS
then i remount nfs with -o context="system_u:object_r:virt_image_t:s0" , restart VM, its image does not has a corresponding MCS.
#ls -lZ
####system_u:object_r:virt_image_t:s0 803003d2-3a2b-4581-a7cb-dc7fac06e7af
why this happen? if this is right for NFS?
thanks
11 years, 7 months