[libvirt-users] virtlockd, init script and kill signals
by Franky Van Liedekerke
Hi,
I've read in the documentation that virtlockd uses SIGUSR1 to dump its
state and then re-execs itself.
Now I tried it and this seems to fail because virtlockd is being
launched without a full path (when using the init script), thus re-exec
fails with the error:
error : virLockDaemonPreExecRestart:1092 : Unable to restart self: No
such file or directory
Changing in the init script the PROCESS variable to
PROCESS=/usr/sbin/virtlockd
fixes this.
Also, concerning the init script:
- HUP seems to crash the daemon, so maybe it's better to be replaced by
SIGUSR1 or removed
- path to process pid file (variable PIDFILE) needed to be changed to
/var/run/$SERVICE.pid
- the path to the config file needed to be changed
(/etc/sysconfig/virtlockd) to contain
VIRTLOCKD_ARGS="-f /etc/libvirt/qemu-lockd.conf"
Hope this helps someone :-)
Franky
11 years, 7 months
[libvirt-users] sanlockd, virtlock and GFS2
by Franky Van Liedekerke
Hi,
I'm trying to put in place a KVM cluster (using clvm and gfs2), but I'm
running into some issues with either sanlock or virtlockd. All virtual
machines are handled via the cluster (in /etc/cluser/cluster.conf) but I
want some kind of locking to be in place as extra security measurement.
Sanlock
=======
At first I tried sanlock, but it seems if one node goes down
unexpectedly, sanlock sometimes blocks everything on the other node. So
I can't start any VM's there, so cluster failover is not working for the
VM's.
The locking dir for sanlock is on a shared dir (GFS2), so this might be
the problem: sanlock recommends using a shared device (doing everything
yourself) and don't recommend the locking dir to be on GFS2, but libvirt
config suggest using a shared dir. Redhat even suggests that GFS2 is a
good solution there,
So: is there a hint on how to format/mount the GFS2 partition for
sanlock usage?
This thread
(http://web.archiveorange.com/archive/v/fZfKniEdO4ZFyIhhNbzU )
recommends against GFS2+sanlock, but maybe using the "no_lock" gfs2
option might help? Any kind of advice?
Virtlockd
=========
Since sanlock was not working as expected, I tried virtlockd. This
seems to be working well, but: live migration fails because the file on
the shared disk (used for locking) is being locked by the original
server running the VM. So when trying to do live migration, this fails
and leaves the VM paused on the original server. Trying to migrate a
paused server then works ok, but that's of course not live migration.
So: is there a hint on how to format/mount the GFS2 partition for
virtlock usage?
Of course: since every VM is being started/stopped via the cluster, I
could just leave out locking all together and trust on the cluster
software ...
Any insights/tips are greatly appreciated!
Franky
11 years, 7 months
[libvirt-users] domain disk io throttling
by Edoardo Comar
Hi
Currently <blkiotune> in domain xml allows only to set cgroups weights
blkio.weight or blkio.weight_device
I see from
https://www.kernel.org/doc/Documentation/cgroups/blkio-controller.txt
that cgroups also allows throttling policies settable via
blkio.throttle.read_bps_device
- blkio.throttle.write_bps_device
- blkio.throttle.read_iops_device
- blkio.throttle.write_iops_device
these AFAIK are not the ones set via <blkdeviotune> which need to be
applied to individual virtual disks.
are there any plans to allow libvirt to make use of the cgroup throttling?
it looks to me it could make life simpler by assigning a bandwitdh limit
to a domain
without having to partition it among its multiple virtual disks.
Assigning a limit to the domain is useful from a host resource management
perspective,
while having to dictate how guests use their individual disks is not, I
think.
--------------------------------------------------
regards,
Edoardo Comar
WebSphere Application Service Platform for Networks (ASPN)
ecomar(a)uk.ibm.com
+44 (0)1962 81 5576
IBM UK Ltd, Hursley Park, SO21 2JN
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
11 years, 8 months
[libvirt-users] Basic Network Connections
by Slater, Joseph
Hi,
If I have these fragments in a domain definition, the guest will start with "eth0"
assigned by dhcp to an address on my lan. Things seem to work according to the documentation
I can find.
<network>
<name>direct-macvtap</name>
<forward mode='bridge'>
<interface dev='eth0' />
</forward>
</network>
<devices>
<interface type='direct'>
<mac address='00:15:17:A6:BC:C9' />
<source dev='eth0' mode='bridge' />
<model type='virtio' />
</interface>
</devices>
I don't understand the <network> part here. It doesn't seem to be documented. I inherited these pieces
so I do not know why they are as they are.
If, instead, I have the following, the guest comes up with no network interface at all
(except lo). On the host, interfaces vnet0 and virbr0 exist and virbr0 is 192.168.122.1.
<devices>
<interface type='network'>
<source network='default'/>
</interface>
</devices>
Adding in
<model type='virtio' />
makes it start with "eth0", but no address has been assigned. I can manually do that and then
I can communicate with the host but it's kind of a pain to add the address and routing manually.
Oddly enough, though, ping from host to guest works normally, but ping guest to host seems to succeed once
then hang (with no timeout).
It is not at all obvious to me how virtio magically creates eth0.
Am I doing something wrong, here? And, if anyone could advise how to use openvswitch
I'd appreciate it. I've seen adding
<virtualport type='openvswitch/>
might be enough, presumably with an appropriate name for the source network.
Joe
11 years, 8 months