0

I have Debian 9 with OpenVZ 6 running on it, I created my VPS like this:

vzctl create 10 -- ostemplate debian-8.0-x86_64-minimal
vzctl set 10 --ipadd 192.168.1.5 --save

However when I start the virtual machine it has not assigned the private IP so I cannot setup nat on host machine to allow this virtual server access to the internet.

This is output of ip addr from the virtual:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
   valid_lft forever preferred_lft forever
2: venet0: <BROADCAST,POINTOPOINT,NOARP> mtu 1500 qdisc noop state DOWN
link/void

This is /etc/network/interfaces:

auto lo
iface lo inet loopback

OpenVZ should configure this file because on my old machine with Debian 7 and debian 7 VPS this file is automatically configured by the OpenVZ manager so everytime VPS restarts it gets new configuration according to what this container has in OpenVZ configuration. I need this process to be automatic, sure I can config this manually but thats not what I need.

EDIT: When I tried debian 7 template, everything works just fine, so I guess there is problem only with Debian 8 templates that are not getting auto configured by OpenVZ. However debian 7 is very old and I need at least Debian 8 containers.

EDIT 2: This message appears when I try to set IP to Debian 8 container:

vzctl set 10 --ipadd 192.168.1.11 --save
UB limits were set successfully
Adding IP address(es): 192.168.1.11
main: line 710: /etc/init.d/network: No such file or directory
CT configuration saved to /etc/vz/conf/10.conf

1 Answer 1

0

It seems like configuration files are messed up for newer debian versions so I needed to create a new configuration for Debian 8 in /etc/vz/dists and it works jsut fine after that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .