openvz in ubuntu hardy -- network options ignored [message #29286] |
Thu, 10 April 2008 07:44 |
tanimoto
Messages: 6 Registered: April 2008
|
Junior Member |
|
|
Hello,
I compiled an openvz kernel from this git repository:
http://git.openvz.org/?p=ubuntu-hardy-openvz;a=summary
Then I tried using multiple templates (different versions of ubuntu and debian), but I always have the same problem. I suspect it's related to config files not being overwritten.
Here's an example:
$ sudo vzctl create 101 --ostemplate ubuntu-8.04-amd64-minimal
Creating VE private area (ubuntu-8.04-amd64-minimal)
Performing postcreate actions
VE private area was created
$ sudo vzctl set 101 --hostname hardy --save
Saved parameters for VE 101
$ sudo vzctl set 101 --ipadd 192.168.2.1 --save
Saved parameters for VE 101
$ sudo vzctl set 101 --nameserver 192.168.1.1 --save
Saved parameters for VE 101
$ sudo vzctl start 101
Starting VE ...
VE is mounted
Adding IP address(es): 192.168.2.1
cp: skipping file `/etc/network/interfaces', as it was replaced while being copied
Setting CPU units: 1000
Configure meminfo: 65536
Set hostname: hardy
ERROR: Can't copy file /etc/hosts
/bin/cp: skipping file `/etc/hosts', as it was replaced while being copied
VE start in progress...
Notice the warnings of files being skipped with 'cp'.
Here's some info output:
$ sudo vzctl enter 101
entered into VE 101
root@localhost:/# ifconfig
root@localhost:/# ifconfig -a
lo Link encap:Local Loopback
LOOPBACK MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00- 00-00
BROADCAST POINTOPOINT NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@localhost:/# ip r l
root@localhost:/# ip rule list
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
root@localhost:/# cat /etc/network/interfaces
auto venet0:0
iface venet0:0 inet static
address 192.168.2.1
netmask 255.255.255.255
broadcast 0.0.0.0
root@localhost:/# invoke-rc.d networking restart
* Reconfiguring network interfaces...
SIOCSIFFLAGS: Cannot assign requested address
Failed to bring up venet0:0.
Now the weird thing for me is that if I append this to /etc/network/interfaces and restart the network script, everything works fine. Until the VE is restarted, that is.
iface lo inet loopback
auto venet0 lo
iface venet0 inet static
address 127.0.0.1
netmask 255.255.255.255
broadcast 0.0.0.0
up route add -net 191.255.255.1 netmask 255.255.255.255 dev venet0
up route add default gw 191.255.255.1
Any idea of what I could be missing? I saw a past thread suggesting changing the 'cp' flags from '-fp' to just '-f' in the vz scripts, but that unfortunately didn't do the trick.
Thank you.
PS: I also tried assigning different IP addresses to the VE, to no avail.
[Updated on: Thu, 10 April 2008 07:45] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: openvz in ubuntu hardy -- network options ignored [message #31439 is a reply to message #31437] |
Mon, 30 June 2008 14:37 |
gumicsoves
Messages: 4 Registered: April 2008 Location: Ottawa, Ontario, Canada
|
Junior Member |
|
|
Hi Jim,
Upgrade to the latest version of Ubuntu Kernel. At this moment it is: linux-image-2.6.24-19-openvz and that is going to fix this problem as well as many others. This is a very solid kernel, I and others have been using it on several production machines without any problem.
Cheers,
Karoly
|
|
|