LinuxForum.Fans
Тема

openvz - tun

Автор: mitsumotox 2 сообщений 1729 просмотров
#265766

В контейнере поднял опенвпн тунель, соответственно
для контейнера настроил tun интерфейс. всё работает!

text

lsmod | grep tun
modprobe tun

vzctl set 20026 --devnodes net/tun:rw --save vzctl set 20026 --devices c:10:200:rw --save vzctl set 20026 --capability net_admin:on --save vzctl exec 20026 mkdir -p /dev/net vzctl exec 20026 chmod 600 /dev/net/tun

делаю перезапуск контейнера

text

# vzctl restart 20026
Restarting container
Stopping container ...
Container was stopped
vzquota : (error) Quota off syscall for id 20026: Device or resource busy
vzquota : (error)     Possible reasons:
vzquota : (error)     - Container's root is not unmounted
vzquota : (error)     - there are opened files inside container's root/private area
vzquota : (error)     - your current working directory is inside a container directory
vzquota : (error)       root/private area
vzquota off failed [3]

делаю повторный перезапуск, контейнер запускается

text

# vzctl restart 20026
Restarting container
Starting container ...
vzquota : (warning) Quota is running for id 20026 already
Container is mounted
Adding IP address(es): 192.168.48.26
Setting CPU units: 1200
Setting devices
Container start in progress...

Но, нужно опять делать настройки tun интерфейса,
Может кто сталкивался с этим...

спасибо.

#265865

Я так полагаю это сделано?

To make sure that tun module will be automatically loaded on every reboot you can also add it or into /etc/modules.conf (on RHEL see /etc/sysconfig/modules/ directory).
Войдите или зарегистрируйтесь, чтобы ответить.