VE networking question [message #32640] |
Thu, 21 August 2008 14:43 |
satimis
Messages: 39 Registered: August 2008
|
Member |
|
|
Hi folks,
Each time booting up the host, VE (guest) starts automatically. However VE can't connect Internet. I have to run on host;
[Host]# brctl addif br0 veth101.0
[Host]# vzctl exec 101 dhclient eth0
Then VE can access Internet.
[Host]# vzctl exec 101 ping -c3 google.com
PING google.com (72.14.207.99) 56(84) bytes of data.
64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=1 ttl=237 time=237 ms
64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=2 ttl=237 time=237 ms
64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=3 ttl=237 time=240 ms
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 10803ms
rtt min/avg/max/mdev = 237.328/238.381/240.166/1.268 ms
Is there any way to make network connected automatically on booting the VM?
Can I set fixed IP on VE
Please advise. TIA Pointer would be appreciated.
B.R.
satimis
|
|
|
|
Re: VE networking question [message #32655 is a reply to message #32644] |
Fri, 22 August 2008 08:06 |
satimis
Messages: 39 Registered: August 2008
|
Member |
|
|
Hi piavlo,
Thanks for your advice.
[Host]# vzctl --version
I suppose to follow;
method for vzctl version <= 3.0.22
http://wiki.openvz.org/Virtual_Ethernet_device#Making_a_brid ged_veth-device_persistent
[Host]# ls -l /etc/vz/conf/
total 20
-rw-r--r-- 1 root root 228 2008-04-21 22:19 0.conf
-rw-r--r-- 1 root root 1831 2008-08-21 23:35 101.conf
-rw-r--r-- 1 root root 1810 2008-08-21 12:32 101.conf.origin.20080821
-rw-r--r-- 1 root root 1539 2008-04-21 22:19 ve-light.conf-sample
-rw-r--r-- 1 root root 1515 2008-04-21 22:19 ve-vps.basic.conf-sample
[Host]# locate CTID.conf
No printout
I can't find this file?
[Host]# vzlist -a
VEID NPROC STATUS IP_ADDR HOSTNAME
101 3 running - satimis-desktop32
VE 101 is running
[Host]# lsmod | grep vzeth
vzethdev 14080 0
vzmon 41224 5 vzethdev,vznetdev,vzrst,vzcpt
vzdev 4484 4 vzethdev,vznetdev,vzdquota,vzmon
[Host]# ls /vz/template/cache/
ubuntu-8.04-i386-minimal.tar.gz
[Host]# ls /etc/vz/dists/ | grep ubuntu
ubuntu-5.1.conf
ubuntu.conf
Which of them shall I use?
[Host]# grep CONFIGFILE /etc/vz/vz.conf
Can I follow;
Configuring container creation
http://wiki.openvz.org/Configuring_container_creation
to run;
[Host]# vzctl create CTID
creating CTID.conf ???
If YES, then whether I have to stop VE 101 running first? TIA
B.R.
satimis
[Updated on: Fri, 22 August 2008 08:08] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Re: VE networking question [message #35494 is a reply to message #32716] |
Tue, 31 March 2009 06:39 |
hrabbit
Messages: 1 Registered: March 2009
|
Junior Member |
|
|
This appears to be an old thread but for others looking for a straight answer (which this thread doesn't appear to provide) I found a simple solution.
In /usr/sbin/vznetcfg you will notice at the top that the script actually tries to call "source" as a command.
This should be changed to a . (full stop) instead. This will cause it to source the actual VEID.conf file correctly, remove the error and continue on.
Old
[ -f "$VZNETCFG" ] && source "$VZNETCFG"
New
[ -f "$VZNETCFG" ] && . "$VZNETCFG"
|
|
|