Page 1 of 1

(Solved) VestaCP in LXC Container

Posted: Wed Sep 19, 2018 8:19 pm
by mehargags
Hello Everyone...

I'm trying out my first attempts in setting up proxmox and I stumbled upon some problems installing VestaCP control Panel inside an LXC container.

I tried with an Un-Privileged Container... it won't even install and even if it does, its more than 60% broken.

Installed fine on Privileged Container... installed fine but it doesn't really function properly.

I have checked a few references that some people are running containaised VestaCP in LXC/LXD so I ask them for help. I'd like to have any tips, tricks, custom configs that might have worked for someone, so please share whatever knowledge you can over VestaCP install inside a container.

Thanks alot

Log when trying to add a new domain in VestaCP (on Privlidged container

Code: Select all

bash v-add-web-domain admin abc.xyz
v-add-web-domain: line 28: /func/main.sh: No such file or directory
v-add-web-domain: line 29: /func/domain.sh: No such file or directory
v-add-web-domain: line 30: /func/ip.sh: No such file or directory
v-add-web-domain: line 31: /conf/vesta.conf: No such file or directory
v-add-web-domain: line 34: format_domain: command not found
v-add-web-domain: line 35: format_domain_idn: command not found
v-add-web-domain: line 36: format_aliases: command not found
v-add-web-domain: line 43: is_system_enabled: command not found
v-add-web-domain: line 44: check_args: command not found
v-add-web-domain: line 45: is_format_valid: command not found
v-add-web-domain: line 46: is_object_valid: command not found
v-add-web-domain: line 47: is_object_unsuspended: command not found
v-add-web-domain: line 48: is_package_full: command not found
v-add-web-domain: line 49: is_domain_new: command not found
v-add-web-domain: line 50: is_dir_symlink: command not found
v-add-web-domain: line 54: get_user_ip: command not found
v-add-web-domain: line 63: /user.conf: No such file or directory
touch: cannot touch '/var/log//domains/abc.xyz.bytes': No such file or directory
touch: cannot touch '/var/log//domains/abc.xyz.log': No such file or directory
touch: cannot touch '/var/log//domains/abc.xyz.error.log': No such file or directory
chown: cannot access '/var/log//domains/abc.xyz.*': No such file or directory
chmod: cannot access '/var/log//domains/abc.xyz.*': No such file or directory
chmod: cannot access '/admin/web/abc.xyz/public_*html/*': No such file or directory
v-add-web-domain: line 119: get_ip_alias: command not found
v-add-web-domain: line 126: prepare_web_domain_values: command not found
v-add-web-domain: line 129: add_web_config: command not found
v-add-web-domain: line 148: increase_ip_value: command not found
v-add-web-domain: line 149: increase_user_value: command not found
v-add-web-domain: line 150: increase_user_value: command not found
v-add-web-domain: line 165: /v-restart-web: No such file or directory
v-add-web-domain: line 166: check_result: command not found
v-add-web-domain: line 169: /v-restart-proxy: No such file or directory
v-add-web-domain: line 170: check_result: command not found
v-add-web-domain: line 173: log_history: command not found
v-add-web-domain: line 174: log_event: command not found

Re: VestaCP in LXC Container

Posted: Thu Sep 20, 2018 12:17 pm
by alexcy
Hello,

Don't login to your SSH through Proxmox (e.g. PCT <containerno>). Connect via SSH directly to the LXC.

Re: VestaCP in LXC Container

Posted: Thu Sep 20, 2018 3:33 pm
by mehargags
alexcy wrote:
Thu Sep 20, 2018 12:17 pm
Don't login to your SSH through Proxmox (e.g. PCT <containerno>). Connect via SSH directly to the LXC.
I think I tried that too... does that makes a difference ?

Re: VestaCP in LXC Container

Posted: Thu Sep 20, 2018 4:28 pm
by alexcy
For me it does..

Re: VestaCP in LXC Container

Posted: Thu Sep 20, 2018 7:25 pm
by mehargags
Bingo... it works when I direct SSH into the Container and not through host OS.

I gave it a good read... and many good pointers discussed here https://github.com/serghey-rodin/vesta/issues/1518

The Difference is the shell that loads and provides interface to the underlying OS on the container's OS.

These are a few ways how you connect your Container

Code: Select all

lxc exec xenial /bin/bash

Code: Select all

lxc-attach
you directly get a root session inside the container, no password asked. But somehow it is not a complete control to the Kernel level calls on the guest OS. (my guess)


What works is
direct SSH access to container


I'm yet to explore one more way as listed below:

Code: Select all

lxc-console

provides virtual console for the container, complete with its login screen, like KVM-VNC, ILO, DRAC) to a real server. If you attach to console 0

Code: Select all

lxc-console -n lxcname -t 0
you'll get to see all console messages during boot as well.

Will do some more research and provide feedback.

Thanks a ton @Alexcy... you are a dude!! ;)

Re: VestaCP in LXC Container

Posted: Thu Sep 20, 2018 8:06 pm
by alexcy
You are welcome. If you find a solution through the OS, please let me know.

It used to work just fine with Proxmox 3 - OpenVZ instead of LXC.

Re: VestaCP in LXC Container

Posted: Thu Sep 20, 2018 8:31 pm
by mehargags
alexcy wrote:
Thu Sep 20, 2018 8:06 pm
You are welcome. If you find a solution through the OS, please let me know.
It used to work just fine with Proxmox 3 - OpenVZ instead of LXC.
Frankly, I'm a bit new to proxmox, containers and all this virtualisation... but I surely will keep this thread updated.

Re: (Solved) VestaCP in LXC Container

Posted: Thu Sep 20, 2018 8:35 pm
by alexcy
Proxmox is a very good choice.