Hide Forgot
virt-sandbox-service create --copy -N dhcp,mac='52:54:00:ec:b6:c2',source=virbr1 -m host-bind:/etc/crontab=/containers/vm2/etc/crontab -m host-bind:/etc/shadow=/containers/vm2/etc/shadow --unitfile crond.service $name Only the /etc/shadow line gets added not the /etc/crontab.
Created attachment 824012 [details] Patch fixes multiple mount points.
Applied upstream as commit 6f145fe4338f0ea6e67a46e6c7c85456e3c0b08e Author: Dan Walsh <dwalsh> Date: Fri Nov 15 17:18:59 2013 +0000 Handle the case of multiple mounts with virt-sandbox-service. Currently if you execute virt-sandbox-service create --mount=... --mount=... Only the last mount gets added via the argparser, since the arg is parsed as a scalar, not a list Signed-off-by: Daniel P. Berrange <berrange>
I can reproduce this on libvirt-sandbox-0.5.0-5.el7.x86_64 with libvirt-1.1.1-12.el7.x86_64 and kernel-3.10.0-0.rc7.64.el7.x86_64. To fake /containers/vm2/etc/{crontab,shadow}. # mkdir -p /containers/vm2/etc/ # touch /containers/vm2/etc/{crontab,shadow} To create multi-mount container and start it # virt-sandbox-service create --copy -N dhcp,mac='52:54:00:ec:b6:c2',source=default -m host-bind:/etc/crontab=/containers/vm2/etc/crontab -m host-bind:/etc/shadow=/containers/vm2/etc/shadow --unitfile crond.service multi-mount Created sandbox container dir /var/lib/libvirt/filesystems/multi-mount Created unit file /etc/systemd/system/multi-mount_sandbox.service Created sandbox config /etc/libvirt-sandbox/services/multi-mount/config/sandbox.cfg # virsh -c lxc:/// start multi-mount Domain multi-mount started Log into container and check mounting file [root@localhost ~]# virt-sandbox-service connect multi-mount sh-4.2# df -m Filesystem 1M-blocks Used Available Use% Mounted on /dev/mapper/rhel-00 39240 14864 22361 40% / devfs 1 0 1 0% /dev 10.66.90.121:/vol/S3/libvirtmanual/libvirt-pkg/all-pkgs-pool/ 819200 750905 68296 92% /mnt tmpfs 1 0 1 0% /sys/fs/cgroup tmpfs 10 1 10 2% /run tmpfs 100 0 100 0% /tmp tmpfs 100 0 100 0% /dev/shm /dev/mapper/rhel-00 39240 14864 22361 40% /etc/shadow Notes, only the /etc/shadow line gets added not the /etc/crontab. Verify this on libvirt-sandbox-0.5.0-6.el7. [root@localhost ~]# virt-sandbox-service connect multi-mount sh-4.2# df -m Filesystem 1M-blocks Used Available Use% Mounted on /dev/mapper/rhel-00 39240 14862 22363 40% / devfs 1 0 1 0% /dev 10.66.90.121:/vol/S3/libvirtmanual/libvirt-pkg/all-pkgs-pool/ 819200 750905 68296 92% /mnt tmpfs 1 0 1 0% /sys/fs/cgroup tmpfs 10 1 10 2% /run tmpfs 100 0 100 0% /tmp tmpfs 100 0 100 0% /dev/shm /dev/mapper/rhel-00 39240 14862 22363 40% /etc/crontab /dev/mapper/rhel-00 39240 14862 22363 40% /etc/shadow Notes, if downgrade libvirt-sandbox from -6 to -5, users need to restart libvirt daemon.
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request.