Fixed
Created: Dec 6, 2013
Updated: Mar 11, 2016
Resolved Date: Dec 18, 2013
Found In Version: 5.0.1
Fix Version: 5.0.1.11
Severity: Standard
Applicable for: Wind River Linux 5
Component/s: Userspace
We build libvirt with sanlock enabled by default:
base/recipes-extended/libvirt/libvirt_1.1.2.bbappend
PACKAGECONFIG = "... sanlock ..."
PACKAGECONFIG[sanlock] = "--with-sanlock, --without-sanlock,sanlock,augeas"
I copied /etc/libvirt/qemu.conf over to an ovp-kvm rootfs from an ovp-ovirt-node rootfs (by accident/stupidity); it contained:
lock_manager="sanlock"
When I tried to start a VM with libvirt, it failed:
# virsh start donn-guest
error: Failed to start domain donn-guest
error: Child quit during startup handshake: Input/output error
#
I traced the command and found:
2405 connect(3, {sa_family=AF_FILE, sun_path="/var/run/sanlock/sanlock.sock"}, 110 <unfinished ...>
2405 <... connect resumed> ) = -1 ENOENT (No such file or directory)
[...]
2405 write(2, "libvirt: Lock Driver error : Failed to open socket to sanlock daemon: No such file or directory\n", 96 <unfinished ...>
The directory is missing because its /etc/default/volatiles definition is in the sanlock RPM, and we only install the sanlock-lib RPM with ovp-kvm.
Copy the sanlock RPM over from the build host and install it. Or remove the lock_manager line from /etc/libvirt/qemu.conf.
.../configure --enable-board=intel-xeon-core --enable-kernel=preempt-rt+xfs --enable-rootfs=ovp-kvm+gdb --enable-addons=wr-ovp ...
make all
ls -l export/dist/usr/sbin/sanlock