Difference between revisions of "Setup an eth0 interface for OpenVZ container"
m (Protected "Setup an eth0 interface for OpenVZ container" ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
|||
Line 18: | Line 18: | ||
No need to reboot the VPS. | No need to reboot the VPS. | ||
+ | |||
+ | How to remove eth0: | ||
+ | vzctl set 101 --netif_del eth0 --save | ||
+ | |||
+ | [[Category:Admin area]] |
Revision as of 13:48, 25 December 2014
From the node:
vzctl set 101 --netif_add eth0 --save
where 101 is a container ID.
Login to the container and create an eth0 config file
nano /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 BOOTPROTO=static ONBOOT=yes IPADDR=X.X.X.X NETMASK=255.255.255.255
Where X.X.X.X is a desired IP address.
service network restart
No need to reboot the VPS.
How to remove eth0:
vzctl set 101 --netif_del eth0 --save