Article ID: 6687, created on Sep 21, 2009, last review on Apr 30, 2014

  • Applies to:
  • Virtuozzo containers for Windows 4.0

Symptoms

When I try to add IP address to the container by using command line tool, I get the following error:

Cannot find 'key 0' network adapter for container CT_ID

Symptoms

The error can occur if network interface is accidentally removed inside the container.

Resolution

To recreate network configuration for container, use the following steps:

1. Add venet0 network interface to the container:

vzctl set CT_ID --netif_add venet0 --nettype routed

2. Set the IP address for the container:

vzctl set CT_ID --ipadd 10.20.30.40 --save
 
3. Set the nameserver from the container configuration file (if required):

vzctl set CT_ID --nameserver 20.30.40.50 --save
 
4.. Restart the container:

vzctl restart CT_ID
 
Note: CT_ID is the id number of the affected container.

28d0f7cc091e3b9304fa556c03f9a940 d02f9caf3e11b191a38179103495106f 965b49118115a610e93635d21c5694a8 2897d76d56d2010f4e3a28f864d69223

Email subscription for changes to this article
Save as PDF