[libvirt] [PATCH 0/3] Allow adding mountOpts to the storage pool mount command
by John Ferlan
Modify the generation of the command line to allow usage of a
new XML pool source directory "mount_opts" in order to allow (for
instance) starting an NFS pool with specific mount options.
John Ferlan (3):
storage: Add mount options attribute for pool source dir element
storage: Add mountOpts to the storage pool mount command line
virsh: Add source-mount-opts for pool commands
docs/formatstorage.html.in | 8 ++++++++
docs/schemas/storagepool.rng | 5 +++++
src/conf/storage_conf.c | 12 +++++++++--
src/conf/storage_conf.h | 3 +++
src/storage/storage_util.c | 4 ++++
.../pool-netfs-mountopts.argv | 1 +
tests/storagepoolxml2argvtest.c | 1 +
.../pool-netfs-mountopts.xml | 20 +++++++++++++++++++
.../pool-netfs-mountopts.xml | 20 +++++++++++++++++++
tests/storagepoolxml2xmltest.c | 1 +
tools/virsh-pool.c | 15 +++++++++++---
tools/virsh.pod | 5 +++++
12 files changed, 90 insertions(+), 5 deletions(-)
create mode 100644 tests/storagepoolxml2argvdata/pool-netfs-mountopts.argv
create mode 100644 tests/storagepoolxml2xmlin/pool-netfs-mountopts.xml
create mode 100644 tests/storagepoolxml2xmlout/pool-netfs-mountopts.xml
--
2.17.2
6 years, 3 months
[libvirt] configuration support to allow devices into cgroup devices devices.list inside libvirt_lxc container
by Mohan R
Hi,
I was having trouble with losetup inside libvirt_lxc container. Then I
found that <mknod state="on"> will provide CAP_MKNOD capability.
Even after enabling CAP_MKNOD in my container, I was not able to do
'losetup' because cgroup's device.list for my container dont have 'rwm'
flags for loop devices ('b 7:* rwm' in
/sys/fs/cgroup/devices/machine.slice/machine-
lxc*.scope/user/*/c1.session/devices.list)
Currently I have to manually do echo "b 7:* rwm" into
/sys/fs/cgroup/devices/machine.slice/machine-lxc*.scope/devices.allow
file before I login into the container in order to use loop devices. It
will be useful if we have a way to do this through domain xml rather
than manually doing it like what I'm doing now.
I looked into rng files, but I'm not able to find a way to define 'b
7:* rwm' in xml. I just want to check with the devs if this is possible
already. Otherwise I'll file one improvement bug.
I think lxc already have a way to do this through
lxc.cgroup.devices.allow
Thanks,
Mohan R
6 years, 3 months