OpenVZ Forum


Home » General » Support » [migrating physical server to VE] little network problem
[migrating physical server to VE] little network problem [message #22745] Fri, 02 November 2007 14:50 Go to next message
arghbis is currently offline  arghbis
Messages: 35
Registered: November 2007
Member
Hello everybpdy,

I'm currently trying to migrate a physical server into a VE. I've read http://wiki.openvz.org/Physical_to_VE, and everything is almost working.

The physical server runs redhat 8.0.

The only remaining problem is the network. I've set the ONBOOT option to no for each physical network interface.
I've then run the vzctl commands to add an ip to VE, as well as a nameserver.

Then, i start the VE and have an error message :
Quote:


Adding IP address(es): 192.168.2.3
/bin/cp: ambiguous argument `' for `--preserve'
Valid arguments are:
- `mode'
- `timestamps'
- `ownership'
- `links'
- `all'
Try `/bin/cp --help' for more information.
ERROR: Can't copy file /etc/sysconfig/network
Setting CPU units: 133016
Set hostname: migtest
/bin/cp: ambiguous argument `' for `--preserve'
Valid arguments are:
- `mode'
- `timestamps'
- `ownership'
- `links'
- `all'
Try `/bin/cp --help' for more information.
ERROR: Can't copy file /etc/sysconfig/network
VPS start in progress...



I enter the VE and am not able to ping any network.
To be able to ping, i have to manually add needed routes, and obviously, it does not remain once the VE is restarted.

I've checked /etc/sysconfig/network-scripts/{ifcfg-venet0,ifcfg-venet0:0, route-venet0}
and everything seems to be fine.

Any idea about this?

thanks
Re: [migrating physical server to VE] little network problem [message #22821 is a reply to message #22745] Mon, 05 November 2007 07:45 Go to previous messageGo to next message
arghbis is currently offline  arghbis
Messages: 35
Registered: November 2007
Member
I've find the reason of the error message upon VE restart : i've mofidy /etc/vz/dists/scripts/functions and /etc/vz/dists/scripts/redhat-add_ip.sh to replace the /bin/cp options (add -a instead of --preserve=mode,ownershi).

This suppress the error message, but the network is still not correctly set up.

any idea?

thanks
Re: [migrating physical server to VE] little network problem [message #22822 is a reply to message #22821] Mon, 05 November 2007 10:25 Go to previous message
arghbis is currently offline  arghbis
Messages: 35
Registered: November 2007
Member
ok, now i've found a solution.

the conf file /etc/sysconfig/network-scripts/route-venet0 is not taken into account.

Googling around some says that you have to add your routes into /etc/sysconfig/static-route (doesn't work), or in rc.local (doesn't work, and btw, an ugly way).
The last clue i found is to add routes in /etc/sysconfig/networking/${interface}.route, and it works.

now, i have /etc/sysconfig/networking/venet0.route, that contains :
NETMASK1=255.255.255.255
ADRESS1=191.255.255.1

hope this would help!
Previous Topic: Performance Woes
Next Topic: Suggestion for implementing OVZ?
Goto Forum:
  


Current Time: Wed Sep 11 15:20:26 GMT 2024

Total time taken to generate the page: 0.05522 seconds